diff --git a/.github/configs/ascend.yml b/.github/configs/ascend.yml index 457c8a96f..d976bf8c8 100644 --- a/.github/configs/ascend.yml +++ b/.github/configs/ascend.yml @@ -18,15 +18,11 @@ platform: ascend # Docker image for this hardware -ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:v0.2.0-ascend-ci +ci_image: harbor.baai.ac.cn/flagscale/vllm-plugin-fl:ascend-vllm0.20.2-a3-ci # Runner labels for this hardware runner_labels: - - self-hosted - - Linux - - ARM64 - - ascend - - npu-16 + - flagcicd-910c # Container volumes (hardware-specific paths) container_volumes: diff --git a/.github/configs/platforms.yml b/.github/configs/platforms.yml index 7d559ea34..ee506b84b 100644 --- a/.github/configs/platforms.yml +++ b/.github/configs/platforms.yml @@ -23,7 +23,9 @@ platforms: cuda: enabled: true ascend: - enabled: false + # Ascend uses a scarce self-hosted NPU runner; keep it enabled when + # validating Ascend changes in PR CI. + enabled: true hygon: enabled: true metax: diff --git a/.github/scripts/ascend/download_models.sh b/.github/scripts/ascend/download_models.sh new file mode 100755 index 000000000..03e67cd61 --- /dev/null +++ b/.github/scripts/ascend/download_models.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright 2026 FlagOS Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Provision models on the host-mounted /data volume. Images must not contain +# model weights; every platform test refers to the same host path convention. +set -euo pipefail + +export FL_MODEL_BASE_PATH="${FL_MODEL_BASE_PATH:-/data/models}" +export HF_ENDPOINT="${HF_ENDPOINT:-https://hf-mirror.com}" + +QWEN_ROOT="${FL_MODEL_BASE_PATH}/Qwen" +MODEL_ID="Qwen/Qwen3-0.6B" +MODEL_DIR="${QWEN_ROOT}/Qwen3-0.6B" + +mkdir -p "${QWEN_ROOT}" + +if [[ -f "${MODEL_DIR}/config.json" ]]; then + echo "Model already available: ${MODEL_DIR}" + exit 0 +fi + +export MODEL_ID MODEL_DIR +echo "Downloading ${MODEL_ID} from ${HF_ENDPOINT} to ${MODEL_DIR}" +python - <<'PY' +import os + +from huggingface_hub import snapshot_download + +snapshot_download( + repo_id=os.environ["MODEL_ID"], + local_dir=os.environ["MODEL_DIR"], + endpoint=os.environ["HF_ENDPOINT"], +) +PY + +test -f "${MODEL_DIR}/config.json" +echo "Model ready: ${MODEL_DIR}" diff --git a/.github/scripts/ascend/setup.sh b/.github/scripts/ascend/setup.sh index dc9b6ffa3..fa75c31c5 100644 --- a/.github/scripts/ascend/setup.sh +++ b/.github/scripts/ascend/setup.sh @@ -6,4 +6,19 @@ set -euo pipefail git config --global --add safe.directory "$(pwd)" pip install --upgrade pip "setuptools>=77.0.3" -pip install --no-build-isolation -e ".[test]" +pip install \ + --constraint requirements/ascend.txt \ + --no-build-isolation \ + --no-deps \ + -e . + +python - <<'PY' +import numpy + +expected = "1.26.4" +if numpy.__version__ != expected: + raise RuntimeError( + f"Unexpected NumPy version: {numpy.__version__}; expected {expected}" + ) +print(f"NumPy version: {numpy.__version__}") +PY diff --git a/.github/workflows/_e2e_test.yml b/.github/workflows/_e2e_test.yml index c7550de9a..98fb6d272 100644 --- a/.github/workflows/_e2e_test.yml +++ b/.github/workflows/_e2e_test.yml @@ -93,6 +93,13 @@ jobs: - name: Check device availability run: bash .github/scripts/${{ inputs.platform }}/check.sh + - name: Prepare host models + run: | + model_script=".github/scripts/${{ inputs.platform }}/download_models.sh" + if [ -f "${model_script}" ]; then + bash "${model_script}" + fi + - name: Install project run: bash .github/scripts/${{ inputs.platform }}/setup.sh diff --git a/.github/workflows/ascend-manual.yml b/.github/workflows/ascend-manual.yml new file mode 100644 index 000000000..78fc1e663 --- /dev/null +++ b/.github/workflows/ascend-manual.yml @@ -0,0 +1,37 @@ +# Copyright 2026 FlagOS Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Ascend runners are scarce shared resources. Validate the image and selected +# cases directly on the host first, then dispatch this workflow when a recorded +# full CI result is needed. +name: Ascend Manual CI + +on: + workflow_dispatch: + pull_request: + types: [labeled] + +concurrency: + group: ascend-manual-${{ github.ref }} + cancel-in-progress: false + +jobs: + test-ascend: + if: >- + github.event_name == 'workflow_dispatch' || + github.event.label.name == 'run-ascend-ci' + uses: ./.github/workflows/_platform_test.yml + with: + platform: ascend + secrets: inherit diff --git a/benchmarks/README.md b/benchmarks/README.md index 8a208180b..bb31cfcdf 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -52,7 +52,7 @@ All arguments are passed directly to `vllm bench throughput`. Example: ```bash python benchmarks/benchmark_throughput_autotune.py \ - --model /models/Qwen3-Next-80B-A3B-Instruct \ + --model /data/models/Qwen/Qwen3-Next-80B-A3B-Instruct \ --tensor-parallel-size 4 \ --dataset-name random \ --input-len 6144 \ diff --git a/benchmarks/benchmark_throughput_autotune.py b/benchmarks/benchmark_throughput_autotune.py index eff38c947..bfcfc4f84 100644 --- a/benchmarks/benchmark_throughput_autotune.py +++ b/benchmarks/benchmark_throughput_autotune.py @@ -768,7 +768,7 @@ def main() -> None: "No throughput arguments provided. " "Pass them after the script args, e.g.: " 'python benchmark_gems_autotune.py --ops "silu_and_mul" -- ' - "--model /models/Qwen3-Next-80B-A3B-Instruct --tensor-parallel-size 4 ..." + "--model /data/models/Qwen/Qwen3-Next-80B-A3B-Instruct --tensor-parallel-size 4 ..." ) if args.background and not os.environ.get("FLAGGEMS_AUTOTUNE_BACKGROUND"): diff --git a/benchmarks/benchmark_throughput_serve.py b/benchmarks/benchmark_throughput_serve.py index 535cef804..c8b716e7e 100644 --- a/benchmarks/benchmark_throughput_serve.py +++ b/benchmarks/benchmark_throughput_serve.py @@ -17,7 +17,7 @@ # Usage: # 1. Start the server as follows (adjust model path and args as needed): -# vllm serve /models/Qwen3.6-27B --tensor-parallel-size 2 --max-model-len 262144 --no-enable-log-requests --no-enable-prefix-caching +# vllm serve /data/models/Qwen/Qwen3.6-27B --tensor-parallel-size 2 --max-model-len 262144 --no-enable-log-requests --no-enable-prefix-caching # 2. Run this benchmark script (default: 4 test cases): # python benchmarks/benchmark_throughput_serve.py @@ -35,7 +35,7 @@ from datetime import datetime from statistics import mean -MODEL = "/models/Qwen3.6-27B" +MODEL = "/data/models/Qwen/Qwen3.6-27B" # total runs for each case RUNS = 4 diff --git a/benchmarks/flagos_eval/run_benchmark.sh b/benchmarks/flagos_eval/run_benchmark.sh index 0899a2b3c..8f1e46736 100644 --- a/benchmarks/flagos_eval/run_benchmark.sh +++ b/benchmarks/flagos_eval/run_benchmark.sh @@ -17,7 +17,7 @@ set -e # Arguments -MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_benchmark.sh /workspace/Qwen3-4B/"} +MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_benchmark.sh /data/models/Qwen/Qwen3-4B/"} # Output directory OUTPUT_DIR=bench_results diff --git a/benchmarks/flagos_eval/run_eval.sh b/benchmarks/flagos_eval/run_eval.sh index cc1cded61..bc4539400 100644 --- a/benchmarks/flagos_eval/run_eval.sh +++ b/benchmarks/flagos_eval/run_eval.sh @@ -17,8 +17,8 @@ set -e # Arguments -MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_eval.sh /workspace/Qwen3-4B/ hf_xxx"} -HF_TOKEN=${2:?"Please provide HF_TOKEN, e.g.: ./run_eval.sh /workspace/Qwen3-4B/ hf_xxx"} +MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_eval.sh /data/models/Qwen/Qwen3-4B/ hf_xxx"} +HF_TOKEN=${2:?"Please provide HF_TOKEN, e.g.: ./run_eval.sh /data/models/Qwen/Qwen3-4B/ hf_xxx"} # Environment variables export HF_ENDPOINT=https://hf-mirror.com # China mirror (can be removed for overseas) diff --git a/benchmarks/flagos_eval/run_mixed_benchmark.sh b/benchmarks/flagos_eval/run_mixed_benchmark.sh index 115e7a001..85b1cf0dd 100755 --- a/benchmarks/flagos_eval/run_mixed_benchmark.sh +++ b/benchmarks/flagos_eval/run_mixed_benchmark.sh @@ -30,12 +30,12 @@ set -e # seed: Random seed for shuffle (default: 42) # # Example: -# ./run_mixed_benchmark.sh /workspace/Qwen3-4B/ -# ./run_mixed_benchmark.sh /workspace/Qwen3-4B/ 123 +# ./run_mixed_benchmark.sh /data/models/Qwen/Qwen3-4B/ +# ./run_mixed_benchmark.sh /data/models/Qwen/Qwen3-4B/ 123 # ============================================================================ # Arguments -MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_mixed_benchmark.sh /workspace/Qwen3-4B/"} +MODEL_PATH=${1:?"Please provide model path, e.g.: ./run_mixed_benchmark.sh /data/models/Qwen/Qwen3-4B/"} SEED=${2:-42} # Output directory diff --git a/docker/ascend/Dockerfile b/docker/ascend/Dockerfile index 86373df61..ef09c6810 100644 --- a/docker/ascend/Dockerfile +++ b/docker/ascend/Dockerfile @@ -12,143 +12,58 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG VLLM_VERSION=0.19.0 -ARG CANN_VERSION=8.5.1 -ARG CANN_CHIP=a3 -ARG UBUNTU_VERSION=22.04 -ARG PYTHON_VERSION=3.11 +# Keep the chip image aligned with the environment validated on Ascend 910C. +ARG ASCEND_BASE_IMAGE=quay.io/ascend/vllm-ascend:v0.20.2rc1-a3 # ---------- base stage ---------- -FROM quay.io/ascend/cann:${CANN_VERSION}-${CANN_CHIP}-ubuntu${UBUNTU_VERSION}-py${PYTHON_VERSION} AS base +FROM ${ASCEND_BASE_IMAGE} AS base -ARG MOONCAKE_TAG=v0.3.8.post1 -ARG SOC_VERSION=ascend910_9391 -ENV DEBIAN_FRONTEND=noninteractive -ENV SOC_VERSION=${SOC_VERSION} \ - TASK_QUEUE_ENABLE=1 \ - OMP_NUM_THREADS=1 +ARG FLAGGEMS_VERSION=3e6528cf04f5f964a7b0fa6628de6f0410dbfd02 -RUN pip install --upgrade pip setuptools +ENV DEBIAN_FRONTEND=noninteractive \ + VLLM_PLUGINS=fl \ + VLLM_FL_PLATFORM=ascend \ + HF_ENDPOINT=https://hf-mirror.com \ + FL_MODEL_BASE_PATH=/data/models -# Add BiShengIR compiler to PATH -ENV PATH="${ASCEND_TOOLKIT_HOME}/tools/bishengir/bin:${PATH}" - -# Install system deps (clang-15 for triton-ascend, jemalloc for memory alloc) -RUN apt-get update -y && \ - apt-get install -y git \ - vim \ - wget \ - net-tools \ - gcc \ - g++ \ +RUN python -m pip install --upgrade pip "setuptools>=77.0.3" \ + && python -m pip install --no-cache-dir \ + scikit-build-core==0.11 \ + pybind11 \ + ninja \ cmake \ - numactl \ - libnuma-dev \ - libjemalloc2 \ - clang-15 \ - && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20 \ - && update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20 && \ - rm -rf /var/cache/apt/* /var/lib/apt/lists/* - -# Build & install Mooncake (distributed KV cache) -COPY ./scripts/mooncake_installer.sh /tmp/mooncake_installer.sh -RUN git clone --depth 1 --branch ${MOONCAKE_TAG} https://github.com/kvcache-ai/Mooncake /tmp/Mooncake \ - && mv /tmp/mooncake_installer.sh /tmp/Mooncake/ \ - && cd /tmp/Mooncake \ - && bash mooncake_installer.sh -y \ - && ARCH=$(uname -m) \ - && source /usr/local/Ascend/ascend-toolkit/set_env.sh \ - && export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/devlib:/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/lib64:$LD_LIBRARY_PATH \ - && mkdir -p build \ - && cd build \ - && cmake .. -DUSE_ASCEND_DIRECT=ON \ - && make -j$(nproc) && make install \ - && rm -rf /tmp/Mooncake - -# Install triton-ascend, ray, protobuf -RUN pip install triton-ascend==3.2.0 \ - 'ray>=2.47.1,<=2.48.0' \ - 'protobuf>3.20.0' && \ - pip cache purge - -# jemalloc preload + devlib LD_LIBRARY_PATH -RUN echo "export LD_PRELOAD=/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2:${LD_PRELOAD}" >> ~/.bashrc && \ - echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib" >> ~/.bashrc + && git clone https://github.com/flagos-ai/FlagGems.git /workspace/FlagGems \ + && git -C /workspace/FlagGems checkout "${FLAGGEMS_VERSION}" \ + && python -m pip install --no-build-isolation /workspace/FlagGems \ + && python -m pip cache purge WORKDIR /workspace # ---------- dev stage ---------- FROM base AS dev -ARG VLLM_VERSION=0.19.0 - -RUN pip install \ +RUN python -m pip install --no-cache-dir \ pytest \ pytest-cov \ pytest-json-report \ ruff \ - pre-commit \ - ninja \ - cmake - -# Install vLLM (uninstall triton pulled by vllm on x86 — conflicts on Ascend) -RUN VLLM_TARGET_DEVICE="empty" pip install "vllm[audio]==${VLLM_VERSION}" \ - --extra-index-url https://download.pytorch.org/whl/cpu/ && \ - pip uninstall -y triton && \ - pip cache purge + pre-commit # ---------- ci stage ---------- -FROM base AS ci +FROM dev AS ci -ARG VLLM_VERSION=0.19.0 - -# Install dev/test tools -RUN pip install \ - pytest \ - pytest-cov \ +RUN python -m pip install --no-cache-dir \ pytest-timeout \ - pytest-json-report \ pytest-metadata \ - numpy \ + numpy==1.26.4 \ requests \ + openai \ decorator \ + pyyaml \ "modelscope>=1.18.1" \ - ruff \ - pre-commit \ - ninja \ - cmake - -# Install vLLM (uninstall triton pulled by vllm on x86 — conflicts on Ascend) -RUN VLLM_TARGET_DEVICE="empty" pip install "vllm[audio]==${VLLM_VERSION}" \ - --extra-index-url https://download.pytorch.org/whl/cpu/ && \ - pip uninstall -y triton && \ - pip cache purge - -# Install FlagGems (NPU backend) -ARG FLAGGEMS_VERSION=v5.0.0 -RUN pip install -U scikit-build-core==0.11 pybind11 \ - && git clone --branch ${FLAGGEMS_VERSION} --depth 1 https://github.com/flagos-ai/FlagGems /workspace/FlagGems \ - && pip install --no-build-isolation \ - --config-settings=cmake.define.FLAGGEMS_BACKEND=NPU \ - /workspace/FlagGems - -# Install FlagTree -RUN pip install flagtree==0.4.0+ascend3.2 \ - --index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple \ - --trusted-host=resource.flagos.net - -# Set environment variables for vLLM and Triton -ENV VLLM_PLUGINS=fl -ENV TRITON_ALL_BLOCKS_PARALLEL=1 + "huggingface_hub>=0.34" # ---------- release stage ---------- FROM base AS release -ARG INDEX_URL -ARG EXTRA_INDEX_URL -ARG VLLM_VERSION=0.19.0 - -# Install vLLM -# Todo - WORKDIR /workspace diff --git a/docker/ascend/README.md b/docker/ascend/README.md new file mode 100644 index 000000000..f8cd7bc8c --- /dev/null +++ b/docker/ascend/README.md @@ -0,0 +1,38 @@ +# Ascend CI image + +The Ascend 910C CI image is built from the environment validated in +`ascend+empty vllm0.20.2+vllm-plugin-fl.docx`: + +```text +quay.io/ascend/vllm-ascend:v0.20.2rc1-a3 +``` + +Build the image from the repository root: + +```bash +docker/build.sh \ + --platform ascend \ + --target ci \ + --image-name harbor.baai.ac.cn/flagscale/vllm-plugin-fl +``` + +Push `ascend-vllm0.20.2-a3-ci` before enabling the image in CI. + +Models are stored on the host and mounted into the container through `/data`. +The common convention is: + +```text +/data/models/ +└── Qwen/ + └── Qwen3-0.6B/ +``` + +The E2E workflow runs `.github/scripts/ascend/download_models.sh` +idempotently. It downloads `Qwen/Qwen3-0.6B` through +`https://hf-mirror.com` only when the model is absent. + +To avoid occupying a scarce NPU runner during development, validate changes +on the host with the same image, setup script, and `tests/run.py` command +first. When host validation passes, dispatch the `Ascend Manual CI` workflow +to produce the recorded unit, functional, E2E, and benchmark results. Ascend +is intentionally excluded from the automatic PR platform registry. diff --git a/docker/build.sh b/docker/build.sh old mode 100644 new mode 100755 index 9a9c9aa3b..597d6601e --- a/docker/build.sh +++ b/docker/build.sh @@ -29,8 +29,9 @@ UV_VERSION="${UV_VERSION:-0.7.12}" CUDA_VERSION="${CUDA_VERSION:-12.8.1}" UBUNTU_VERSION="${UBUNTU_VERSION:-22.04}" VLLM_VERSION="${VLLM_VERSION:-0.19.0}" -CANN_VERSION="${CANN_VERSION:-8.5.1}" -CANN_CHIP="${CANN_CHIP:-910b}" +ASCEND_VLLM_VERSION="${ASCEND_VLLM_VERSION:-0.20.2}" +ASCEND_BASE_IMAGE="${ASCEND_BASE_IMAGE:-quay.io/ascend/vllm-ascend:v0.20.2rc1-a3}" +ASCEND_FLAGGEMS_VERSION="${ASCEND_FLAGGEMS_VERSION:-3e6528cf04f5f964a7b0fa6628de6f0410dbfd02}" METAX_BASE_IMAGE="${METAX_BASE_IMAGE:-harbor.baai.ac.cn/flagos-dev/vllm-plugin-fl:vllm-metax-0.20.0-maca.ai3.7.0.107-torch2.8-py312-ubuntu22.04-amd64}" METAX_PYTHON_VERSION="${METAX_PYTHON_VERSION:-3.12}" METAX_PYTHON_TAG="${METAX_PYTHON_TAG:-py312}" @@ -160,8 +161,9 @@ VERSIONS (override via environment variables): CUDA: CUDA_VERSION CUDA version (default: ${CUDA_VERSION}) Ascend: - CANN_VERSION CANN version (default: ${CANN_VERSION}) - CANN_CHIP CANN chip: 910b, a3 (default: ${CANN_CHIP}) + ASCEND_VLLM_VERSION vLLM version used in generated image tag (default: ${ASCEND_VLLM_VERSION}) + ASCEND_BASE_IMAGE Validated Ascend vLLM base image (default: ${ASCEND_BASE_IMAGE}) + ASCEND_FLAGGEMS_VERSION FlagGems git ref for Ascend (default: ${ASCEND_FLAGGEMS_VERSION}) MetaX: METAX_BASE_IMAGE Base image (default: ${METAX_BASE_IMAGE}) METAX_MACA_VERSION MACA version used in generated image tag (default: ${METAX_MACA_VERSION}) @@ -182,11 +184,12 @@ EXAMPLES: # Build CUDA dev image ./build.sh --target dev - # Build Ascend CI image for 910b + # Build the validated Ascend CI image ./build.sh --platform ascend --target ci - # Build Ascend CI image for A3 - CANN_CHIP=a3 ./build.sh --platform ascend --target ci --build-arg SOC_VERSION=ascend910_9391 + # Override the Ascend base image when validating a new stack + ASCEND_BASE_IMAGE=quay.io/ascend/vllm-ascend:v0.20.2rc1-a3 \ + ./build.sh --platform ascend --target ci # Build Hygon CI image ./build.sh --platform hygon --target ci @@ -257,12 +260,11 @@ fi BUILD_CONTEXT="${SCRIPT_DIR}/${PLATFORM}" # Platform-specific build args and auto-tag -BUILD_ARGS=( - --build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" -) +BUILD_ARGS=() if [[ "${PLATFORM}" == "cuda" ]]; then BUILD_ARGS+=( + --build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" --build-arg "CUDA_VERSION=${CUDA_VERSION}" --build-arg "PYTHON_VERSION=${PYTHON_VERSION}" --build-arg "VLLM_VERSION=${VLLM_VERSION}" @@ -274,19 +276,19 @@ if [[ "${PLATFORM}" == "cuda" ]]; then IMAGE_TAG="cuda${CUDA_VERSION}-ubuntu${UBUNTU_VERSION}-py${PYTHON_VERSION}-${TARGET}" fi elif [[ "${PLATFORM}" == "ascend" ]]; then + VLLM_VERSION="${ASCEND_VLLM_VERSION}" BUILD_ARGS+=( - --build-arg "CANN_VERSION=${CANN_VERSION}" - --build-arg "CANN_CHIP=${CANN_CHIP}" - --build-arg "PYTHON_VERSION=${PYTHON_VERSION}" - --build-arg "VLLM_VERSION=${VLLM_VERSION}" + --build-arg "ASCEND_BASE_IMAGE=${ASCEND_BASE_IMAGE}" + --build-arg "FLAGGEMS_VERSION=${ASCEND_FLAGGEMS_VERSION}" ) if [[ -z "${IMAGE_TAG}" ]]; then - IMAGE_TAG="cann${CANN_VERSION}-${CANN_CHIP}-ubuntu${UBUNTU_VERSION}-py${PYTHON_VERSION}-${TARGET}" + IMAGE_TAG="ascend-vllm${VLLM_VERSION}-a3-${TARGET}" fi elif [[ "${PLATFORM}" == "hygon" ]]; then PYTHON_VERSION="${HYGON_PYTHON_VERSION}" VLLM_VERSION="${HYGON_VLLM_VERSION}" BUILD_ARGS+=( + --build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" --build-arg "HYGON_BASE_IMAGE=${HYGON_BASE_IMAGE}" --build-arg "PYTHON_VERSION=${HYGON_PYTHON_VERSION}" --build-arg "VLLM_VERSION=${HYGON_VLLM_VERSION}" @@ -323,8 +325,8 @@ msg " Target: ${TARGET}" if [[ "${PLATFORM}" == "cuda" ]]; then msg " CUDA: ${CUDA_VERSION}" elif [[ "${PLATFORM}" == "ascend" ]]; then - msg " CANN: ${CANN_VERSION}" - msg " Chip: ${CANN_CHIP}" + msg " Base image: ${ASCEND_BASE_IMAGE}" + msg " FlagGems: ${ASCEND_FLAGGEMS_VERSION}" elif [[ "${PLATFORM}" == "hygon" ]]; then msg " DTK: ${HYGON_DTK_VERSION}" msg " Hygon Python: ${HYGON_PYTHON_VERSION}" @@ -337,8 +339,10 @@ elif [[ "${PLATFORM}" == "metax" ]]; then msg " MetaX Python: ${METAX_PYTHON_VERSION}" msg " Base image: ${METAX_BASE_IMAGE}" fi -msg " Ubuntu: ${UBUNTU_VERSION}" -msg " Python: ${PYTHON_VERSION}" +if [[ "${PLATFORM}" != "ascend" ]]; then + msg " Ubuntu: ${UBUNTU_VERSION}" + msg " Python: ${PYTHON_VERSION}" +fi msg " vLLM: ${VLLM_VERSION}" msg "" diff --git a/examples/glm_5_offline_inference.py b/examples/glm_5_offline_inference.py index f05450db7..8021be49b 100644 --- a/examples/glm_5_offline_inference.py +++ b/examples/glm_5_offline_inference.py @@ -19,7 +19,7 @@ sampling_params = SamplingParams(max_tokens=10, temperature=0.0) # Create an LLM. llm = LLM( - model="/models/GLM-5-FP8", + model="/data/models/GLM-5-FP8", tensor_parallel_size=8, pipeline_parallel_size=1, enforce_eager=False, diff --git a/examples/minimax_m27_offline_inference.py b/examples/minimax_m27_offline_inference.py index e44d5a70c..24412d31a 100644 --- a/examples/minimax_m27_offline_inference.py +++ b/examples/minimax_m27_offline_inference.py @@ -19,7 +19,7 @@ sampling_params = SamplingParams(max_tokens=10, temperature=0.0) # Create an LLM. llm = LLM( - model="/models/MiniMax-M2.7", + model="/data/models/MiniMax-M2.7", tensor_parallel_size=8, pipeline_parallel_size=1, enforce_eager=False, diff --git a/examples/qwen3_5_offline_inference.py b/examples/qwen3_5_offline_inference.py index cdc8ea865..2bc2543a5 100644 --- a/examples/qwen3_5_offline_inference.py +++ b/examples/qwen3_5_offline_inference.py @@ -19,7 +19,7 @@ sampling_params = SamplingParams(max_tokens=10, temperature=0.0) # Create an LLM. llm = LLM( - model="/models/Qwen3.5-397B-A17B", + model="/data/models/Qwen/Qwen3.5-397B-A17B", tensor_parallel_size=8, pipeline_parallel_size=2, enforce_eager=False, diff --git a/requirements/ascend.txt b/requirements/ascend.txt index a491ed272..0b9eff6af 100644 --- a/requirements/ascend.txt +++ b/requirements/ascend.txt @@ -11,3 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +# Keep the validated Ascend runtime compatible with FlagGems and +# triton-ascend. The generic test extra otherwise resolves NumPy 2.x. +numpy==1.26.4 diff --git a/tests/models/qwen3/06b_tp2.yaml b/tests/models/qwen3/06b_tp2.yaml index 556b74663..cf628034a 100644 --- a/tests/models/qwen3/06b_tp2.yaml +++ b/tests/models/qwen3/06b_tp2.yaml @@ -30,3 +30,14 @@ generate: parametrize: enforce_eager: [true, false] dtype: ["bfloat16"] + +serve: + served_model_name: "qwen" + endpoints: ["chat"] + stream: false + max_tokens: 64 + chat_messages: + - role: "user" + content: "Introduce large language models briefly." + sampling: + temperature: 0.0 diff --git a/tests/platforms/ascend.yaml b/tests/platforms/ascend.yaml index b30caf50d..d0e58b7d2 100644 --- a/tests/platforms/ascend.yaml +++ b/tests/platforms/ascend.yaml @@ -33,7 +33,7 @@ platform: ascend vendor: huawei device_types: - 910b: + 910c: memory_gb: 64 tags: [ascend, bf16] @@ -57,14 +57,15 @@ unsupported_features: [] env_defaults: {} # ---- Device-specific test configurations ------------------------------------ -910b: - name: "910b" +910c: + name: "910c" tests: e2e: # Add or remove test cases per model - inference: {} + inference: + qwen3: ["06b_tp2"] serving: - qwen3: ["4b_tp2"] + qwen3: ["06b_tp2"] functional: # Include patterns: "*" for all, or list specific paths include: "*"