perf(test): parallelize CPU reference and quantization in ROCmFPX and MMID tests
Merged
GR
10d ago+157+157+012345678901234567890123456789-49-49-01234567890123456789
Summary
Follow-up CI speed win (zero conflicts with #1060–#1063, zero skipped tests, bit-identical math).
Changes
server/test/unit/test_rocmfpx_mmq.cpp:reference_mul_matpreviously ran a single-threaded triple-nested CPU matmul, taking ~35s per GPU (~70s total onlucebox3across default + affine × 2 GPUs).- Parallelizes across rows using
std::thread(hardware_concurrency()), keeping the inner dot-product order identical.
server/test/unit/test_deepseek4_mmid_grouped_cuda.cpp:run_casepreviously regenerated and quantized the exact sameweights_qandinput_ftwice per(type, width)(fused_ds4=falseandfused_ds4=true) on a single CPU thread (~66s total onlucebox3, ~18s on DGX GB10).- Caches
{weights_q, input_f}across the paired unfused/fused calls and parallelizes row-independent quantization acrossstd::thread(byte-for-byte identical quantized output).
Expected Impact
test_rocmfpx_mmq: ~70s → ~5–8s total onlucebox3.test_deepseek4_mmid_grouped_cuda: ~66s → ~10–15s total onlucebox3and ~18s → ~4–6s on DGX GB10.