BenchmarkΒΆ
Kernel-level benchmark. Each run executes the same set of cases for every backend listed in the YAML config and writes a CSV, a Markdown report and a log. Results only hold for the stated hardware, software versions, config and measurement method; public performance claims must also pass the correctness check.
Install HALOps first (Build Guide), then the benchmark dependencies. Reference backends (FlashAttention, FlashInfer, DeepGEMM, SGLang, cuDNN) are not installed by this file; install only what the YAML backends list uses; the SGLang backend reads its local source tree from SGLANG_PATH. Run all commands from benchmark/.
python -m pip install -r requirements.txt
# All backends listed in the YAML
python benchmark.py --config=attention/prefill_chunked_c16_gqa14-1.yaml --gpu=0
# A single backend (must be in the YAML `backends` list; one --config only)
python benchmark.py --config=gemm/dense_w8a8.yaml --backend=halops --gpu=0
--configtakes a path relative toconfigs/(recommended), a file name unique acrossconfigs/<op>/, or an absolute path. Bundled configs live inconfigs/attention/andconfigs/gemm/.Common options:
--gpu(default0, setsCUDA_VISIBLE_DEVICES),--timing-method(profilerorcupti, defaultprofiler),--dry-run-iters(default10),--repeat-iters(default50),--refcheck-reference. Seepython benchmark.py --help.Outputs share one timestamp
{ts}:results/{ts}_{config}.csv,reports/{ts}_{scenario}_{case_tag}.md,logs/{ts}_{op}_{config}.log.Speedup is
other_backend_median_us / halops_median_us; above1.00xmeans HALOps is faster.