|  | 
|  | 1 | +# | 
|  | 2 | +# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. | 
|  | 3 | +# This file is a part of the vllm-ascend project. | 
|  | 4 | +# | 
|  | 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 6 | +# you may not use this file except in compliance with the License. | 
|  | 7 | +# You may obtain a copy of the License at | 
|  | 8 | +# | 
|  | 9 | +#     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 10 | +# | 
|  | 11 | +# Unless required by applicable law or agreed to in writing, software | 
|  | 12 | +# distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 14 | +# See the License for the specific language governing permissions and | 
|  | 15 | +# limitations under the License. | 
|  | 16 | +# | 
|  | 17 | + | 
|  | 18 | +name: 'e2e test v0.8.3' | 
|  | 19 | + | 
|  | 20 | +on: | 
|  | 21 | +  workflow_run: | 
|  | 22 | +    workflows: ["e2e test main"]  | 
|  | 23 | +    types: | 
|  | 24 | +      - completed | 
|  | 25 | + | 
|  | 26 | +# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly | 
|  | 27 | +# declared as "shell: bash -el {0}" on steps that need to be properly activated. | 
|  | 28 | +# It's used to activate ascend-toolkit environment variables. | 
|  | 29 | +defaults: | 
|  | 30 | +  run: | 
|  | 31 | +    shell: bash -el {0} | 
|  | 32 | + | 
|  | 33 | +concurrency: | 
|  | 34 | +  group: pr-${{ github.event.workflow_run.pull_requests[0].number }} | 
|  | 35 | +  cancel-in-progress: true | 
|  | 36 | + | 
|  | 37 | +jobs: | 
|  | 38 | +  test-singlenpu: | 
|  | 39 | +    name: vLLM Ascend test (single-npu) | 
|  | 40 | +    runs-on: linux-arm64-npu-1  # actionlint-ignore: runner-label | 
|  | 41 | +    container: | 
|  | 42 | +      image: quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10 | 
|  | 43 | +    steps: | 
|  | 44 | +      - name: Check npu and CANN info | 
|  | 45 | +        run: | | 
|  | 46 | +          npu-smi info | 
|  | 47 | +          cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info | 
|  | 48 | +
 | 
|  | 49 | +      - name: Config mirrors | 
|  | 50 | +        run: | | 
|  | 51 | +          sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list | 
|  | 52 | +          pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple | 
|  | 53 | +          apt-get update -y | 
|  | 54 | +          apt install git -y | 
|  | 55 | +          git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/ | 
|  | 56 | +
 | 
|  | 57 | +      - name: Checkout vllm-project/vllm-ascend repo | 
|  | 58 | +        uses: actions/checkout@v4 | 
|  | 59 | + | 
|  | 60 | +      - name: Install system dependencies | 
|  | 61 | +        run: | | 
|  | 62 | +          apt-get -y install `cat packages.txt` | 
|  | 63 | +          apt-get -y install gcc g++ cmake libnuma-dev | 
|  | 64 | +
 | 
|  | 65 | +      - name: Checkout vllm-project/vllm repo | 
|  | 66 | +        uses: actions/checkout@v4 | 
|  | 67 | +        with: | 
|  | 68 | +          repository: vllm-project/vllm | 
|  | 69 | +          ref: v0.8.3 | 
|  | 70 | +          path: ./vllm-empty | 
|  | 71 | + | 
|  | 72 | +      - name: Install vllm-project/vllm from source | 
|  | 73 | +        working-directory: ./vllm-empty | 
|  | 74 | +        run: | | 
|  | 75 | +          VLLM_TARGET_DEVICE=empty pip install -e . | 
|  | 76 | +
 | 
|  | 77 | +      - name: Install vllm-project/vllm-ascend | 
|  | 78 | +        run: | | 
|  | 79 | +          pip install -r requirements-dev.txt | 
|  | 80 | +          pip install -e . | 
|  | 81 | +
 | 
|  | 82 | +      - name: Install pta | 
|  | 83 | +        run: | | 
|  | 84 | +          if [ ! -d /root/.cache/pta ]; then | 
|  | 85 | +            mkdir -p /root/.cache/pta | 
|  | 86 | +          fi | 
|  | 87 | +
 | 
|  | 88 | +          if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then | 
|  | 89 | +            cd /root/.cache/pta | 
|  | 90 | +            rm -rf pytorch_v2.5.1_py310* | 
|  | 91 | +            wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz | 
|  | 92 | +            tar -zxvf pytorch_v2.5.1_py310.tar.gz | 
|  | 93 | +          fi | 
|  | 94 | +
 | 
|  | 95 | +          pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | 
|  | 96 | +
 | 
|  | 97 | +      - name: Run vllm-project/vllm-ascend test on V0 engine | 
|  | 98 | +        env: | 
|  | 99 | +          VLLM_USE_V1: 0 | 
|  | 100 | +          HF_ENDPOINT: https://hf-mirror.com | 
|  | 101 | +        run: | | 
|  | 102 | +          VLLM_USE_V1=0 pytest -sv -m 'not multinpu' tests | 
|  | 103 | +
 | 
|  | 104 | +      - name: Run vllm-project/vllm-ascend test for V1 Engine | 
|  | 105 | +        env: | 
|  | 106 | +          VLLM_USE_V1: 1 | 
|  | 107 | +          VLLM_WORKER_MULTIPROC_METHOD: spawn | 
|  | 108 | +          HF_ENDPOINT: https://hf-mirror.com | 
|  | 109 | +        run: | | 
|  | 110 | +          pytest -sv -m 'not multinpu' tests | 
|  | 111 | +
 | 
|  | 112 | +      - name: Run vllm-project/vllm test for V0 Engine | 
|  | 113 | +        env: | 
|  | 114 | +          VLLM_USE_V1: 0 | 
|  | 115 | +          PYTORCH_NPU_ALLOC_CONF: max_split_size_mb:256 | 
|  | 116 | +          HF_ENDPOINT: https://hf-mirror.com | 
|  | 117 | +        run: | | 
|  | 118 | +          pytest -sv | 
|  | 119 | +
 | 
|  | 120 | +  test-multinpu: | 
|  | 121 | +    name: vLLM Ascend test (multi-npu) | 
|  | 122 | +    runs-on: linux-arm64-npu-4   | 
|  | 123 | +    container: | 
|  | 124 | +      image: ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10 | 
|  | 125 | +      env: | 
|  | 126 | +        HF_ENDPOINT: https://hf-mirror.com | 
|  | 127 | +        HF_TOKEN: ${{ secrets.HF_TOKEN }} | 
|  | 128 | +    steps: | 
|  | 129 | +      - name: Check npu and CANN info | 
|  | 130 | +        run: | | 
|  | 131 | +          npu-smi info | 
|  | 132 | +          cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info | 
|  | 133 | +
 | 
|  | 134 | +      - name: Config mirrors | 
|  | 135 | +        run: | | 
|  | 136 | +          # sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list | 
|  | 137 | +          pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple | 
|  | 138 | +
 | 
|  | 139 | +      - name: Install system dependencies | 
|  | 140 | +        run: | | 
|  | 141 | +          apt-get update -y | 
|  | 142 | +          apt-get -y install git wget | 
|  | 143 | +
 | 
|  | 144 | +      - name: Config git | 
|  | 145 | +        run: | | 
|  | 146 | +          git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/  | 
|  | 147 | +
 | 
|  | 148 | +      - name: Checkout vllm-project/vllm-ascend repo | 
|  | 149 | +        uses: actions/checkout@v4 | 
|  | 150 | + | 
|  | 151 | +      - name: Install dependencies | 
|  | 152 | +        run: | | 
|  | 153 | +          pip install -r requirements-dev.txt | 
|  | 154 | +
 | 
|  | 155 | +      - name: Checkout vllm-project/vllm repo | 
|  | 156 | +        uses: actions/checkout@v4 | 
|  | 157 | +        with: | 
|  | 158 | +          repository: vllm-project/vllm | 
|  | 159 | +          ref: v0.8.3 | 
|  | 160 | +          path: ./vllm-empty | 
|  | 161 | + | 
|  | 162 | +      - name: Install vllm-project/vllm from source | 
|  | 163 | +        working-directory: ./vllm-empty | 
|  | 164 | +        run: | | 
|  | 165 | +          VLLM_TARGET_DEVICE=empty pip install -e . | 
|  | 166 | +
 | 
|  | 167 | +      - name: Install vllm-project/vllm-ascend | 
|  | 168 | +        run: | | 
|  | 169 | +          pip install -r requirements-dev.txt | 
|  | 170 | +          pip install -e . | 
|  | 171 | +
 | 
|  | 172 | +      - name: Install pta | 
|  | 173 | +        run: | | 
|  | 174 | +          if [ ! -d /root/.cache/pta ]; then | 
|  | 175 | +            mkdir -p /root/.cache/pta | 
|  | 176 | +          fi | 
|  | 177 | +
 | 
|  | 178 | +          if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then | 
|  | 179 | +            cd /root/.cache/pta | 
|  | 180 | +            rm -rf pytorch_v2.5.1_py310* | 
|  | 181 | +            wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz | 
|  | 182 | +            tar -zxvf pytorch_v2.5.1_py310.tar.gz | 
|  | 183 | +          fi | 
|  | 184 | +
 | 
|  | 185 | +          pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | 
|  | 186 | +      - name: Run vllm-project/vllm-ascend test on V0 engine | 
|  | 187 | +        env: | 
|  | 188 | +          VLLM_USE_V1: 0 | 
|  | 189 | +          HF_ENDPOINT: https://hf-mirror.com | 
|  | 190 | +        run: | | 
|  | 191 | +          VLLM_USE_V1=0 pytest -sv -m 'multinpu' tests | 
|  | 192 | +
 | 
|  | 193 | +      - name: Run vllm-project/vllm-ascend test for V1 Engine | 
|  | 194 | +        env: | 
|  | 195 | +          VLLM_USE_V1: 1 | 
|  | 196 | +          VLLM_WORKER_MULTIPROC_METHOD: spawn | 
|  | 197 | +          HF_ENDPOINT: https://hf-mirror.com | 
|  | 198 | +        run: | | 
|  | 199 | +          pytest -sv -m 'multinpu' tests | 
|  | 200 | +
 | 
0 commit comments