Skip to content

Commit 96fa7ff

Browse files
MengqingCaowxsIcey
andauthored
[DP][V1] Fix rank set in DP scenario & Bump torch-npu version to 2.5.1.post1.dev20250528 (#1235)
### What this PR does / why we need it? 1. Fix rank set in DP scenario. The new poc version of torch-npu support setting `ASCEND_RT_VISIBLE_DEVICES` dynamically, thus we could use the rank set in `DPEngineCoreProc` directly instead of calculating local rank across dp by hand in the patched `_init_data_parallel` Closes: #1170 2. Bump torch-npu version to 2.5.1.post1.dev20250528 Closes: #1242 Closes: #1232 ### How was this patch tested? CI passed with new added test. --------- Signed-off-by: MengqingCao <cmq0113@163.com> Signed-off-by: Icey <1790571317@qq.com> Co-authored-by: Icey <1790571317@qq.com>
1 parent f5404dc commit 96fa7ff

19 files changed

+114
-47
lines changed

.github/workflows/accuracy_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ jobs:
173173

174174
- name: Install vllm-project/vllm-ascend
175175
working-directory: ./vllm-ascend
176+
env:
177+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
176178
run: |
177179
pip install -r requirements-dev.txt
178180
pip install -e .

.github/workflows/image_openeuler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ on:
1919
- '.github/workflows/image_openeuler.yml'
2020
- 'Dockerfile.openEuler'
2121
- 'vllm_ascend/**'
22+
- 'setup.py'
23+
- 'pyproject.toml'
24+
- 'requirements.txt'
25+
- 'cmake/**'
26+
- 'CMakeLists.txt'
27+
- 'csrc/**'
2228
push:
2329
# Publish image when tagging, the Dockerfile in tag will be build as tag image
2430
branches:

.github/workflows/image_ubuntu.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ on:
1919
- '.github/workflows/image_ubuntu.yml'
2020
- 'Dockerfile'
2121
- 'vllm_ascend/**'
22+
- 'setup.py'
23+
- 'pyproject.toml'
24+
- 'requirements.txt'
25+
- 'cmake/**'
26+
- 'CMakeLists.txt'
27+
- 'csrc/**'
2228
push:
2329
# Publish image when tagging, the Dockerfile in tag will be build as tag image
2430
branches:

.github/workflows/nightly_benchmarks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ jobs:
115115
VLLM_TARGET_DEVICE=empty pip install -e .
116116
117117
- name: Install vllm-project/vllm-ascend
118+
env:
119+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
118120
run: |
119121
pip install -e .
120122
pip install -r benchmarks/requirements-bench.txt

.github/workflows/vllm_ascend_test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ jobs:
151151

152152
- name: Install vllm-project/vllm-ascend
153153
run: |
154+
export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi
154155
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib
155156
python3 -m pip install -r requirements-dev.txt --extra-index https://download.pytorch.org/whl/cpu/
156157
python3 -m pip install -v . --extra-index https://download.pytorch.org/whl/cpu/
@@ -214,6 +215,8 @@ jobs:
214215
VLLM_TARGET_DEVICE=empty pip install -e .
215216
216217
- name: Install vllm-project/vllm-ascend
218+
env:
219+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
217220
run: |
218221
pip install -r requirements-dev.txt
219222
pip install -v -e .
@@ -311,6 +314,8 @@ jobs:
311314
VLLM_TARGET_DEVICE=empty pip install -e .
312315
313316
- name: Install vllm-project/vllm-ascend
317+
env:
318+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
314319
run: |
315320
pip install -r requirements-dev.txt
316321
pip install -v -e .

.github/workflows/vllm_ascend_test_long_term.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ jobs:
8888
VLLM_TARGET_DEVICE=empty pip install -e .
8989
9090
- name: Install vllm-project/vllm-ascend
91+
env:
92+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
9193
run: |
9294
pip install -r requirements-dev.txt
9395
pip install -v -e .

.github/workflows/vllm_ascend_test_pd.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
VLLM_TARGET_DEVICE=empty pip install -e .
9898
9999
- name: Install vllm-project/vllm-ascend
100+
env:
101+
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
100102
run: |
101103
pip install -r requirements-dev.txt
102104
pip install -v -e .

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -v -e /vllm-workspace/vllm
4646

4747
# Install vllm-ascend
4848
# Append `libascend_hal.so` path (devlib) to LD_LIBRARY_PATH
49-
RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
49+
RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \
50+
source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
5051
source /usr/local/Ascend/nnal/atb/set_env.sh && \
5152
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
5253
python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \

Dockerfile.openEuler

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ RUN VLLM_TARGET_DEVICE="empty" python3 -m pip install -e /vllm-workspace/vllm/ -
4343
python3 -m pip cache purge
4444

4545
# Install vllm-ascend
46-
RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
46+
RUN export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi && \
47+
source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
4748
source /usr/local/Ascend/nnal/atb/set_env.sh && \
4849
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
4950
python3 -m pip install -v -e /vllm-workspace/vllm-ascend/ --extra-index https://download.pytorch.org/whl/cpu/ && \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ By using vLLM Ascend plugin, popular open-source models, including Transformer-l
3838
- Software:
3939
* Python >= 3.9, < 3.12
4040
* CANN >= 8.1.RC1
41-
* PyTorch >= 2.5.1, torch-npu >= 2.5.1
41+
* PyTorch >= 2.5.1, torch-npu >= 2.5.1.post1.dev20250528
4242
* vLLM (the same version as vllm-ascend)
4343

4444
## Getting Started

0 commit comments

Comments
 (0)