From c4fde5c0647894f348da1f29f98fde1cc1f802f4 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Mon, 19 Jan 2026 09:12:46 +0800 Subject: [PATCH] [Doc] Upgrade outdated ut doc (#5937) ### What this PR does / why we need it? For cpu env, we should set `SOC_VERSION` to mock different NPU chips for different compilation paths ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.13.0 - vLLM main: https://github.com/vllm-project/vllm/commit/11b6af5280d6d6dfb8953af16e67b25f819b3be9 --------- Signed-off-by: wangli --- .../developer_guide/contribution/testing.md | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/source/developer_guide/contribution/testing.md b/docs/source/developer_guide/contribution/testing.md index 958c008d..d2dbb37e 100644 --- a/docs/source/developer_guide/contribution/testing.md +++ b/docs/source/developer_guide/contribution/testing.md @@ -37,19 +37,29 @@ pip config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/ # For torch-npu dev version or x86 machine export PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu/ https://mirrors.huaweicloud.com/ascend/repos/pypi" +# src path +export SRC_WORKSPACE=/vllm-workspace +mkdir -p $SRC_WORKSPACE + apt-get update -y apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev curl gnupg2 -# Install vllm -cd /vllm-project/vllm -VLLM_TARGET_DEVICE=empty python3 -m pip -v install . +git clone -b |vllm_ascend_version| --depth 1 https://github.com/vllm-project/vllm-ascend.git +git clone --depth 1 https://github.com/vllm-project/vllm.git -# Install vllm-ascend -cd /vllm-project/vllm-ascend -# [IMPORTANT] Import LD_LIBRARY_PATH to enumerate the CANN environment under CPU +# vllm +cd $SRC_WORKSPACE/vllm +VLLM_TARGET_DEVICE=empty python3 -m pip install . +python3 -m pip uninstall -y triton + +# vllm-ascend +cd $SRC_WORKSPACE/vllm-ascend export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/$(uname -m)-linux/devlib -python3 -m pip install -r requirements-dev.txt +# For cpu environment, set SOC_VERSION for different chips. +# See https://github.com/vllm-project/vllm-ascend/blob/3cb0af0bcf3299089ca7e72159fa36e825a470f8/setup.py#L132 for detail. +export SOC_VERSION="ascend910b1" python3 -m pip install -v . +python3 -m pip install -r requirements-dev.txt ``` ::::