perf(test): reuse quantized test weights and parallelize check-cpu

Merged
GR
9d ago
+163-29

Summary

Part 2 of the CI optimization series (from the 150-run audit). Zero tests skipped and zero assertions weakened.

Changes

  1. server/test/unit/test_qn_split_fusions.cpp:
    • q4k_rows previously 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_rows similarly re-quantized gate, up, down, and router 36 times (~12s on every GPU).
    • Pre-quantizes these read-only weight buffers once per test case and uploads them via Pattern::set.
  2. 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) and 2× per dense case (including 5120×129280 output_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().
  3. server/CMakeLists.txt:
    • check-cpu previously invoked ctest -L cpu serially (141.6s for 1,429 CPU tests on Linux CI). Now passes --parallel <ProcessorCount>.

Real Measured Results (DGX GB10 CI Run)

CheckBefore (main)After (#1061)Speedup
q4k_rows100.45s2.87s35.0×
moe_prefetch_rows10.20s0.89s11.5×
Run Qwen3.8 split fusion parity test130.00s22.98s5.7×
Total DGX GB10 job5m 02s1m 45s2.9×

(Linux check-cpu and lucebox3 AMD timings are currently running on this PR.)