perf(test): reuse quantized test weights and parallelize check-cpu
Merged
GR
9d ago+163+163+012345678901234567890123456789-29-29-01234567890123456789
Summary
Part 2 of the CI optimization series (from the 150-run audit). Zero tests skipped and zero assertions weakened.
Changes
server/test/unit/test_qn_split_fusions.cpp:q4k_rowspreviously re-generated and quantized two[2560, 640, 16]Q4_K tensors (52.4M floats) on CPU 48 times across(T, masked, fused, rows)with identical weights — taking 118s on R9700, 118s on Strix Halo, and 100s on DGX GB10.moe_prefetch_rowssimilarly re-quantizedgate,up,down, androuter36 times (~12s on every GPU).- Pre-quantizes these read-only weight buffers once per test case and uploads them via
Pattern::set.
server/test/unit/test_ds41_mmid_width_invariance.cpp:- Previously re-generated 400 MB–1.3 GB random weight tensors
4×per expert case (inv=false,inv=true,Grouped::distinct,Grouped::shared) and2×per dense case (including5120×129280output_head), taking 45–50s on each AMD GPU. - Pre-generates read-only weight buffers once per shape/format and passes them into
check()/check_dense().
- Previously re-generated 400 MB–1.3 GB random weight tensors
server/CMakeLists.txt:check-cpupreviously invokedctest -L cpuserially (141.6sfor 1,429 CPU tests on Linux CI). Now passes--parallel <ProcessorCount>.
Real Measured Results (DGX GB10 CI Run)
| Check | Before (main) | After (#1061) | Speedup |
|---|---|---|---|
q4k_rows | 100.45s | 2.87s | 35.0× |
moe_prefetch_rows | 10.20s | 0.89s | 11.5× |
Run Qwen3.8 split fusion parity test | 130.00s | 22.98s | 5.7× |
| Total DGX GB10 job | 5m 02s | 1m 45s | 2.9× |
(Linux check-cpu and lucebox3 AMD timings are currently running on this PR.)