[Common] Use wide instructions in SR to reduce issue-bound bottleneck - #3357
Open
janekb04 wants to merge 2 commits into
Open
[Common] Use wide instructions in SR to reduce issue-bound bottleneck#3357janekb04 wants to merge 2 commits into
janekb04 wants to merge 2 commits into
Conversation
Signed-off-by: Jan Bielak <jbielak@nvidia.com>
janekb04
marked this pull request as ready for review
August 15, 2026 01:36
Collaborator
Author
|
@Oleg-Goncharov @ksivaman, I think you might be interested in reviewing. |
Contributor
Greptile SummaryThe PR optimizes NVFP4 stochastic rounding by reducing the instruction count while preserving the existing arithmetic.
Confidence Score: 5/5The PR appears safe to merge, with no concrete correctness, compatibility, or security failures identified. The new wide PTX operations preserve the prior arithmetic, and the packed floating-point instruction is limited to compatible architecture-specific paths. Important Files Changed
Reviews (1): Last reviewed commit: "Merge branch 'main' into wide_instructio..." | 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
Optimizes the performance of stochastic rounding kernel by using wider instructions.
A simple benchmark shows a 4-10% throughput improvement on a B200 for the NVFP4 specialized 1D quantization kernel in SR mode. The SR kernel is issue-bound, so using fewer, wider instructions, improves performance.
Type of change
Changes
Please list the changes introduced in this PR:
mul.wide.u32is used explicitly, as I noticed, while working on [Common] Experimental CuTeDSL MXFP4 backend #3223 that the multiply and add would not get automatically fused into an FMA.mul_cvt_bf16_to_fp4_8x_stochastic_rounding, usemul.f32x2to halve the number ofmulinstructions.Checklist:
Raw results