@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 604f235937
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 04:15 UTC

[Misc] add error message in non linux platform (#3438)

youkaichao committed Mar 15, 2024 at 14:21 UTC 604f235937684aa173afec96cca5b02e3b0bc154
1 file changed +8 -1
setup.py
+8 -1
@@ -9,12 +9,17 @@ from typing import List, Set
9
10 from packaging.version import parse, Version
11 import setuptools
12 +import sys
13 import torch
14 import torch.utils.cpp_extension as torch_cpp_ext
15 from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME, ROCM_HOME
16
17 ROOT_DIR = os.path.dirname(__file__)
18
19 +# vLLM only supports Linux platform
20 +assert sys.platform.startswith(
21 + "linux"), "vLLM only supports Linux platform (including WSL)."
22 +
23 # If you are developing the C++ backend of vLLM, consider building vLLM with
24 # `python setup.py develop` since it will give you incremental builds.
25 # The downside is that this method is deprecated, see
@@ -402,11 +407,13 @@ def get_vllm_version() -> str:
407 if neuron_version != MAIN_CUDA_VERSION:
408 neuron_version_str = neuron_version.replace(".", "")[:3]
409 version += f"+neuron{neuron_version_str}"
405 - else:
410 + elif _is_cuda():
411 cuda_version = str(nvcc_cuda_version)
412 if cuda_version != MAIN_CUDA_VERSION:
413 cuda_version_str = cuda_version.replace(".", "")[:3]
414 version += f"+cu{cuda_version_str}"
415 + else:
416 + raise RuntimeError("Unknown runtime environment.")
417
418 return version
419