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:
@@ -20,8 +20,10 @@ FROM quay.io/ascend/cann:8.3.rc1-910b-openeuler24.03-py3.11
|
||||
ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
|
||||
ARG COMPILE_CUSTOM_KERNELS=1
|
||||
ARG MOONCAKE_TAG="v0.3.7.post2"
|
||||
ARG SOC_VERSION
|
||||
|
||||
ENV COMPILE_CUSTOM_KERNELS=${COMPILE_CUSTOM_KERNELS}
|
||||
ENV SOC_VERSION=$SOC_VERSION
|
||||
|
||||
RUN pip config set global.index-url ${PIP_INDEX_URL}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user