Skip to content

fix(dist): remove in-function import from traced fused_allreduce_rmsnorm_quant - #4066

Merged
zhuyuhua-v merged 5 commits into
mainfrom
fix-fused-ar-rmsnorm-quant-traced-import
Jul 3, 2026
Merged

zhuyuhua-v merged 5 commits into
mainfrom
fix-fused-ar-rmsnorm-quant-traced-import

Conversation

@gbyu-amd

@gbyu-amd gbyu-amd commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

gbyu-amd and others added 2 commits July 2, 2026 14:52
…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]>
@gbyu-amd
gbyu-amd requested a review from a team July 2, 2026 15:34
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 4066 --add-label <label>

@zhuyuhua-v
zhuyuhua-v merged commit e1a06db into main Jul 3, 2026
42 checks passed
@zhuyuhua-v
zhuyuhua-v deleted the fix-fused-ar-rmsnorm-quant-traced-import branch July 3, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants