Skip to content

[Bugfix] Disable custom all-reduce on consumer Blackwell (sm_12x)#47751

Open
NicholausAShupe wants to merge 1 commit into
vllm-project:mainfrom
NicholausAShupe:fix/disable-custom-all-reduce-sm12x
Open

[Bugfix] Disable custom all-reduce on consumer Blackwell (sm_12x)#47751
NicholausAShupe wants to merge 1 commit into
vllm-project:mainfrom
NicholausAShupe:fix/disable-custom-all-reduce-sm12x

Conversation

@NicholausAShupe

Copy link
Copy Markdown

Purpose

Auto-disable vLLM's custom all-reduce on consumer Blackwell (sm_12x) and fall back to NCCL all-reduce.

The custom all-reduce CUDA kernels are only built and tuned for sm_90 / sm_100 (see CUSTOM_ALL_REDUCE_MAX_SIZES, which lists 9.0/10.0/10.3 but no 12.x). On consumer Blackwell (sm_120 / sm_121 — RTX PRO 6000, RTX 50-series, GB10/DGX Spark) the kernel's IPC / peer-mapping path aborts with custom_all_reduce.cuh:455 'invalid argument' during cudagraph capture, killing the TP worker.

The existing topology guards don't catch this: they only disable custom all-reduce for more than two PCIe-only GPUs, so a 2-GPU tensor-parallel setup passes the checks, enables the kernel, and then crashes at capture. Today users must pass --disable-custom-all-reduce manually.

This gates on the whole 12.x family via the existing current_platform.is_device_capability_family(120) helper (extracted into CustomAllreduce._is_unsupported_arch() for testability). sm_100 (datacenter Blackwell), Hopper, Ada, and Ampere are unaffected.

Fixes the "Issue 9a — Custom all-reduce kernel crash" blocker reported in #47266. (That report also lists 9b/9c as further, independent cudagraph-capture blockers on sm_120; this PR addresses 9a only.)

Test Plan

  • Unit test (no GPU required): pytest tests/distributed/test_custom_all_reduce.py -k is_unsupported_arch — asserts the sm_12x family is disabled, other CUDA archs stay enabled, and non-CUDA platforms are not gated.
  • End-to-end on 2× RTX PRO 6000 (sm_120), TP=2, without --disable-custom-all-reduce:
    vllm serve <model> --tensor-parallel-size 2 and confirm the warning fires, FULL cudagraph capture completes without the custom_all_reduce.cuh:455 crash, and the server serves.

Test Result

  • ruff check / ruff format clean (v0.14.0, repo config); mypy (3.10 and 3.12) pass.
  • Unit test: 3/3 pass.
  • End-to-end (2× RTX PRO 6000, sm_120, TP=2, no manual flag; disable_custom_all_reduce=False in engine config):
    • Warning fired on both TP workers: Custom allreduce is disabled because it is not supported on consumer Blackwell (sm_12x ...); falling back to NCCL all-reduce.
    • Capturing CUDA graphs (mixed prefill-decode, PIECEWISE) and (decode, FULL) both completed; Graph capturing finishedno custom_all_reduce.cuh:455 crash (the failure this PR fixes).
    • Application startup complete; /health → 200; a /v1/completions request returned a correct response over the NCCL fallback path.

Notes

The custom all-reduce CUDA kernels are only built and tuned for sm_90 and
sm_100 (see CUSTOM_ALL_REDUCE_MAX_SIZES, which lists 9.0/10.0/10.3 but no
12.x). On consumer Blackwell (sm_120 / sm_121, e.g. RTX PRO 6000 and the
RTX 50-series) the kernel's IPC / peer-mapping path aborts with
`custom_all_reduce.cuh 'invalid argument'` during cudagraph capture,
killing the TP worker.

The existing topology guards do not catch this: they only disable custom
all-reduce for more than two PCIe-only GPUs, so a 2-GPU tensor-parallel
setup passes the checks, enables the kernel, and then crashes at capture.

Disable custom all-reduce for the whole sm_12x family via
current_platform.is_device_capability_family(120) (extracted into
CustomAllreduce._is_unsupported_arch for testability) and fall back to
NCCL all-reduce, so users no longer have to pass
disable_custom_all_reduce=True manually. The early return leaves the
communicator in its default-disabled state (self.disabled = True) before
any buffer allocation or ops.init_custom_ar call.

Add a unit test covering the sm_12x family (disabled), other CUDA archs
(enabled), and non-CUDA platforms (not gated).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Nicholaus Shupe <nicshupe@glpwd.com>

@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.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify mergify Bot added the bug Something isn't working label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant