chip type judgement code optimization (#4485)
### What this PR does / why we need it? | | cpu envir | npu envir | |---|---|---| | set `SOC_VERSION` | check if `SOC_VERSION` is in dict `soc_to_device`, if not, raise an error that can not support current chip type. | print a warning log when `SOC_VERSION` is not equal to chip type from `npu-smi`, same as left for others. | | not set `SOC_VERSION` | raise an error that `SOC_VERSION` is necessary when compiling in a cpu envir. | use chip type from `npu-smi` to compile vllm-ascend. | ### Does this PR introduce _any_ user-facing change? Now we must set env `SOC_VERSION` when compiling in cpu envir. ### How was this patch tested? - vLLM version: v0.11.2 - vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.2 Signed-off-by: zzzzwwjj <1183291235@qq.com>
This commit is contained in:
2
.github/Dockerfile.buildwheel
vendored
2
.github/Dockerfile.buildwheel
vendored
@@ -18,10 +18,12 @@ ARG PY_VERSION=3.11
|
||||
FROM quay.io/ascend/manylinux:8.3.rc1-910b-manylinux_2_28-py${PY_VERSION}
|
||||
|
||||
ARG COMPILE_CUSTOM_KERNELS=1
|
||||
ARG SOC_VERSION
|
||||
|
||||
# Define environments
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV COMPILE_CUSTOM_KERNELS=${COMPILE_CUSTOM_KERNELS}
|
||||
ENV SOC_VERSION=$SOC_VERSION
|
||||
RUN yum update -y && \
|
||||
yum install -y python3-pip git vim wget net-tools gcc gcc-c++ make cmake numactl-devel && \
|
||||
rm -rf /var/cache/yum
|
||||
|
||||
1
.github/workflows/image_310p_openeuler.yml
vendored
1
.github/workflows/image_310p_openeuler.yml
vendored
@@ -132,4 +132,5 @@ jobs:
|
||||
file: Dockerfile.310p.openEuler
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend310p1
|
||||
provenance: false
|
||||
|
||||
1
.github/workflows/image_310p_ubuntu.yml
vendored
1
.github/workflows/image_310p_ubuntu.yml
vendored
@@ -128,4 +128,5 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend310p1
|
||||
provenance: false
|
||||
1
.github/workflows/image_a3_openeuler.yml
vendored
1
.github/workflows/image_a3_openeuler.yml
vendored
@@ -131,5 +131,6 @@ jobs:
|
||||
file: Dockerfile.a3.openEuler
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend910_9391
|
||||
provenance: false
|
||||
|
||||
|
||||
1
.github/workflows/image_a3_ubuntu.yml
vendored
1
.github/workflows/image_a3_ubuntu.yml
vendored
@@ -127,5 +127,6 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend910_9391
|
||||
provenance: false
|
||||
|
||||
|
||||
1
.github/workflows/image_openeuler.yml
vendored
1
.github/workflows/image_openeuler.yml
vendored
@@ -131,4 +131,5 @@ jobs:
|
||||
file: Dockerfile.openEuler
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend910b1
|
||||
provenance: false
|
||||
|
||||
1
.github/workflows/image_ubuntu.yml
vendored
1
.github/workflows/image_ubuntu.yml
vendored
@@ -128,4 +128,5 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
PIP_INDEX_URL=https://pypi.org/simple
|
||||
SOC_VERSION=ascend910b1
|
||||
provenance: false
|
||||
|
||||
2
.github/workflows/release_code.yml
vendored
2
.github/workflows/release_code.yml
vendored
@@ -59,6 +59,8 @@ jobs:
|
||||
python3 -m pip install twine setuptools_scm
|
||||
|
||||
- name: Generate tar.gz
|
||||
env:
|
||||
SOC_VERSION: ascend910b1
|
||||
run: |
|
||||
python3 setup.py sdist
|
||||
ls dist
|
||||
|
||||
1
.github/workflows/release_whl.yml
vendored
1
.github/workflows/release_whl.yml
vendored
@@ -69,6 +69,7 @@ jobs:
|
||||
ls
|
||||
docker build -f ./.github/Dockerfile.buildwheel \
|
||||
--build-arg PY_VERSION=${{ matrix.python-version }} \
|
||||
--build-arg SOC_VERSION=ascend910b1 \
|
||||
-t wheel:v1 .
|
||||
docker run --rm \
|
||||
-u $(id -u):$(id -g) \
|
||||
|
||||
@@ -81,6 +81,7 @@ jobs:
|
||||
env:
|
||||
VLLM_LOGGING_LEVEL: ERROR
|
||||
VLLM_USE_MODELSCOPE: True
|
||||
SOC_VERSION: ascend910b1
|
||||
strategy:
|
||||
matrix:
|
||||
vllm_version: [v0.11.2]
|
||||
|
||||
Reference in New Issue
Block a user