CUDA: re-use MLA K data for V in MMA FA#19057
Merged
JohannesGaessler merged 1 commit intoggml-org:masterfrom Jan 24, 2026
Merged
CUDA: re-use MLA K data for V in MMA FA#19057JohannesGaessler merged 1 commit intoggml-org:masterfrom
JohannesGaessler merged 1 commit intoggml-org:masterfrom
Conversation
ggerganov
approved these changes
Jan 24, 2026
Member
ggerganov
left a comment
There was a problem hiding this comment.
Did some tests on DGX Spark and works correctly.
Comment on lines
+274
to
+276
| if (!V_is_K_view) { | ||
| return BEST_FATTN_KERNEL_NONE; | ||
| } |
Member
There was a problem hiding this comment.
For my understanding, what prevents this path to run correctly? Likely we won't ever need it - just from implementation perspective what is the limitation.
Collaborator
Author
There was a problem hiding this comment.
There is no limitation, I'm just trying to cut out unused template specializations since MMQ and FA are the biggest contributors to compilation time and binary size when it comes to the CUDA backend.
Nexesenex
added a commit
to Nexesenex/croco.cpp
that referenced
this pull request
Jan 24, 2026
This reverts commit 8f91ca5.
ronaldmannak
pushed a commit
to PicoMLX/llama.cpp
that referenced
this pull request
Jan 24, 2026
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.
Follow-up to #18986 .
This PR re-enables a performance optimization in the CUDA MMA FlashAttention kernel that re-uses part of the K data for V.
Performance