Repository navigation
fix(dist): remove in-function import from traced fused_allreduce_rmsnorm_quant - #4066
Merged
Merged
Conversation
…orm_quant The in-function import of _normalize_fused_ar_rms_quant_type inside GroupCoordinator.fused_allreduce_rmsnorm_quant (added in #3981) causes a TorchDynamo graph break for every input when the method is traced under @support_torch_compile (surfaces as 'VllmBackend can only be called once' on the ATOM-native DeepSeek path). quant_type already arrives canonicalized to a string from the public API (_canonical_fused_ar_rms_quant_type) and from the mxfp4 helper, so the inline normalization is redundant; the device path re-normalizes anyway. Removing it eliminates the graph break (0 breaks, server startup completes). Co-Authored-By: Claude Opus 4.8 <[email protected]>
…lreduce_rmsnorm_quant Same latent graph break as the parallel_state.py fix: the in-function import of _normalize_fused_ar_rms_quant_type inside CudaCommunicator.fused_allreduce_rmsnorm_quant graph-breaks TorchDynamo when the method is traced (reachable via the mxfp4 / emit_bf16 / non-128 per-token paths from GroupCoordinator). quant_type already arrives canonicalized to a string from the public API, and both in-tree callers pass a canonical string (parallel_state.py:641 forwards it; _fused_allreduce_rmsnorm_quant_out_place uses the per_token default), so the normalization here is redundant. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
1 task
valarLip
approved these changes
Jul 3, 2026
valarLip
approved these changes
Jul 3, 2026
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.
Motivation
#3981 added the inline import at https://github.com/ROCm/aiter/blob/main/aiter/dist/parallel_state.py#L627-L631, which will trigger import error after unify the api in #4039.
The inline import is not needed as quant_type has already canonicalized to a string in the unified API.
Technical Details
Test Plan
Test Result
Submission Checklist