Skip to content

Commit

Permalink
[Misc] Remove VLLM_BUILD_WITH_NEURON env variable (#5389)
Browse files Browse the repository at this point in the history
  • Loading branch information
WoosukKwon authored Jun 11, 2024
1 parent 3c4cebf commit 8bab495
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.neuron
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY ./requirements-neuron.txt /app/vllm/requirements-neuron.txt
RUN cd /app/vllm \
&& python3 -m pip install -U -r requirements-neuron.txt

ENV VLLM_BUILD_WITH_NEURON 1
ENV VLLM_TARGET_DEVICE neuron
RUN cd /app/vllm \
&& pip install -e . \
&& cd ..
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _is_neuron() -> bool:
subprocess.run(["neuron-ls"], capture_output=True, check=True)
except (FileNotFoundError, PermissionError, subprocess.CalledProcessError):
torch_neuronx_installed = False
return torch_neuronx_installed or envs.VLLM_BUILD_WITH_NEURON
return torch_neuronx_installed or VLLM_TARGET_DEVICE == "neuron"


def _is_cpu() -> bool:
Expand Down
5 changes: 0 additions & 5 deletions vllm/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
VLLM_TARGET_DEVICE: str = "cuda"
MAX_JOBS: Optional[str] = None
NVCC_THREADS: Optional[str] = None
VLLM_BUILD_WITH_NEURON: bool = False
VLLM_USE_PRECOMPILED: bool = False
VLLM_INSTALL_PUNICA_KERNELS: bool = False
CMAKE_BUILD_TYPE: Optional[str] = None
Expand Down Expand Up @@ -63,10 +62,6 @@
"NVCC_THREADS":
lambda: os.getenv("NVCC_THREADS", None),

# If set, vllm will build with Neuron support
"VLLM_BUILD_WITH_NEURON":
lambda: bool(os.environ.get("VLLM_BUILD_WITH_NEURON", False)),

# If set, vllm will use precompiled binaries (*.so)
"VLLM_USE_PRECOMPILED":
lambda: bool(os.environ.get("VLLM_USE_PRECOMPILED")),
Expand Down

0 comments on commit 8bab495

Please sign in to comment.