Repository navigation
feat(hipblaslt): add gfx1250 Aux, FP8 AmaxD and MXFP8 logic for TransformerEngine - #13300
Merged
jichangjichang merged 4 commits intoOct 15, 2026
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
from
October 8, 2026 07:38
ed562dd to
9d41a93
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (43.30%) 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 #13300 +/- ##
===========================================
- Coverage 74.65% 74.64% -0.00%
===========================================
Files 2881 2881
Lines 479786 479786
Branches 71117 71117
===========================================
- Hits 358139 358132 -7
- Misses 97406 97410 +4
- Partials 24241 24244 +3
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
from
October 12, 2026 07:11
9d41a93 to
823fb4a
Compare
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
from
October 12, 2026 09:32
823fb4a to
cc3b173
Compare
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
2 times, most recently
from
October 13, 2026 06:31
43336ba to
a8eeca9
Compare
added 3 commits
October 14, 2026 03:43
Add GEMM+Bias+Activation with Aux output (UseE) for BF16 and FP32, all four transposes, for gfx1250 and gfx1250-strict. Kernels are the existing non-Aux BF16/FP32 GridBased solutions; sizes add the gfx950 Aux sizes and 768x4096x768. Add matching gfx1250 gtests. Also fix PackData_BF16 on HasBF16CVT archs: when tmpVgpr was passed (the E-store destination), it converted tmpVgpr instead of the real inputs, so the BF16 Aux output was garbage on full tiles with gwvw > 1.
For fp8/bf8 inputs with an fp8/bf8/f16 output, the test client mapped a bf16 bias to an f32 buffer while the matmul desc still declared bf16, so the GPU read the bias with the wrong type and validation failed.
Add per-tensor FP8/BF8 (incl. mixed) -> FP8/BF8 with OutputAmaxD, all four transposes, for gfx1250 and gfx1250-strict, from the existing ScaleCD solutions. Add matching gfx1250 gtests.
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
from
October 14, 2026 03:58
a8eeca9 to
fe2b4ba
Compare
Add MXFP8 TN F8xB8 / B8xF8 -> BF16/F16/F32, F8xF8 -> F16 (also used by
DqGEMM) and B8xB8 -> F32 for gfx1250 and gfx1250-strict, from the existing
MX solution. Add matching gfx1250 gtests, and run the bf8 rows of
matmul_fast_check_mx_fp8{,_large_k} on gfx1250 again (AIHPBLAS-5158).
mengzcai
force-pushed
the
users/mengzcai/add_bf16_fp32_aux_logic_yamls
branch
from
October 14, 2026 06:18
fe2b4ba to
9efe159
Compare
geotseng-amd
approved these changes
Oct 14, 2026
jichangjichang
approved these changes
Oct 15, 2026
Contributor
TheRock Submodule Bump ActivityNewest first
|
1 task done
mengzcai
added a commit
that referenced
this pull request
Nov 6, 2026
#15040) JIRA ID : AIHPBLAS-5448 ## Motivation `matmul_fp8_dst_fp8_amaxD_1250` fails intermittently on gfx1250 HW CI: the GPU AmaxD is low by a fixed amount per shape (TT 768x4096x768 bf8 x f8: CPU 211540, GPU 207480). Root cause: in `amax_inter_wave_reduction`, each tree step has upper waves store to slot `w - Offset`, a barrier, then lower waves load slot `w`. Every step reuses slots from 0, and nothing orders step i's loads before step i+1's stores. With 4 waves, w1 can store max(w1, w3) to slot 0 in step 2 before w0 has read w2's value from it in step 1, so w2's partial max is lost. The code is old and shared by all archs; it surfaced after #13300 made gfx1250 ship AmaxD kernels. <!-- Explain the purpose of this PR and the goals it aims to achieve. --> ## Technical Details - Wave `w` stores to slot `w`; lower wave `w` loads slot `w + Offset`. Each wave stores once per reduction, so no slot is reused and no barrier is added. Slot 0 stays free for the broadcast; LDS reservation is unchanged. - Reject `OutputAmaxD` with a non-power-of-two `NumWaves`: the tree halves the wave count, so e.g. 3 waves would drop w2. Shipped AmaxD solutions use 1, 2 or 4 waves. - Tests: unit tests for the slot addressing (every power-of-two wave count a valid WorkGroup allows, wave32 and wave64) and the reject; the gfx1250 AmaxD tox YAML ran only 1-wave workgroups, so it now also runs 2 and 4 waves. <!-- Explain the changes along with any relevant GitHub links. --> ## Test Plan On gfx1250 (MI450X B0), develop d1dd5a8 vs this branch: hipblaslt-test `*amaxD_1250*`, the tox YAML, and the new unit tests. To make the race deterministic, a debug-only build delays wave 0 with `s_sleep` before its inter-wave load. <!-- Explain any relevant testing done to verify this PR. --> ## Test Result | test | develop | this PR | |---|---|---| | `*amaxD_1250*` x200 | pass (race too rare in one process) | pass | | `*amaxD_1250*` + forced delay | 80/384 fail every repeat; same values as CI (211540 vs 207480) | pass (x20) | | tox `amax_gfx1250.yaml` + forced delay | 7 of 30 4-wave runs fail; 1/2 waves pass | pass | | tox `amax_gfx1250.yaml` | - | pass | | new unit tests | fail | pass | | TensileLite unit + characterization, pre-commit | - | pass | gfx942 shares the codegen and is covered by the wave64 unit test only. <!-- Briefly summarize test outcomes. --> ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests. --------- Co-authored-by: mengzcai <mengzcai@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FP8, MXFP8, GELU_AUX support
JIRA ID : https://amd-hub.atlassian.net/browse/ROCM-32461
MXBF8 support
JIRA ID : https://amd-hub.atlassian.net/browse/AIHPBLAS-5158
Motivation
TransformerEngine core GEMM tests on gfx1250 fail with "no algorithm" because hipBLASLt has no matching kernel for:
GELU_AUX(_BIAS)(only fp16 Aux ships);gfx1250 also has no MX kernel with bf8 inputs, so the bf8 rows of
matmul_fast_check_mx_fp8{,_large_k}(#13031) fail with "NO solution found" and were limited to gfx950 by #12983 (AIHPBLAS-5158).Technical Details
New GridBased logic for gfx1250 and gfx1250-strict:
UseE), all 4 transposes. Uses the existing non-Aux BF16/FP32 solutions.OutputAmaxD, all 4 transposes. Uses the existing ScaleCD solutions.All new solutions build exactly the kernels of the solutions they are derived from. Logic was generated from Tensile configs with
LibraryLogic.Fixes:
PackData_BF16(tensilelite): onHasBF16CVTarchs, the BF16 Aux store converted its own destination register instead of the input values. This produced a garbage Aux output on full tiles with gwvw > 1. It also changes 2 of the existing gfx950 BBS Aux kernels.New gtests (
gpu_arch: 1250):matmul_bias_gelu_aux_bf16_fp32{,_large}matmul_fp8_dst_fp8_amaxD_1250matmul_mxfp8_mix_dst_f16_bf16_f32_1250The bf8 rows of
matmul_fast_check_mx_fp8{,_large_k}run on(950|1250)again.Test Plan
*matmul_real_1b_dst_f8_SCD*,*1250_smoke*,*matmul_fast_check_mx_fp8*), each on both library subtrees (gfx1250 and gfx1250-strict code objects)Test Result
FFM, both subtrees (gfx1250 and gfx1250-strict):
*matmul_bias_gelu_aux*392/392, new FP8 gtests 440/440, regression set 4664/4664 — each on both subtrees.*matmul_fast_check_mx_fp8*-*placement*12/12 on each subtree, including the 8 bf8 tests that failed with "NO solution found" before.Submission Checklist