[Misc] Remove VLLM_BUILD_WITH_NEURON env variable (#5389)

This commit is contained in:
Woosuk Kwon 2024-06-11 00:37:56 -07:00 committed by GitHub
parent 3c4cebf751
commit 8bab4959be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 7 deletions

View File

@ -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 ..

View File

@ -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:

View File

@ -33,7 +33,6 @@ if TYPE_CHECKING:
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
@ -63,10 +62,6 @@ environment_variables: Dict[str, Callable[[], Any]] = {
"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")),