perf(test): parallelize CPU reference and quantization in ROCmFPX and MMID tests

Merged
GR
10d ago
+157-49

Summary

Follow-up CI speed win (zero conflicts with #1060–#1063, zero skipped tests, bit-identical math).

Changes

  1. server/test/unit/test_rocmfpx_mmq.cpp:
    • reference_mul_mat previously ran a single-threaded triple-nested CPU matmul, taking ~35s per GPU (~70s total on lucebox3 across default + affine × 2 GPUs).
    • Parallelizes across rows using std::thread (hardware_concurrency()), keeping the inner dot-product order identical.
  2. server/test/unit/test_deepseek4_mmid_grouped_cuda.cpp:
    • run_case previously regenerated and quantized the exact same weights_q and input_f twice per (type, width) (fused_ds4=false and fused_ds4=true) on a single CPU thread (~66s total on lucebox3, ~18s on DGX GB10).
    • Caches {weights_q, input_f} across the paired unfused/fused calls and parallelizes row-independent quantization across std::thread (byte-for-byte identical quantized output).

Expected Impact

  • test_rocmfpx_mmq: ~70s → ~5–8s total on lucebox3.
  • test_deepseek4_mmid_grouped_cuda: ~66s → ~10–15s total on lucebox3 and ~18s → ~4–6s on DGX GB10.