Repository navigation
[ROCm][Perf] Fuse MXFP8 activation quant into the 1x32 dot_scaled linear for M≤16 - #63969
Closed
YuvrajSinghBhadoria2 wants to merge 2 commits into
Closed
YuvrajSinghBhadoria2 wants to merge 2 commits into
YuvrajSinghBhadoria2 wants to merge 2 commits into
Conversation
…s available - Remove draft_grammar_bitmask from SchedulerOutput - Add compute_draft_grammar_bitmask() to SchedulerInterface - EngineCore computes bitmask after take_draft_token_ids() - Pass _next_draft_grammar_bitmask to next execute_model() - Works with both sync and async scheduling Signed-off-by: Yuvraj Singh Bhadoria <yuvrajsinghbhado2030@gmail.com>
…≤16 on ROCm This adds a fused kernel that quantizes bf16 activations in-register during the GEMM, eliminating the separate mxfp8_e4m3_quantize kernel launch for small M (M≤16) on gfx950 (MI355X). Key changes: - Added _mxfp8_fused_quant_linear_kernel: Fused quantization + dot_scaled kernel - Added _mxfp8_fused_quant_dot_scaled_linear: Host function to launch fused kernel - Modified RocmDotScaledMxfp8LinearKernel.apply_weights to use fused kernel for M≤16, K≤1024 (and M≤4, K=2048) - Disabled under VLLM_BATCH_INVARIANT - Added test_rocm_mxfp8_fused_act_quant_bitwise_eq_unfused for bitwise validation - Added test for VLLM_BATCH_INVARIANT disable behavior Performance targets (from issue): - 1.14x–1.64x speedup for K≤1024 at M=1–16 - 1.03x–1.27x for K=2048 at M=1–4 - bf16 only (fp16 triggers FP16 overflow clamp)
YuvrajSinghBhadoria2
requested review from
AndreasKaratzas,
ApostaC,
TheEpicDolphin,
WoosukKwon,
ZJY0516,
aarnphm,
alexm-redhat,
arpera,
benchislett,
dllehr-amd,
heheda12345,
ivanium,
mgoin,
njhill,
orozery,
robertgshaw2-redhat,
shen-shanshan,
tjtanaa,
yewentao256 and
ywang96
as code owners
October 27, 2026 06:51
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Contributor
Author
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.
This PR fuses MXFP8 activation quantization into the ROCm
dot_scaledGEMM kernel for M≤16 on gfx950 (MI355X).Key changes:
mxfp8_e4m3_quantizekernel launch by quantizing bf16 activations in-register during GEMMQUANT_ROWS = min(16, next_pow2(M))rows per K-tile, repeated to fill 16-row MFMA tilePerformance (MI355X):
Constraints:
VLLM_BATCH_INVARIANTtest_rocm_mxfp8_fused_act_quant_bitwise_eq_unfusedThe optimization targets small-batch decode where separate quant launch overhead dominates.
Closes #63915