[common] Improved performance of Group MXFP8 kernels - #3337
Open
Oleg-Goncharov wants to merge 2 commits into
Open
[common] Improved performance of Group MXFP8 kernels#3337Oleg-Goncharov wants to merge 2 commits into
Oleg-Goncharov wants to merge 2 commits into
Conversation
Signed-off-by: Oleg Goncharov <ogoncharov@nvidia.com>
for more information, see https://pre-commit.ci
Contributor
Greptile SummaryThe PR restructures grouped MXFP8 quantization around layout-specific launch configurations and multi-stage chunk processing.
Confidence Score: 5/5The PR appears safe to merge because no concrete changed-code failure remains after checking mapping boundaries, graph-safe capacity, descriptor usage, and reachable dBias configurations. The new schedulers keep accesses within capacity-sized buffers, the reachable multi-stage paths preserve tensor and workspace ownership, and the suspected shared-descriptor concurrency issue was not introduced or materially worsened by this change. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Grouped MXFP8 request] --> B{Shape representation}
B -->|SAME_BOTH_DIMS| C[Direct tensor-local CTA mapping]
B -->|VARYING_FIRST_DIM| D[Direct vertically stacked CTA mapping]
B -->|VARYING_LAST_DIM| E[Update per-tensor TMA descriptors and metadata]
B -->|VARYING_BOTH_DIMS| E
E --> F[Per-tensor persistent scheduling]
C --> G[Process 32x128 stages]
D --> G
F --> G
G --> H[Write quantized outputs and scales]
H --> I{dBias enabled?}
I -->|Yes| J[Write workspace and reduce]
I -->|No| K[Complete]
J --> K
Reviews (1): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
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
This PR optimizes grouped MXFP8 quantization by introducing layout-specific kernel configurations and work scheduling strategies.
Groups with uniform shapes or a common last dimension use direct CTA-to-chunk mapping, while layouts requiring per-tensor TMA descriptors use per-tensor persistent scheduling. The kernel processes larger chunks through multiple stages, reducing scheduling and tensor-mapping overhead for large grouped workloads.
The change also ensures that dynamically updated TMA descriptors are acquired before use, handles graph-safe logical capacity without out-of-bounds accesses, and preserves correct dBias workspace behavior across multi-chunk execution.
Type of change
Changes
SAME_BOTH_DIMSandVARYING_FIRST_DIMlayouts.VARYING_LAST_DIMandVARYING_BOTH_DIMSlayouts.128x128and128x256chunks through multiple X/Y stages.Runtime Speedup Factor on GB300
Checklist: