Uh oh!
There was an error while loading. Please reload this page.
Add support for fused Q Up-Proj GEMM/RoPE/Quant. - #3303
Conversation
Greptile SummaryThe PR introduces a Blackwell-targeted fused MLA Q up-projection, RoPE, and MXFP8 quantization path and integrates its pre-quantized output with fused attention.
Confidence Score: 5/5The PR appears safe to merge based on the eligible follow-up findings available in this review. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant Model
participant Fusion as Fused MLA Q Up-Proj
participant Quant as MXFP8 Layout Preparation
participant DPA as DotProductAttention
participant cuDNN as cuDNN Fused Attention
Model->>Fusion: Q-LORA activation, weight, cos, sin
Fusion->>Fusion: GEMM + per-head RoPE + MXFP8 quantization
Fusion-->>Quant: Quantized Q and saved activation
Model->>Quant: K and V
Quant->>Quant: Quantize and transpose/swizzle scales
Quant->>DPA: Pre-quantized Q, K, V
DPA->>cuDNN: MXFP8 fused-attention request
cuDNN-->>DPA: Attention output
DPA-->>Model: Output and backward gradients
Reviews (11): Last reviewed commit: "Merge branch 'main' into qrope_fusion" | Re-trigger Greptile |
sudhakarsingh27
left a comment
There was a problem hiding this comment.
- Commented feedback inline
- Pls fix DCA here and in the other PR
- Also, I wonder if you've measured perf for
mxfp8_quantize_onlyand its swizzle counterpart. I feel they could be further optimized as I see a lot of for loops.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This commit add support for fusing the GEMM in the Q Up Proj step of DeepseekV3 training with the following RoPE and MXFP8 quantization operations. This uses a custom kernel from cudnn_frontend, and supports both 16-bit projection and mxfp8 projection. Signed-off-by: Chase Block <cblock@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Chase Block <cblock@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Chase Block <cblock@nvidia.com>
This commit adds support for fusing the q up proj gemm with the following rope and mxfp8 quantization operations. Relies on the TE functionality from NVIDIA/TransformerEngine#3303 Signed-off-by: Chase Block <cblock@nvidia.com>
chaseblock
commented
Aug 5, 2026
Addressed inline feedback. DCA fixed. I haven't explicitly modeled the perf of these two functions, but they were essentially extracted from the existing |
sraman-rgb
commented
Aug 5, 2026
/te-ci pytorch |
mxfp8_quantize_fast_path. Signed-off-by: Chase Block <cblock@nvidia.com>
Signed-off-by: Chase Block <cblock@nvidia.com>
Signed-off-by: Chase Block <cblock@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Chase Block <cblock@nvidia.com>
for more information, see https://pre-commit.ci
Signed-off-by: Chase Block <cblock@nvidia.com>
for more information, see https://pre-commit.ci
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
These tests really belong in Megatron. Signed-off-by: Chase Block <cblock@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
This PR adds support for fusing the GEMM in the Q Up Proj step of DeepseekV3 training with the following RoPE and MXFP8 quantization operations. This uses a custom kernel from cudnn_frontend, and supports both 16-bit projection and mxfp8 projection.
Type of change
Checklist: