[Common/PyTorch] Fused grouped MXFP8 requantization - #3359
Open
YangFei1990 wants to merge 5 commits into
Open
Conversation
Replace the group_dequantize -> group_quantize(columnwise) -> grouped_swizzle(rowwise scales) chain in group_requantize_inplace with a single kernel (NVTE_FUSED_GROUP_REQUANTIZE=0 restores the unfused path). Co-authored-by: Oleg Goncharov <ogoncharov@nvidia.com> Signed-off-by: YangFei1990 <feiw@nvidia.com>
YangFei1990
requested review from
Oleg-Goncharov,
ksivaman and
ptrendx
as code owners
August 12, 2026 22:16
Contributor
Greptile SummaryThis PR adds a Blackwell-only fused path for converting rowwise grouped MXFP8 tensors into GEMM-ready rowwise and columnwise representations, while retaining the existing unfused path behind an environment-variable fallback.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the provided follow-up-review scope. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Rowwise grouped MXFP8 input] --> B{Fused path supported?}
B -->|Yes| C[Fused grouped requantization kernel]
C --> D[Swizzled rowwise scales]
C --> E[Columnwise E4M3 data and scales]
C --> F[Optional BF16 output]
B -->|No or disabled| G[Existing dequantize, quantize, and swizzle chain]
G --> D
G --> E
G --> F
Reviews (2): Last reviewed commit: "Merge branch 'fused_group_requantize' of..." | Re-trigger Greptile |
Signed-off-by: YangFei1990 <feiw@nvidia.com>
…90/TransformerEngine into fused_group_requantize
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
Replace the group_dequantize -> group_quantize(columnwise) -> grouped_swizzle(rowwise scales) chain in group_requantize_inplace with a single kernel (NVTE_FUSED_GROUP_REQUANTIZE=0 restores the unfused path).
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: