Fix gather_qmm NAX kernel name mismatch#3632
Open
scyyh11 wants to merge 1 commit into
Open
Conversation
gather_qmm_nax builds kernel names with bk = 32, but the gather qmm NAX kernels are only instantiated with bk = 64 (bk only enters the name), so the lookup always failed with "Unable to load kernel ..._bk32...". Use bk = 64 to match the instantiations and add a regression test that runs matrix-size gather_qmm in half precision against a float32 reference. Signed-off-by: Bvicii <yizhanhuang2002@gmail.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.
Proposed changes
gather_qmm_naxbuilds the NAX kernel name withbk = 32, but the gather qmm NAX kernels are only instantiated with_bk64_names. On NAX devices this makes the matrix-sizegather_qmmpath (taken for half-precision inputs, or float32 with tf32 enabled) fail during kernel lookup with anUnable to load kernel ..._bk32...error.This changes the
gather_qmm_naxkernel-name construction to usebk = 64, matching the existing instantiations. In this pathbkis only part of the kernel name; the dispatch geometry is unchanged.The PR also adds a regression test for matrix-size half-precision
gather_qmmcovering bothaffineandmxfp4, checked against a float32 reference.Tested with:
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes