Skip to content

[Issue] [rocroller][gfx950] FP8 Scaled Matrix Multiply Exceeds Numerical Tolerance — ScaledMatrixMultiplyMacroTile{F8F6F4,Mixed} #11115

Description

@amd-chiranjeevi

Summary

6 rocroller scaled FP8 matrix multiply tests consistently fail on gfx950:sramecc+ in the nightly CI (run #32343456245), across all 4 affected shards. The observed L2 and Inf relative norms are ~1.19x over the current tolerance. The log explicitly hints that the FP8 fudge factor (32.5x) should be used instead of the default (5.0x), but it is not being applied.

Environment

  • Architecture: gfx950:sramecc+
  • Runner: linux-gfx950-1gpu-ccs-ossci-rocm
  • Container: ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:4150afe4759d14822f0e3f8930e1124f26e11f68b5c7b91ec9a02b20b1ebbb94
  • Branch: develop @ 4b5b0c8569bfc3f250028a97a4933ba792668934
  • CI Run: https://github.com/ROCm/rocm-systems/actions/runs/32343456245

Failing Tests

All 6 unique test cases fail with identical norm values across every shard they appear in — confirming this is deterministic, not flaky.

Test Params Shard
MatrixMultiplyF8F6F4TestGPU.GPU_ScaledMatrixMultiplyMacroTileF8F6F4/80 (FP8, K=64, ("N","N"), BufferToLDSViaVGPR) 1/5
MatrixMultiplyF8F6F4TestGPU.GPU_ScaledMatrixMultiplyMacroTileF8F6F4/87 (FP8, K=64, ("T","T"), GlobalToLDSViaVGPR) 3/5
ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/400 (FP8, FP8, K=64, ("N","N"), BufferToLDSViaVGPR) 4/5
ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/401 (FP8, FP8, K=64, ("N","N"), GlobalToLDSViaVGPR) 5/5
ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/406 (FP8, FP8, K=64, ("T","T"), BufferToLDSViaVGPR) 5/5
ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/407 (FP8, FP8, K=64, ("T","T"), GlobalToLDSViaVGPR) 1/5

All 4 shards (1, 3, 4, 5 of 5) exited with exit code 8 (CTest partial failure).

Error Output (identical across all failing cases)

Comparison FAILED.
Relative norms:  L2 7.369488e-05   Inf 7.282440e-05
Norms (x/ref):   L2 2.381346e+07 / 2.381461e+07
                 Inf 1.546088e+07 / 1.546185e+07
Tolerance: 6.198883e-05
  (Output epsilon: 1.192093e-07  K: 256  Problem size scaling: 1.600000e+01
   Fudge: 5.000000e+00  Increase fudge for FP8: 3.250000e+01)

Analysis

  • L2 norm 7.369e-05 vs tolerance 6.199e-051.189x over (18.9% margin breach)
  • Inf norm 7.282e-05 vs tolerance 6.199e-051.175x over
  • The log itself annotates Increase fudge for FP8: 3.250000e+01 — meaning the tolerance framework knows FP8 needs a 32.5x fudge factor, but the test is running with the default Fudge: 5.0
  • With the FP8 fudge applied, the observed error would be ~218x under the adjusted tolerance — these tests would pass trivially
  • All 6 failures share K=64 and involve both BufferToLDSViaVGPR and GlobalToLDSViaVGPR load paths, and both ("N","N") and ("T","T") transpose configurations — suggesting the issue is in the FP8 accumulation path at this tile size, not a specific load/transpose variant

Likely Root Cause

The GPU_ScaledMatrixMultiplyMacroTile test fixture is not applying the FP8-specific fudge multiplier (32.5x) when the data type is FP8. The tolerance check uses the generic Fudge: 5.0 instead. This is either:

  1. A bug in the test's tolerance selection logic (not checking the dtype before choosing fudge), or
  2. A recent change that tightened the fudge factor for FP8 cases without accounting for the expected precision loss on gfx950

To Reproduce

# Run on a gfx950 system targeting the specific failing cases:
ctest --test-dir <build_dir> \
  -R "ScaledMatrixMultiplyMacroTileF8F6F4/80|ScaledMatrixMultiplyMacroTileMixed/407" -V

Or via gtest filter directly:

--gtest_filter="MatrixMultiplyTest/MatrixMultiplyF8F6F4TestGPU.GPU_ScaledMatrixMultiplyMacroTileF8F6F4/80:\
MatrixMultiplyTest/MatrixMultiplyF8F6F4TestGPU.GPU_ScaledMatrixMultiplyMacroTileF8F6F4/87:\
MatrixMultiplyTest/ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/400:\
MatrixMultiplyTest/ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/401:\
MatrixMultiplyTest/ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/406:\
MatrixMultiplyTest/ScaledMatrixMultiplyMixedTestGPU.GPU_ScaledMatrixMultiplyMacroTileMixed/407"

Suggested Fix

In the tolerance/comparison logic for GPU_ScaledMatrixMultiplyMacroTile*, ensure the FP8 fudge factor (3.25e+01) is selected when the A/B data type is FP8, rather than falling through to the default 5.0. The framework already knows the correct value — it just isn't using it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions