Support FA MXFP8 with HEAD-DIM=128#942
Open
njriasan wants to merge 27 commits intofacebookexperimental:mainfrom
Open
Support FA MXFP8 with HEAD-DIM=128#942njriasan wants to merge 27 commits intofacebookexperimental:mainfrom
njriasan wants to merge 27 commits intofacebookexperimental:mainfrom
Conversation
Contributor
Author
|
This is blocked on a bug in the buffer reuse implementation where I was treating bytes as the unit of TMEM instead of columns. This resulted in aliasing 4x as many columns for the scale as I should (because the scale byte is 1/4th the size of the other buffer). |
Contributor
Author
|
Okay after fixing there is still a deadlock issue. |
Contributor
Author
|
Okay deadlock is fixed. Now its all accuracy issues because I see all NaNs. |
Contributor
Author
|
Okay I believe i have an issue with qk_empties. Its not enough for QK to be empty to override it, I need the other data (e.g. alpha) to be done as well. I think I need to modify the code to handle this. |
Contributor
Author
|
This depends on #943 |
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.
Implements the buffer sharing strategy described in https://docs.google.com/document/d/16QRLjx0a_KJWkZamD7l5qQpRaHqBpaz-aYUwTI_yCxc/edit?tab=t.0 to allow overlapping the scales with QK. This lets us keep BLOCK_N=128 for HEAD-DIM=128.
This is not optimized for performance. I will analyze that next. In additional I will add a followup to support BLOCK_N=64 (which should be blocked on P's quantization) so I can compare the performance of these strategies.