Skip to content

[ROCm] Disable AITER allreduce fusion#41866

Closed
jpvillam-amd wants to merge 4 commits intovllm-project:mainfrom
ROCm:jpvillam/disable-rs-fusion
Closed

[ROCm] Disable AITER allreduce fusion#41866
jpvillam-amd wants to merge 4 commits intovllm-project:mainfrom
ROCm:jpvillam/disable-rs-fusion

Conversation

@jpvillam-amd
Copy link
Copy Markdown
Contributor

@jpvillam-amd jpvillam-amd commented May 6, 2026

Subset of #41816

Singular fix to disable aiter all reduce fusion pass

Purpose

RocmAiterAllReduceFusionPass is currently causing accuracy issues, disable until its fixed

Test Plan

Tested with DeepSeek FP4 and Llama

Test Result

Recovered accuracy after the change

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: jpvillam <juan.villamizar@amd.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the rocm Related to AMD ROCm label May 6, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD May 6, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the PassManager to simplify the inclusion of the AllReduceFusionPass. Feedback indicates that AllReduceFusionPass is NVIDIA-specific and its usage should be guarded to prevent issues on ROCm platforms. Additionally, the reviewer suggested removing the now-unused RocmAiterAllReduceFusionPass import.

Comment thread vllm/compilation/passes/pass_manager.py Outdated
Comment on lines +21 to +22
if rocm_aiter_ops.is_enabled() or current_platform.is_cuda():
from .fusion.allreduce_rms_fusion import AllReduceFusionPass
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The AllReduceFusionPass is an NVIDIA-specific optimization that relies on FlashInfer. Including rocm_aiter_ops.is_enabled() in this import condition is misleading and unnecessary if the usage is properly guarded. It should remain restricted to CUDA platforms to avoid confusing initialization warnings on ROCm. Additionally, since RocmAiterAllReduceFusionPass is no longer used in this file, its import (lines 24-27) should also be removed.

Suggested change
if rocm_aiter_ops.is_enabled() or current_platform.is_cuda():
from .fusion.allreduce_rms_fusion import AllReduceFusionPass
if current_platform.is_cuda():
from .fusion.allreduce_rms_fusion import AllReduceFusionPass

Comment thread vllm/compilation/passes/pass_manager.py
Signed-off-by: jpvillam <juan.villamizar@amd.com>
@gshtras gshtras enabled auto-merge (squash) May 6, 2026 20:21
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label May 6, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 6, 2026

Hi @jpvillam-amd, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: jpvillam <juan.villamizar@amd.com>
auto-merge was automatically disabled May 6, 2026 20:39

Head branch was pushed to by a user without write access

@gshtras gshtras enabled auto-merge (squash) May 6, 2026 20:52
self.passes += [AsyncTPPass(config)]

if self.pass_config.fuse_allreduce_rms:
if rocm_aiter_ops.is_enabled():
Copy link
Copy Markdown
Collaborator

@tjtanaa tjtanaa May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpvillam-amd @gshtras may I know what is the reason to disable all reduce fusion when we can control through python argument by setting --compilation_config.pass_config.fuse_allreduce_rms=false

Copy link
Copy Markdown
Collaborator

@tjtanaa tjtanaa May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it is preferred to not remove the path completely as it was working with older aiter version, and we should should disable else where and add a TODO to fix it.

@tjtanaa
Copy link
Copy Markdown
Collaborator

tjtanaa commented May 7, 2026

@jpvillam-amd which aiter version are you using? During the integration of the kernel, the rmsnorm all reduce fusion pass doesn't seem to be enabled by default. Can you share your vllm serve commands?

If you are using -O2 / -O3 then we should update the list

https://github.com/vllm-project/vllm/blob/d4b00484040c9a0bbd4ee2d55983df7a50ab1fd3/vllm/config/vllm.py#L217-238

https://github.com/vllm-project/vllm/blob/d4b00484040c9a0bbd4ee2d55983df7a50ab1fd3/vllm/config/vllm.py#L239-258
to not use it unless user explicitly set the rmsnorm all reduce fusion

@akii96
Copy link
Copy Markdown
Contributor

akii96 commented May 7, 2026

Hi! I made a new PR which does not require disabling the fusion if someone wants to check it (it was a simple one liner fix) Check #41972

@gshtras
Copy link
Copy Markdown
Collaborator

gshtras commented May 7, 2026

Closing for #41972

@gshtras gshtras closed this May 7, 2026
auto-merge was automatically disabled May 7, 2026 15:40

Pull request was closed

@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants