Skip to content

[Compile] Remove torch.compile-based sequence parallelism and AsyncTP - #60517

Merged
WoosukKwon merged 3 commits into
mainfrom
woosuk/rm-compile-sp
Oct 8, 2026
Merged

WoosukKwon merged 3 commits into
mainfrom
woosuk/rm-compile-sp

Conversation

@WoosukKwon

@WoosukKwon WoosukKwon commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Remove the torch.compile-based sequence parallelism pass (SequenceParallelismPass) and the AsyncTP pass (AsyncTPPass) that is built on top of it. This feature is not supported in Model Runner V2, and we are reducing our reliance on torch.compile. Manual (model-level) sequence parallelism under vllm/models/ is unaffected.

Supersedes open work that extends compile-based SP/AsyncTP: #36851, #37489, #38151.

Claims

  • Deletes vllm/compilation/passes/fusion/sequence_parallelism.py and collective_fusion.py (AsyncTP only ever ran after the SP rewrite, so without SP it matches nothing).
  • Removes PassConfig.enable_sp, fuse_gemm_comms, and sp_min_token_num, plus all SP-only plumbing:
    • config: O2/O3 defaults, SP auto-enable and threshold, the SP compile-range endpoint, forced splitting_ops=[]/FULL cudagraph, TP-divisible cudagraph capture sizes, the batch-invariance override, and the MRV2 unsupported-feature entry;
    • MRV1 runner/worker: padding num_tokens to a multiple of TP, is_residual_scattered_for_sp, and the residual all-gather on PP send/recv;
    • resolve_cudagraph_mode_and_sizes / adjust_cudagraph_sizes_for_spec_decode drop their now-unused tensor_parallel_size argument;
    • unused FlashInfer *_mm_out helpers that only AsyncTP used.
  • Deletes the SP/AsyncTP tests and their CI steps; updates docs (fusions.md, cuda_graphs.md, vllm_ir.md, batch_invariance.md).
  • Net: +33 / −4798 lines across 34 files.

Validation

  • pre-commit (ruff, mypy, etc.) passes.
  • E2E: Qwen/Qwen3-0.6B with TP=2, PP=2 generates correctly on both MRV1 (VLLM_USE_V2_MODEL_RUNNER=0) and the default runner, covering the edited PP send/recv and intermediate-tensor paths.
  • Unit tests (GB200):
    • tests/test_config.py, tests/v1/worker/test_gpu_worker.py, tests/model_executor/test_routed_experts_capture.py, tests/distributed/test_comm_ops.py: all pass.
    • tests/compile/test_config.py: all pass except 9 cudagraph capture-size tests, which fail the same way on main on this machine (unrelated).
    • Manual-SP suites still pass: tests/models/{kimi_k3,deepseek_v32,glm5next}/test_sequence_parallel.py and tests/distributed/test_custom_all_gather_reduce_scatter.py (30 passed, 1 skipped).
  • No model eval: the feature was off by default (IS_DENSE = False), so the default execution path is unchanged.

Details

  • Breaking config change: PassConfig forbids extra fields, so passing enable_sp, fuse_gemm_comms, or sp_min_token_num now raises a validation error instead of being silently ignored. These were opt-in, off by default, and unsupported on MRV2.
  • Kept on purpose: the generic all_gather_tensors option on GroupCoordinator.{send,isend,recv,irecv}_tensor_dict. Nothing passes it after this PR, but a future model that combines manual SP with PP may need it. Today, every manual-SP model gates SP on pipeline_parallel_size == 1 (or has PP disabled), so no sharded tensors cross PP stages.
  • The vllm.reduce_scatter / vllm.all_gather custom ops, compile ranges, use_inductor_graph_partition, and the attention-fusion splitting_ops logic stay, because other passes and models still use them.

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.

🤖 Generated with Claude Code

Remove the SequenceParallelismPass and the AsyncTPPass built on top of it,
along with the PassConfig flags (enable_sp, fuse_gemm_comms,
sp_min_token_num) and the model-runner/worker/config plumbing that only
existed to support them. The feature is not supported in Model Runner V2,
and we are reducing reliance on torch.compile. Manual (model-level)
sequence parallelism under vllm/models/ is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>

@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 repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@mergify

mergify Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--60517.org.readthedocs.build/en/60517/

@mergify mergify Bot added documentation Improvements or additions to documentation ci/build nvidia intel-gpu Related to Intel GPU labels Oct 8, 2026
@mergify mergify Bot added mrv2 Model Runner V2 specific torch.compile labels Oct 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon WoosukKwon added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 8, 2026
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

❌ This PR is 6 commits behind upstream main. Your branch must contain every commit currently on upstream main. No new CI build was started. Merge or rebase onto the latest main, then rerun /ci run. To test this branch at your own risk, use /ci run --allow-stale.

@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #93485 for commit 62841aca999b.

@vllm-agent

Copy link
Copy Markdown
Contributor

CI selector (shadow): 156 test steps (220 jobs) instead of 96 (122 jobs)

Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works.

Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.

steps (jobs) Today's rules Selector Would skip Would add
NVIDIA, CPU and others 96 (122) 156 (220) 13 (19) 73 (117)
AMD mirrors 86 (116) 137 (185) 8 (11) 59 (80)
Selector would run (156)
  • amd-kernels-mi355
  • amd-lm-eval-small-models-harness
  • amd-qwen3-next-mtp-async-eplb-accuracy
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • basic-models-test-other-cpu
  • basic-models-tests-extra-initialization ×14
  • basic-models-tests-other
  • batch-invariance-b200
  • batch-invariance-h100
  • benchmarks-cli-test
  • cpu-language-generation-and-pooling-model-tests ×3
  • cpu-multimodal-config
  • cpu-params-env-tokenizers-parser
  • cpu-reasoning-renderers
  • cpu-spec-decode-tests
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • cudagraph
  • distributed-comm-ops
  • distributed-compile-comm-4-gpus
  • distributed-compile-rpc-tests-2-gpus
  • distributed-compile-unit-tests-2xh100
  • distributed-dp-tests-2-gpus
  • distributed-dp-tests-4-gpus
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus
  • distributed-model-tests-2-gpus ×3
  • distributed-mooncakeconnector-pd-accuracy-4-gpus
  • distributed-nixlconnector-pd-accuracy-4-gpus
  • distributed-tests-8xh100
  • distributed-torchrun-examples-4-gpus
  • distributed-torchrun-shutdown-tests-2-gpus
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • e2e-core-1-gpu
  • e2e-core-large-memory
  • e2e-scheduling-1-gpu
  • e2e-scheduling-accuracy-1-gpu
  • elastic-ep-scaling-test
  • engine
  • engine-1-gpu
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-integration-speech_to_text
  • entrypoints-unit-tests
  • examples
  • extract-hidden-states-integration
  • extract-hidden-states-integration-2-gpus
  • fault-tolerance-e2e-2xh100
  • fusion-and-compile-unit-tests-2xb200
  • fusion-e2e-config-sweep-h100
  • fusion-e2e-quick-h100
  • fusion-e2e-tp2-ar-rms-config-sweep-h100
  • fusion-e2e-tp2-ar-rms-dynamo-partition-amd
  • fusion-e2e-tp2-ar-rms-inductor-partition-amd
  • fusion-e2e-tp2-asynctp-config-sweep-h100
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus
  • inkling-unit-tests-b200
  • kernels-attention-test ×7
  • kernels-b200 ×3
  • kernels-core-operation-test ×3
  • kernels-deepgemm-test-h100
  • kernels-fusedmoe-layer-test-2-b200s
  • kernels-fusedmoe-layer-test-2-h100s
  • kernels-helion-test ×5
  • kernels-mamba-test
  • kernels-moe-test ×5
  • kernels-quantization-test ×6
  • kernels-root-misc-test-b200
  • kimi-k3-prefix-cache-4xb200 ×2
  • kimi-k3-unit-tests-b200
  • kv-offload-large
  • kv-offload-medium
  • kv-offload-small
  • language-models-tests-extra-standard ×2
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • lm-eval-dspark-watermark-2xh100
  • lm-eval-small-models
  • lm-eval-turboquant-k3v4nc
  • lm-eval-turboquant-k8v4
  • lm-eval-turboquant-t3nc
  • lm-eval-turboquant-t4nc
  • lm-eval-watermarking
  • lora ×4
  • lora-tp-distributed ×4
  • metrics-tracing-2-gpus
  • model-executor
  • mooncake-ec-tcp-e2e-2-gpus
  • mrcr-eval-small-models
  • multi-modal-accuracy-eval-small-models
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • multi-modal-models-standard-4-other-whisper
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus
  • nixlconnector-pd-edge-cases-2-gpus
  • openai-api-correctness
  • pipeline-context-parallelism-4-gpus
  • plugin-tests-2-gpus
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • quantization ×4
  • quantized-models-test
  • quantized-moe-test-b200
  • qwen4-exp-unit-tests
  • qwen4-exp-unit-tests-cpu
  • rayexecutorv2-4-gpus
  • regression
  • replayssm-e2e
  • rust-frontend-core-correctness
  • rust-frontend-distributed
  • rust-frontend-openai-coverage
  • rust-frontend-serve-admin-coverage
  • rust-frontend-tool-use
  • samplers-multimodal-beam-search
  • samplers-test
  • scale-out-ec-e2e-2-gpus
  • sharded-rdt-weight-transfer
  • spec-decode-draft-model ×4
  • spec-decode-eagle-1-deepseek-qwen
  • spec-decode-eagle-2-llama3-qwen-vl-other
  • spec-decode-mtp-deepseek-mimo
  • spec-decode-mtp-gemma4
  • spec-decode-mtp-qwen3-5
  • spec-decode-ngram-suffix
  • spec-decode-speculators
  • v1-attention-b200 ×2
  • v1-attention-h100-mi300 ×2
  • v1-core
  • v1-executor-worker
  • v1-kv-connectors ×4
  • v1-kv-offload
  • v1-logits-oracle
  • v1-metrics-lmeval
  • v1-others-cpu
  • v1-sample
  • v1-spec-decode
Would skip (today's rules run them) (13)
  • ascend-npu-test
  • basic-models-tests-initialization
  • cpu-distributed-tests-dp-tp
  • cpu-distributed-tests-pp-tp
  • cpu-tool-parsers
  • jit-monitor-no-runtime-jit
  • kernels-fla-ops-test-b200
  • kernels-flashmla-test-h100
  • kernels-mhc-test-b200
  • multi-modal-processor ×4
  • multi-modal-processor-cpu ×4
  • platform-tests
  • rl-entrypoints-tests
Would add (today's rules do not run them) (73)
  • amd-kernels-mi355 (code map)
  • amd-lm-eval-small-models-harness (Python record)
  • amd-qwen3-next-mtp-async-eplb-accuracy (Python record)
  • basic-models-tests-extra-initialization ×14 (Python record)
  • batch-invariance-b200 (code map)
  • batch-invariance-h100 (Python record)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • distributed-comm-ops (code map)
  • distributed-compile-comm-4-gpus (Python record)
  • distributed-dp-tests-4-gpus (code map)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-model-tests-2-gpus ×3 (code map)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (Python record)
  • distributed-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-torchrun-examples-4-gpus (Python record)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • engine-1-gpu (code map)
  • entrypoints-unit-tests (code map)
  • examples (Python record)
  • extract-hidden-states-integration (Python record)
  • extract-hidden-states-integration-2-gpus (Python record)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (Python record)
  • inkling-unit-tests-b200 (code map)
  • kernels-b200 ×3 (code map)
  • kernels-core-operation-test ×3 (code map)
  • kernels-deepgemm-test-h100 (code map)
  • kernels-helion-test ×5 (code map)
  • kernels-mamba-test (code map)
  • kernels-quantization-test ×6 (code map)
  • kimi-k3-prefix-cache-4xb200 ×2 (Python record)
  • kimi-k3-unit-tests-b200 (code map)
  • kv-offload-large (Python record)
  • kv-offload-medium (Python record)
  • kv-offload-small (Python record)
  • language-models-tests-extra-standard ×2 (code map)
  • lm-eval-small-models (Python record)
  • lm-eval-turboquant-k3v4nc (Python record)
  • lm-eval-turboquant-k8v4 (Python record)
  • lm-eval-turboquant-t3nc (Python record)
  • lm-eval-turboquant-t4nc (Python record)
  • lora ×4 (code map)
  • lora-tp-distributed ×4 (Python record)
  • mrcr-eval-small-models (Python record)
  • multi-modal-accuracy-eval-small-models (Python record)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (Python record)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-edge-cases-2-gpus (Python record)
  • openai-api-correctness (Python record)
  • plugin-tests-2-gpus (Python record)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (Python record)
  • quantization ×4 (code map)
  • quantized-models-test (code map)
  • quantized-moe-test-b200 (Python record)
  • rayexecutorv2-4-gpus (Python record)
  • rust-frontend-core-correctness (Python record)
  • rust-frontend-openai-coverage (Python record)
  • rust-frontend-serve-admin-coverage (Python record)
  • rust-frontend-tool-use (Python record)
  • samplers-multimodal-beam-search (Python record)
  • samplers-test (Python record)
  • scale-out-ec-e2e-2-gpus (Python record)
  • sharded-rdt-weight-transfer (Python record)
  • spec-decode-draft-model ×4 (Python record)
  • spec-decode-eagle-1-deepseek-qwen (Python record)
  • spec-decode-eagle-2-llama3-qwen-vl-other (Python record)
  • spec-decode-mtp-deepseek-mimo (Python record)
  • spec-decode-mtp-gemma4 (Python record)
  • spec-decode-mtp-qwen3-5 (Python record)
  • spec-decode-ngram-suffix (Python record)
  • spec-decode-speculators (Python record)
  • v1-attention-b200 ×2 (code map)
  • v1-attention-h100-mi300 ×2 (code map)
AMD mirrors: would skip (8)
  • basic-models-tests-initialization
  • deepseek-v4-kernel-test-b200
  • kernels-fla-ops-test-b200
  • kernels-fusedmoe-layer-test-2-b200s
  • kernels-mhc-test-b200
  • multi-modal-processor ×4
  • platform-tests
  • rl-entrypoints-tests
AMD mirrors: would add (59)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • distributed-comm-ops (code map)
  • distributed-dp-tests-4-gpus (code map)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (Python record)
  • distributed-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-torchrun-examples-4-gpus (Python record)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • engine-1-gpu (code map)
  • entrypoints-unit-tests (code map)
  • examples (Python record)
  • extract-hidden-states-integration (Python record)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (Python record)
  • kernels-core-operation-test ×3 (code map)
  • kernels-helion-test ×5 (code map)
  • kernels-mamba-test (code map)
  • kimi-k3-unit-tests-b200 (code map)
  • kv-offload-large (Python record)
  • kv-offload-medium (Python record)
  • kv-offload-small (Python record)
  • language-models-tests-extra-standard ×2 (code map)
  • lm-eval-small-models (Python record)
  • lm-eval-turboquant-k3v4nc (Python record)
  • lm-eval-turboquant-k8v4 (Python record)
  • lm-eval-turboquant-t3nc (Python record)
  • lm-eval-turboquant-t4nc (Python record)
  • lora ×4 (code map)
  • lora-tp-distributed ×4 (Python record)
  • mrcr-eval-small-models (Python record)
  • multi-modal-accuracy-eval-small-models (Python record)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (Python record)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-spec-decode-acceptance-2-gpus (Python record)
  • openai-api-correctness (Python record)
  • plugin-tests-2-gpus (Python record)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (Python record)
  • quantization ×4 (code map)
  • quantized-models-test (code map)
  • rayexecutorv2-4-gpus (Python record)
  • rust-frontend-core-correctness (Python record)
  • rust-frontend-openai-coverage (Python record)
  • rust-frontend-serve-admin-coverage (Python record)
  • rust-frontend-tool-use (Python record)
  • samplers-multimodal-beam-search (Python record)
  • samplers-test (Python record)
  • scale-out-ec-e2e-2-gpus (Python record)
  • sharded-rdt-weight-transfer (Python record)
  • spec-decode-draft-model ×4 (Python record)
  • spec-decode-eagle-1-deepseek-qwen (Python record)
  • spec-decode-eagle-2-llama3-qwen-vl-other (Python record)
  • spec-decode-mtp-deepseek-mimo (Python record)
  • spec-decode-mtp-gemma4 (Python record)
  • spec-decode-mtp-qwen3-5 (Python record)
  • spec-decode-ngram-suffix (Python record)
  • spec-decode-speculators (Python record)
  • v1-attention-b200 ×2 (code map)
  • v1-attention-h100-mi300 ×2 (code map)

34 changed files · base a4b14e57b6 · head 62841aca99 · Python record: build 93039 at 1e5d0ea888 · kernel record: table 43b4aae (build 93244), map 43b4aae · not counted: 10 build steps, 5 A100 steps the generator no longer emits, 128 optional steps the selector would also run

@WoosukKwon
WoosukKwon merged commit 194bd72 into main Oct 8, 2026
242 checks passed
@WoosukKwon
WoosukKwon deleted the woosuk/rm-compile-sp branch October 8, 2026 15:28
@njhill njhill mentioned this pull request Oct 8, 2026
20 of 26 tasks
lesj0610 added a commit to lesj0610/vllm that referenced this pull request Oct 9, 2026
…bytes-profiling

The only conflict is the `vllm.v1.worker.utils` import list in
gpu_model_runner.py. vllm-project#60517 dropped `is_residual_scattered_for_sp`, and this
branch adds `build_minimal_kv_cache_config` and `clear_layer_kv_caches`, so
the resolution keeps the two additions without the removed helper.

Signed-off-by: lesj0610 <lesj0610@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation intel-gpu Related to Intel GPU mrv2 Model Runner V2 specific nvidia ready ONLY add when PR is ready to merge/full CI is needed torch.compile

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants