Skip to content

[WIP]fix(npu): trim vllm-ascend colocate patch and pin native IPC engine#310

Draft
CalvinXKY wants to merge 2 commits into
vllm-project:ascendfrom
CalvinXKY:fix/npu-vllm-ascend-patch-trim
Draft

[WIP]fix(npu): trim vllm-ascend colocate patch and pin native IPC engine#310
CalvinXKY wants to merge 2 commits into
vllm-project:ascendfrom
CalvinXKY:fix/npu-vllm-ascend-patch-trim

Conversation

@CalvinXKY

@CalvinXKY CalvinXKY commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #285 per reviewer feedback (@Meihan-chen): drop the redundant
npu_ipc_engine.py hunk from vllm-ascend.patch now that upstream provides
the NPU IPC engine fix, pin a verified vLLM Ascend commit in Dockerfile.npu,
and document NPU colocate validation notes.

  • vllm-ascend.patch: keep only colocate worker.py hunks (skip free-memory
    checks when training and inference share NPUs).
  • Dockerfile.npu: pin VLLM_ASCEND_COMMIT=5ca762a704f2a7acbd1bd839c3f3b421e5c0dcaf;
    vLLM commit is still taken from .github/vllm-main-verified.commit at that pin.
  • docs/en/get_started/NPU.md: add colocate caveats (no --vllm-enforce-eager,
    pre-run HBM cleanup, upstream IPC requirement).

Pinned versions

Component Version Commit / notes
vime 0.3.0 (ascend branch, post #285)
vLLM Ascend 0.1.dev1+g5ca762a704f2 (dev snapshot) 5ca762a704f2a7acbd1bd839c3f3b421e5c0dcafvllm-ascend #10996 on main (native NPUIPCWeightTransferEngine); rc backport: vllm-ascend #11030 @ f206fbf31 on v0.22.1rc
vLLM 0.22.1rc1.dev263+g967c5c3bc 967c5c3bc38891f4465d3f4e99917ed837bb3833 (from .github/vllm-main-verified.commit at the vLLM Ascend pin above)
PyTorch 2.10.0+cpu
Python 3.12.13
CANN 9.0.0
Hardware 8× Ascend910B1 (64GB HBM) Atlas A2

Note: vLLM Ascend has no stable PyPI release tag for this stack yet; the
commit hash is the source of truth for Docker/README pins. The 0.1.dev1+g…
string is the setuptools-scm dev version observed after pip install -e at
commit 5ca762a (same pattern as the pre-upgrade 0.1.dev1+gbad0caf65… build).

Validation

Qwen3-4B, TP=8, colocate + --megatron-to-hf-mode bridge, native IPC weight sync,
direct python train.py (no Ray job submit), no --vllm-enforce-eager.

Container image: registry-cbu.huawei.com/vime/vime-ascend-npu:vime_0.3.0-vllm_0.22.1-pytorch_2.10.0-cann_9.0.0-py_3.12-snt9b

Test Steps train_rollout_logprob_abs_diff
Smoke 4 rollouts ~0.0115–0.0123
Short 20 rollouts / 20 steps ~0.0114–0.0121
Long 100 rollouts / 100 steps 0.00785–0.01257 (stable, ~88 min)
image

Follow-up (out of scope)

Migrate colocate weight sync to fully reuse native NPUIPCWeightTransferEngine
(replace custom vLLMColocateWorkerExtension path) — tracked separately.

Test plan

  • Colocate smoke on 8×910B (Qwen3-4B, diff ~0.012)
  • 100-step long run (diff stable, converging to ~0.008–0.009)
  • Docker image rebuild with updated Dockerfile.npu (CI / manual)

Drop the redundant npu_ipc_engine.py hunk now that vLLM Ascend 5ca762a
provides the NPU IPC init fix upstream. Pin VLLM_ASCEND_COMMIT in
Dockerfile.npu and document colocate validation notes.

Signed-off-by: kaiyuan <kyxiezju@163.com>

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request pins the vllm-ascend dependency to a specific commit (5ca762a) to leverage the upstreamed native NPU IPC weight transfer engine, which simplifies the vllm-ascend.patch to only include the colocate worker patch. It also updates the Dockerfile, README, and NPU documentation to reflect these changes, including a new guide and example for running Qwen3-4B in colocate mode. The review feedback correctly identifies a potential syntax error in the documentation's bash example due to a trailing backslash followed by a placeholder, and suggests a clearer command structure.

Comment on lines +222 to +223
--tensor-model-parallel-size 8 \
... # same GRPO / optimizer flags as the decoupled example

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The trailing backslash on line 222 followed by the ... placeholder on line 223 will cause a syntax error if the user copies and runs the command directly. Additionally, users should be cautioned not to copy the 4-GPU parallel size flags (such as --tensor-model-parallel-size 4) from the decoupled example, as they conflict with the 8-GPU colocate configuration.

Suggested change
--tensor-model-parallel-size 8 \
... # same GRPO / optimizer flags as the decoupled example
--tensor-model-parallel-size 8
# [Add the same GRPO / optimizer flags as the decoupled example, but do not copy the 4-GPU parallel size flags]

Document dev snapshot version strings next to commit hashes in the
component table for easier cross-reference with validation reports.

Signed-off-by: kaiyuan <kyxiezju@163.com>
@CalvinXKY CalvinXKY changed the title fix(npu): trim vllm-ascend colocate patch and pin native IPC engine [WIP]fix(npu): trim vllm-ascend colocate patch and pin native IPC engine Jul 2, 2026
@CalvinXKY CalvinXKY marked this pull request as draft July 2, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant