Repository navigation
[ASM] Fix gfx950 GQA16 MTP softmax initialization - #6606
Conversation
Update eight gfx950 GQA16 MTP code objects for BF16/FP16 queries, per-token FP8/INT8 KV, and mask=0/1. Initialize the missing running-max state for qlen=3 and qlen=4, matching poc_kl_merg source fix f271c7f3ff322ae4d47110b731b8e6db93a3ff52. Preserve kernel metadata and resource settings. Validation on gfx950: - 16/16 independent-process first-call and repeat checks passed. - 2,592 paired cases: current 2,488 passed vs baseline 2,327; 161 newly passing cases and zero newly failing cases. - Current binaries produced no NaN/Inf or unstable cases, compared with 16 nonfinite and 171 unstable baseline cases. - 104 existing FP8 precision-threshold failures remain in both versions; this is not full precision certification. The separate mixed-batch qlen=1 issue is outside this change.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
Update the four BF16/FP16 and per-token FP8/INT8 mask1 code objects to initialize causal-mask state for qlen=1 rows in mixed-qlen batches. Mask0 binaries are unchanged. Validation on gfx950: 1,632 paired cases improved from 1,432 to 1,576 passes, with 144 newly passing cases and zero new failures. Nonfinite cases decreased from 152 to zero; fixed outputs were repeat-stable. All 8 public API scenarios passed and 1,224 unaffected controls remained bitwise identical. The 56 remaining FP8 precision-threshold failures also fail before this fix. AMDGPU metadata is unchanged. Only the four validated gfx950 mask1 COs are included.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
Update eight gfx950 GQA16 MTP code objects for BF16/FP16 queries, per-token FP8/INT8 KV, and mask=0/1.
Initialize the missing running-max state for qlen=3 and qlen=4, matching poc_kl_merg source fix f271c7f3ff322ae4d47110b731b8e6db93a3ff52. Preserve kernel metadata and resource settings.
Validation on gfx950:
The separate mixed-batch qlen=1 issue is outside this change.
Motivation
Fix NaNs and unstable outputs caused by uninitialized running-max state
in GQA16 MTP kernels for query lengths 3 and 4.
Update the gfx950 code objects to include the SP3 initialization fix.
Technical Details
_v_FA_Max[2]for qlen=3._v_FA_Max[2]and_v_FA_Max[3]for qlen=4.per-token FP8/INT8 KV, and mask=0/1.
Test Plan
selected KV lengths from 4 to 513, and multiple batch/head configurations.
allowing at most 5% mismatched elements.
Test Result
Independent-process checks: 16/16 passed.
These are finite and stable with the updated COs.
Submission Checklist