Skip to content

[ROCm][Bugfix] Use TCP store when AITER custom all-reduce is enabled - #51635

Merged
tjtanaa merged 3 commits into
vllm-project:mainfrom
EmbeddedLLM:fix/rocm-aiter-tcp-store
Aug 10, 2026
Merged

tjtanaa merged 3 commits into
vllm-project:mainfrom
EmbeddedLLM:fix/rocm-aiter-tcp-store

Conversation

@vllmellm

@vllmellm vllmellm commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

#50999 switched single-node executors from TCP to file:// rendezvous to eliminate startup port races. On ROCm with AITER custom all-reduce enabled, that broke every server start at worker init:

AssertionError: IPC metadata exchange requires a pure-TCP KV store (torch.distributed.TCPStore), got FileStore.

AITER's custom all-reduce asserts the default store is a TCPStore (aiter/dist/device_communicators/custom_all_reduce.py); file:// rendezvous produces a FileStore. AITER hasn't accepted FileStore upstream, so until it does, keep the pre-#50999 TCP rendezvous for exactly that configuration.

So, as a stopgap, add a check if it's ROCM and AITER custom all_reduce is opted. It will revert the behavior to using the TCP store instead of the FileStore

Test Plan

Test Result


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.

…eStore

Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
@vllmellm
vllmellm requested a review from njhill as a code owner August 10, 2026 07:48

@claude claude Bot left a comment

Copy link
Copy Markdown

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 rocm Related to AMD ROCm bug Something isn't working labels Aug 10, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Aug 10, 2026
distributed_init_method = get_file_store_init_method()
if aiter_requires_tcp_store():
distributed_init_method = get_distributed_init_method(
get_ip(), get_open_port()

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.

Severity: LOW

The TCP store is bound to the machine's external network IP (get_ip()) instead of the loopback address. For a single-process executor no remote workers need to connect, yet this exposes an unauthenticated, unencrypted PyTorch TCPStore on the network. The multiproc_executor.py correctly uses get_loopback_ip() for the same purpose. Per the project's own docs/usage/security.md, PyTorch distributed features accept connections from anywhere without authorization.
Helpful? Add 👍 / 👎

💡 Fix Suggestion

Suggestion: Replace get_ip() with get_loopback_ip() on line 81 to bind the TCP store to the loopback address instead of the external network IP, matching the pattern used in multiproc_executor.py. Additionally, update the import statement at line 19: change get_ip to get_loopback_ip in the import from vllm.utils.network_utils.

⚠️ Experimental Feature: This code suggestion is automatically generated. Please review carefully.

Suggested change
get_ip(), get_open_port()
get_loopback_ip(), get_open_port()

Comment thread vllm/utils/network_utils.py Outdated
``FileStore`` and trips that assertion. Prefer the TCP rendezvous
(pre-#50999) for ROCm + AITER custom AR until AITER accepts FileStore.
"""
import vllm.envs as envs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

def aiter_requires_tcp_store() -> bool:
    from vllm._aiter_ops import rocm_aiter_ops

    return rocm_aiter_ops.is_custom_all_reduce_enabled()

Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
@tjtanaa tjtanaa added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 10, 2026
@tjtanaa
tjtanaa enabled auto-merge (squash) August 10, 2026 09:21
@github-actions

Copy link
Copy Markdown

@vllmellm, CI is now available for this PR.

  • /ci run starts a CI build.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.

@tjtanaa

tjtanaa commented Aug 10, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83119 for commit 67cc5c0ec267.

@tjtanaa

tjtanaa commented Aug 10, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83123 for commit e49e58b0dc70.

@tjtanaa
tjtanaa merged commit 436be94 into vllm-project:main Aug 10, 2026
86 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Aug 10, 2026
@stefankoncarevic

Copy link
Copy Markdown
Contributor

Filed the upstream ask on the AITER side so this special case can eventually be removed:
ROCm/aiter#4658

@jiacao-amd

Copy link
Copy Markdown
Contributor

Post-merge validation: DeepSeek-V4-Pro, MI355X TP=8, 8k/1k

Ran an end-to-end sweep with this change on a DSv4-Pro serving workload, since it exercises the exact path the fix targets — VLLM_ROCM_USE_AITER=1 with AITER custom all-reduce enabled (disable_custom_all_reduce=False, and module_custom_all_reduce.so confirmed loaded on all 8 workers), so aiter_requires_tcp_store() returns True and the TCP rendezvous is used.

Setup

Image vllm/vllm-openai-rocm:nightly (0.26.1rc1.dev542+gb22afe45a) + this PR cherry-picked
Hardware 8x MI355X (gfx950), NPS1/SPX
Model DeepSeek-V4-Pro (FP4 experts, FP8 attention, FP8 KV cache)
Parallelism TP=8, EP=1
Workload ISL 8192 / OSL 1024, random-range-ratio=0, 10 prompts per concurrency slot
Graph mode mode=3, FULL_AND_PIECEWISE

The nightly did not yet contain this commit, so it was applied on top (clean, 3 files, no rejects).

Results

Concurrency Req/s Output tok/s Total tok/s TTFT med TTFT p99 TPOT med TPOT p99 E2EL med
8 0.54 284.79 2583.76 344 ms 2864 ms 24.67 ms 45.34 ms 16.6 s
16 0.90 483.69 4152.92 321 ms 3458 ms 29.32 ms 63.97 ms 17.1 s
32 1.41 708.51 6455.29 348 ms 7112 ms 40.78 ms 85.54 ms 20.9 s

Throughput scales 1.00x / 1.70x / 2.49x against 2x / 4x concurrency, with TPOT degrading gracefully (24.7 → 40.8 ms median) — the expected shape for a decode-bound 8k/1k workload.

Startup / stability

No TCPStore/FileStore assertion at init, which is the failure this PR fixes; all three servers came up cleanly and stayed up for the whole sweep (no engine-core death, no restarts).

Two notes, neither attributable to this change:

  • c32 completed 318/320. The two misses returned zero output tokens; the other 318 all reached the full 1024. c8 and c16 were 80/80 and 160/160.
  • One failed to execute: .../clang++ ... -mllvm -amdgpu-coerce-illegal-types=1 is not supported by hipcc during AITER JIT of the sampler kernel. It self-retries and the build succeeds (finish build ... cost 13.8s); cosmetic, and present regardless of this PR.

Raw benchmark_serving JSON + server logs available if useful.

avininjamay8 added a commit to avininjamay8/vllm that referenced this pull request Aug 12, 2026
vLLM vllm-project#51635 restores TCPStore when AITER custom all-reduce is enabled,
so the workaround is no longer needed on nightly (validated in spur job 4357).

Co-authored-by: Cursor <cursoragent@cursor.com>
avininjamay8 added a commit to avininjamay8/vllm that referenced this pull request Aug 12, 2026
vLLM vllm-project#51635 restores TCPStore when AITER custom all-reduce is enabled,
so the workaround is no longer needed on nightly (validated in spur job 4357).

Co-authored-by: Cursor <cursoragent@cursor.com>
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
…llm-project#51635)

Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Co-authored-by: tjtanaa <tunjian.tan@embeddedllm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

4 participants