Reduce test time to 12s: shrink GEMM dims + enable pytest-xdist

GEMM dimension reduction:
- qkv_gemm.py: M,K,N = 128,256,128 → 32,64,32 (64 tiles → 1 tile).
- qkv_gemm_multi_pe.py: same reduction.
- Tests verify pipeline correctness, not large-matrix throughput.
- Per-test time: 18s → 1.7s. 6 tests total: 108s → 10s.

pytest-xdist parallel execution:
- Add pytest-xdist to dev dependencies.
- pyproject.toml addopts: -n auto (use all CPU cores), -m "not slow".
- Default `pytest` runs 501 tests in ~12s (previously 148s).
- Full suite including slow: `pytest -m ""` → 3m24s (previously 5m43s).

pytest.mark.slow:
- Registered in pyproject.toml markers section.
- 256-rank full-system test is the only slow-marked test.
- Run with: pytest -m "" (CI) or pytest (local dev, skips slow).

502 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 21:06:41 -07:00
parent bcf941dcee
commit 372c987995
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -18,6 +18,7 @@ include = ["kernbench*", "benches*"]
[project.optional-dependencies]
dev = [
"pytest>=7",
"pytest-xdist>=3.0",
"ruff>=0.4.0",
]
@@ -31,4 +32,5 @@ select = ["E", "F", "I", "B", "UP"]
ignore = ["F401"]
[tool.pytest.ini_options]
addopts = ["--disable-warnings"]
addopts = ["--disable-warnings", "-n", "auto", "-m", "not slow"]
markers = ["slow: 256-rank full-system tests (~3min each, run with: pytest -m '')"]