[Doc][Installation] Clarify SOC_VERSION for CPU-only source builds (#7278)

### What this PR does / why we need it?
- Clarify that `SOC_VERSION` must be set when building from source in a
CPU-only environment where `npu-smi` is unavailable.
- Add concrete `SOC_VERSION` examples (A2/A3/300I/A5) and point users to
`Dockerfile*` defaults.
- Improve the `setup.py` error message so users get actionable guidance
when `SOC_VERSION` is missing.

Fixes #6816.

### Does this PR introduce _any_ user-facing change?
- Yes. Documentation is updated and the build-time error message is more
informative.

### How was this patch tested?
- (Local) Syntax check: `python -m compileall setup.py`.

- vLLM version: v0.17.0
- vLLM main:
4034c3d32e

Signed-off-by: NJX-njx <3771829673@qq.com>
This commit is contained in:
NJX
2026-03-14 22:38:25 +08:00
committed by GitHub
parent 199df03524
commit bb506a1c99
3 changed files with 33 additions and 1 deletions

View File

@@ -177,6 +177,13 @@ If you are building custom operators for Atlas A3, you should run `git submodule
```{note}
To build custom operators, gcc/g++ higher than 8 and C++17 or higher are required. If you are using `pip install -e .` and encounter a torch-npu version conflict, please install with `pip install --no-build-isolation -e .` to build on system env.
If you encounter other problems during compiling, it is probably because an unexpected compiler is being used, you may export `CXX_COMPILER` and `C_COMPILER` in the environment to specify your g++ and gcc locations before compiling.
If you are building in a CPU-only environment where `npu-smi` is unavailable, you need to set `SOC_VERSION` before `pip install -e .` so the build can target the correct chip. You can refer to `Dockerfile*` defaults, for example:
- Atlas A2: `export SOC_VERSION=ascend910b1`
- Atlas A3: `export SOC_VERSION=ascend910_9391`
- Atlas 300I: `export SOC_VERSION=ascend310p1`
- Atlas A5: `export SOC_VERSION=<value starting with "ascend950">`
```
## Set up using Docker