Skip to content

[Bugfix][Kimi-K3] Fall back from the latent-MoE tail fusion without NVLS multicast - #65664

Open
yeighta wants to merge 1 commit into
vllm-project:mainfrom
yeighta:kimi-k3-tail-fusion-multicast-fallback
Open

yeighta wants to merge 1 commit into
vllm-project:mainfrom
yeighta:kimi-k3-tail-fusion-multicast-fallback

Conversation

@yeighta

@yeighta yeighta commented Nov 4, 2026 •

Copy link
Copy Markdown

Overview

On a TP group without NVLS multicast, Kimi K3 currently fails at startup in the SM100 latent-MoE tail fusion (TP 8/16). With this change it falls back to the default latent-MoE path, as the MiniMax-M3 fused MoE finalize already does. Multi-GPU NVIDIA Confidential Computing is one setup without multicast.

Fixes #65568.

Claims

  • LatentMoERunner now probes multicast on every TP rank and requires all ranks to agree before it builds KimiK3LatentMoETailOp. If any rank lacks multicast, it logs a warning and uses the default path instead of raising routed NVLS multicast mapping is unavailable on every rank.
  • Nothing changes where multicast is available: the probe returns True and the tail fusion is built as before.

Validation

Probe on the affected machine. Intel TDX TD, 8× B300 (SM103), Blackwell multi-GPU CC with nvidia-smi conf-compute -mgm = NVLE, guest driver 595.91.07, torch 2.13.0+cu130 (vllm/vllm-openai:v0.32.0). Both checks return "no multicast" on all 8 GPUs:

0 has_multicast_support False CU_MULTICAST_SUPPORTED 0 rc 0
...
7 has_multicast_support False CU_MULTICAST_SUPPORTED 0 rc 0

These are _SymmetricMemory.has_multicast_support(DeviceType.CUDA, i), the probe used here, and cuDeviceGetAttribute(CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED).

End to end on the same TD. Kimi K3, TP8, vLLM 0.32.0 with this change applied (the vllm/ diff applies cleanly; the TD also carries #59981 for Confidential Computing and a backport of #63989):

Same setup with the V2 model runner, and no env var or flag set:

main (before) this PR
Startup every rank raises RuntimeError: routed NVLS multicast mapping is unavailable (log in #65568) Application startup complete, KV cache 3,704,968 tokens
Tail fusion fails in KimiK3LatentMoETailOp.initialize WARNING [latent_moe_runner.py:120] K3 latent-MoE tail fusion requires NVLS multicast memory on every TP rank, which is unavailable. Falling back to the default path. (logged once, on the local first rank)
8 fixed prompts n/a 8/8 successful, all checked answers correct
vllm bench serve, random 1024/1024, --ignore-eos, c=16 n/a 794 output tok/s, median TPOT 18.4 ms

No Traceback appears in the server log after the prompts and the benchmark.

For reference, at the same benchmark point the default latent-MoE path, with the fusion forced off by a local patch, gave 820 tok/s and a median TPOT of 18.4 ms. That was one run each. The fallback path performs like the default path, which is expected because they are the same path.

Unit test. test_tail_fusion_falls_back_without_multicast makes the tail op raise what the real NVLS rendezvous raises when multicast is unavailable, and makes the device probe report no multicast.

# main with only the test change
$ pytest tests/models/kimi_k3/test_latent_moe_tail.py -k "deferred_finalize_enabled or falls_back"
E           RuntimeError: routed NVLS multicast mapping is unavailable
FAILED tests/models/kimi_k3/test_latent_moe_tail.py::test_tail_fusion_falls_back_without_multicast
1 failed, 1 passed, 3 deselected

# this PR
2 passed, 3 deselected

The Kimi K3 B200 CI step (models/kimi_k3) selects this file. CI cannot cover the multicast-less path end to end, because it needs 8 SM100 GPUs without multicast. The TD run above stands in for that.

Details

Root cause. LatentMoERunner.__init__ enables the tail fusion from the device family and TP size alone. KimiK3LatentMoETailOp.initialize then needs NVLS multicast mappings from torch symmetric memory. When no multicast object can be created, every rank raises routed NVLS multicast mapping is unavailable from allreduce_rmsnorm_reduce_scatter_early_exit.py. Nothing can switch the fusion off, so the model cannot start on such a node.

Under multi-GPU CC (NVLE), the GPUs are connected over NVLink, but the driver reports no multicast support (CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = 0). Other multicast users in vLLM already check for this and fall back: the custom all-reduce MNNVL path and MiniMax-M3's supports_fused_moe_finalize.

Design.

  • This change reuses _has_local_multicast_support and _all_ranks_true from custom_all_reduce.py, the same pair supports_fused_moe_finalize uses. No new probe is added.
  • The check is a collective on the TP CPU group. Every rank reaches it under the same conditions (SM100, fused path, TP 8/16), so the ranks cannot disagree on whether to build the op.
  • It runs once at construction, so steady-state inference gets no extra synchronization.
  • No env override is added. The fallback is chosen from hardware capability alone.

Related PRs.

Limitation. The opt-in latency-specialized decode (decode_backend=latency_specialized) also needs multicast and still raises without it. It is off by default and outside this change.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

@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 kimi k3 bug Something isn't working labels Nov 4, 2026
@yeighta
yeighta force-pushed the kimi-k3-tail-fusion-multicast-fallback branch from 115f21e to 0d8c044 Compare November 4, 2026 13:08
@github-actions

github-actions Bot commented Nov 4, 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. Reviewers with write access and configured trusted contributors can comment /ci run for upstream CI or /amd-ci run for AMD CI only whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use the corresponding /ci run, /ci retry, and /ci cancel commands, or their /amd-ci variants. New commits do not start upstream CI automatically.

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 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @yeighta.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Nov 4, 2026
@yeighta
yeighta force-pushed the kimi-k3-tail-fusion-multicast-fallback branch from 0d8c044 to 9dbc5e8 Compare November 5, 2026 15:45
@mergify mergify Bot removed the needs-rebase label Nov 5, 2026
@mergify

mergify Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @yeighta.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Nov 7, 2026
…VLS multicast

The tail fusion builds NVLS multicast mappings during runner construction.
When multicast is unavailable on the TP group, e.g. with multi-GPU NVIDIA
Confidential Computing, every rank fails at startup with "routed NVLS
multicast mapping is unavailable", and there is no way to turn the fusion
off.

Probe multicast support on every TP rank before initializing the tail op,
as the MiniMax-M3 fused MoE finalize and the custom all-reduce already do,
and take the default latent-MoE path unless all ranks support it.

Fixes vllm-project#65568

Signed-off-by: Yuki Kitaya <72787572+yeighta@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working k3 kimi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Kimi K3 latent-MoE tail fusion fails at startup when NVLS multicast is unavailable (multi-GPU Confidential Computing), and cannot be disabled

1 participant