Files
kernbench2/pyproject.toml
T
ywkang 372c987995 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>
2026-04-12 21:06:41 -07:00

37 lines
871 B
TOML

[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kernbench"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = ["pytest", "simpy", "pyyaml", "fastapi>=0.110", "uvicorn[standard]>=0.29", "websockets>=12", "numpy>=1.24", "greenlet>=3.0"]
[project.scripts]
kernbench = "kernbench.cli.main:main"
[tool.setuptools.packages.find]
where = ["src", "."]
include = ["kernbench*", "benches*"]
[project.optional-dependencies]
dev = [
"pytest>=7",
"pytest-xdist>=3.0",
"ruff>=0.4.0",
]
[tool.ruff]
line-length = 100
target-version = "py310"
fix = false
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP"]
ignore = ["F401"]
[tool.pytest.ini_options]
addopts = ["--disable-warnings", "-n", "auto", "-m", "not slow"]
markers = ["slow: 256-rank full-system tests (~3min each, run with: pytest -m '')"]