Repository navigation
[DO NOT REVIEW] Add rms_norm_per_block_quant UE8M0 handling for B200 - #40650
Closed
Lucaskabela wants to merge 1 commit into
Closed
Lucaskabela wants to merge 1 commit into
Lucaskabela wants to merge 1 commit into
Conversation
Signed-off-by: Lucas Kabela <lucaskabela@meta.com>
3 of 4 tasks
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for UE8M0 scaling in the rms_norm_per_block_quant kernel and its associated fusion passes. It adds a scale_ue8m0 flag across the C++ kernels, PyTorch bindings, and Python wrappers, implementing power-of-two rounding for scales when enabled. Additionally, the InputQuantFP8 layer is updated to coordinate between packed UE8M0 scales and the norm-quant fusion pass. Feedback was provided regarding the duplication of the scale adjustment logic in layernorm_utils.cuh and the absence of a centralized helper function or constant for the rounding calculation.
Lucaskabela
force-pushed
the
lucaskabela/vllm_b200_ue8m0_fused_attempt
branch
from
April 22, 2026 20:52
362326f to
2c406e6
Compare
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.
Purpose
Draft implementation of fused rms_norm_per_quant
Summary:
Power-of-two rounding extracted into adjust_scale_for_ue8m0 device inline helper with a named
MIN_SCALE_FOR_LOG = 1e-10f constant; both call sites use the helper.
_custom_ops.py).
_skip_packed_for_fusion so fusion can match when fuse_norm_quant is on.
Test Plan
We also run a benchmark of this naive impl (fusion) vs the packed version
Test Result
That is fair - here is the timing result:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.