Repository navigation
Conversation
Quantize eligible concatenated activations once before splitting them into per-expert tensors, reducing repeated kernel launches and setup overhead. Preserve independent per-expert scale padding and retain the existing path for unsupported layouts, quantization options, and allocation requirements. Add exact regression tests covering payloads, scales, uneven and empty splits, CUDA graph replay, fallback dispatch, and GroupedLinear forward and backward computation. Signed-off-by: Maxim Milakov <maxim.milakov@gmail.com>
milakov
marked this pull request as ready for review
November 3, 2026 13:01
Contributor
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryAdds a guarded fast path that quantizes eligible row-scaled NVFP4 activations once, then splits their packed values and scale data by expert.
No actionable issues were found. Tests were inspected but not run during this review. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Split quantization request] --> B{Eligible row-scaled NVFP4?}
B -->|No| C[Existing dispatch]
B -->|Yes, bulk allocation allowed| D[Quantize concatenated input once]
D --> E[Split packed values and row amax]
D --> F[Split scales with separate expert padding]
E --> G[Per-expert storage]
F --> G
Reviews (1) · Last reviewed commit: "Reduce NVFP4 activation quantization ove..." · Reviewed by Greptile |
This branch has not been deployed
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.
Description
Row-scaled NVFP4 activations currently go through per-expert quantization in the split path. Quantize eligible concatenated activations once, then partition their payloads and row-scale metadata into per-expert storage to reduce repeated kernel launches and setup overhead.
In the tested B300 split-quantization microbenchmarks, median synchronized operation latency decreased by 1.3–62.3%, depending on expert count, width, and split alignment. MXFP8 controls stayed within 1% of baseline. These are operation-level measurements, not full-model iteration timings.
Type of change
Changes
This change is independent of #3799.
Validation
Validation results below were recorded against base
63451d6:The baseline failures concern MXFP8 signed-zero comparisons and FlexAttention/cuDNN Frontend tests.
Merge compatibility was checked against upstream main at
b021980; none of the five changed files has intervening upstream changes.Checklist