cuda: disable sparse V skip (warp divergence regression)#105
Merged
Conversation
Per-lane branching in the VEC FA kernel causes warp divergence that costs more than the skipped dequants save. Benchmarked at -0.3% to -2.8% on RTX 3090/4090 across all context lengths. Metal path unaffected (remains enabled, +4% to +23%). TODO: revisit with warp-level ballot skip (__ballot_sync + early exit when entire warp is below threshold). Data: @sztlink (Qwen3-30B-A3B Q4_K_M, CUDA SM86/SM89)
jimbothigpen
pushed a commit
to jimbothigpen/frankenturbo2
that referenced
this pull request
May 2, 2026
cuda: disable sparse V skip (warp divergence regression)
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.
Summary
Disables sparse V dequant skip on CUDA. Per-lane branching causes warp divergence that costs more than the skipped dequants save.
Benchmarks (@sztlink, Qwen3-30B-A3B Q4_K_M)
RTX 4090 (SM89):
RTX 3090 (SM86):
Metal path unaffected (remains enabled, +4% to +23%).
TODO
Revisit with warp-level ballot skip (
__ballot_sync+ early exit when entire warp is below threshold).