Skip to content

fix(hipblaslt): Fix gfx1201 test for FP16 T-T GEMM + bias-fused epilogue#9204

Merged
jinchen62 merged 7 commits into
ROCm:developfrom
jinchen62:fix_gfx12_test
Jul 11, 2026
Merged

fix(hipblaslt): Fix gfx1201 test for FP16 T-T GEMM + bias-fused epilogue#9204
jinchen62 merged 7 commits into
ROCm:developfrom
jinchen62:fix_gfx12_test

Conversation

@jinchen62

Copy link
Copy Markdown
Contributor

Technical Details

Root cause: BiasDataTypeList in Tensile/Logic/asm_full/gfx1201/GridBased/gfx1201_Cijk_Alik_Bjlk_HHS_BH_Bias_SHB_HA_S_SAB_SCD_SAV_UserArgs.yaml (the FP16 T-T logic file on gfx1201) was [0] (Float only) instead of [0, 4] (Float and Half). This is the only transpose combo on gfx1201 missing Half — its three sibling files (N-N, T-N, N-T) and the identical file on gfx1200 all correctly list [0, 4]. Since BiasDataTypeList drives which bias-dtype code paths KernelWriterAssembly.py generates into the kernel, the compiled kernels for this one config genuinely had no Half-bias path.

Fix: widen BiasDataTypeList to [0, 4] to match every sibling combo, and rebuild so the kernel is regenerated with Half-bias support.

Also added a regression test (matmul_bias_fp16_gfx120x_tt in clients/tests/data/matmul_gtest.yaml, gated to gpu_arch: '120[0-1]').

Test Result

  • Before fix: returnedAlgoCount == 0 for FP16 T-T + BIAS/RELU_BIAS/GELU_BIAS.
  • After fix: returnedAlgoCount == 8 for all three, on real gfx1201 hardware.
  • Numeric correctness (BIAS): maxAbsErr=0.000977 maxRelErr=0.000479, 0/3072
    elements out of tolerance vs. CPU reference.
  • Numeric correctness (RELU_BIAS): maxAbsErr=0.000974 maxRelErr=0.000472,
    0/3072 elements out of tolerance vs. CPU reference.
  • Clean rebuild, 0 rejected solutions.

JIRA ID: ROCM-25598

@jinchen62 jinchen62 requested a review from a team as a code owner July 8, 2026 21:09
@jinchen62 jinchen62 requested review from talumbau and tony-davis July 8, 2026 21:10
@therock-pr-bot

therock-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

therock-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@jinchen62 jinchen62 changed the title fix(hipblaslt): Fix gfx1201 test for FP16 transpose-transpose GEMM + bias-fused epilogue fix(hipblaslt): Fix gfx1201 test for FP16 T-T GEMM + bias-fused epilogue Jul 8, 2026
@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (76.84%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9204   +/-   ##
========================================
  Coverage    65.36%   65.36%           
========================================
  Files         2685     2685           
  Lines       422269   422269           
  Branches     62742    62742           
========================================
  Hits        276012   276012           
  Misses      125466   125466           
  Partials     20791    20791           
Flag Coverage Δ *Carryforward flag
TensileLite 35.07% <ø> (ø) Carriedforward from 53acec6
hipBLAS 90.81% <ø> (ø) Carriedforward from 53acec6
hipBLASLt 34.69% <ø> (ø)
hipCUB 82.68% <ø> (ø) Carriedforward from 53acec6
hipDNN 86.13% <ø> (ø) Carriedforward from 53acec6
hipFFT 50.88% <ø> (ø) Carriedforward from 53acec6
hipRAND 76.12% <ø> (ø) Carriedforward from 53acec6
hipSOLVER 69.18% <ø> (ø) Carriedforward from 53acec6
hipSPARSE 86.10% <ø> (ø) Carriedforward from 53acec6
rocBLAS 47.91% <ø> (ø) Carriedforward from 53acec6
rocFFT 55.50% <ø> (ø) Carriedforward from 53acec6
rocRAND 57.02% <ø> (ø) Carriedforward from 53acec6
rocSOLVER 76.84% <ø> (ø) Carriedforward from 53acec6
rocSPARSE 72.37% <ø> (ø) Carriedforward from 53acec6
rocThrust 91.36% <ø> (ø) Carriedforward from 53acec6

*This pull request uses carry forward flags. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@newling newling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. My only suggestion is to trim the test down to a minimal case.

Comment thread projects/hipblaslt/clients/tests/data/matmul_gtest.yaml
@jinchen62 jinchen62 enabled auto-merge (squash) July 10, 2026 22:25

@tony-davis tony-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Nice work, and thank you for the diligence here (tracking it down to the one BiasDataTypeList that was out of step with all its siblings is a clean root cause). I especially appreciate the before/after evidence on the regression test: returnedAlgoCount 0 -> 8 plus the numeric correctness numbers is exactly the kind of proof that makes a fix easy to trust.

One thing I want to name explicitly (and then accept): the new matmul_bias_fp16_gfx120x_tt test is gated to gpu_arch: '120[0-1]', and we don't currently have a gfx120x lane in this PR's CI, so it won't actually execute in shared CI. The validation we have is on real gfx1201 hardware, run locally. I'm accepting that for this merge (it's solid evidence, and it's the best we can do given the fleet today).

The thing is, this PR is a pretty good argument for why we need gfx120x GPU runners in CI. This exact bug would have been caught up front, and just as importantly, this regression test would keep running on every change instead of sitting dormant until someone happens to test on the hardware. I'm going to point at this one as more evidence for standing up gfx120x coverage.

Thanks again, this is good work.

@jinchen62 jinchen62 merged commit 83a3597 into ROCm:develop Jul 11, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants