Skip to content

Commit 8bab495

Browse files
authored
[Misc] Remove VLLM_BUILD_WITH_NEURON env variable (#5389)
1 parent 3c4cebf commit 8bab495

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

Dockerfile.neuron

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY ./requirements-neuron.txt /app/vllm/requirements-neuron.txt
2828
RUN cd /app/vllm \
2929
&& python3 -m pip install -U -r requirements-neuron.txt
3030

31-
ENV VLLM_BUILD_WITH_NEURON 1
31+
ENV VLLM_TARGET_DEVICE neuron
3232
RUN cd /app/vllm \
3333
&& pip install -e . \
3434
&& cd ..

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def _is_neuron() -> bool:
222222
subprocess.run(["neuron-ls"], capture_output=True, check=True)
223223
except (FileNotFoundError, PermissionError, subprocess.CalledProcessError):
224224
torch_neuronx_installed = False
225-
return torch_neuronx_installed or envs.VLLM_BUILD_WITH_NEURON
225+
return torch_neuronx_installed or VLLM_TARGET_DEVICE == "neuron"
226226

227227

228228
def _is_cpu() -> bool:

vllm/envs.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
VLLM_TARGET_DEVICE: str = "cuda"
3434
MAX_JOBS: Optional[str] = None
3535
NVCC_THREADS: Optional[str] = None
36-
VLLM_BUILD_WITH_NEURON: bool = False
3736
VLLM_USE_PRECOMPILED: bool = False
3837
VLLM_INSTALL_PUNICA_KERNELS: bool = False
3938
CMAKE_BUILD_TYPE: Optional[str] = None
@@ -63,10 +62,6 @@
6362
"NVCC_THREADS":
6463
lambda: os.getenv("NVCC_THREADS", None),
6564

66-
# If set, vllm will build with Neuron support
67-
"VLLM_BUILD_WITH_NEURON":
68-
lambda: bool(os.environ.get("VLLM_BUILD_WITH_NEURON", False)),
69-
7065
# If set, vllm will use precompiled binaries (*.so)
7166
"VLLM_USE_PRECOMPILED":
7267
lambda: bool(os.environ.get("VLLM_USE_PRECOMPILED")),

0 commit comments

Comments
 (0)