[Misc] Allow install empty package from pip (#41074)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
@@ -1257,11 +1257,15 @@ def get_vllm_version() -> str:
|
|||||||
version = get_version(write_to="vllm/_version.py")
|
version = get_version(write_to="vllm/_version.py")
|
||||||
sep = "+" if "+" not in version else "." # dev versions might contain +
|
sep = "+" if "+" not in version else "." # dev versions might contain +
|
||||||
|
|
||||||
|
if not envs.VLLM_SKIP_VERSION_SUFFIX:
|
||||||
if _no_device():
|
if _no_device():
|
||||||
if envs.VLLM_TARGET_DEVICE == "empty":
|
if envs.VLLM_TARGET_DEVICE == "empty":
|
||||||
version += f"{sep}empty"
|
version += f"{sep}empty"
|
||||||
elif _is_cuda():
|
elif _is_cuda():
|
||||||
if USE_PRECOMPILED_EXTENSIONS and not envs.VLLM_SKIP_PRECOMPILED_VERSION_SUFFIX:
|
if (
|
||||||
|
USE_PRECOMPILED_EXTENSIONS
|
||||||
|
and not envs.VLLM_SKIP_PRECOMPILED_VERSION_SUFFIX
|
||||||
|
):
|
||||||
version += f"{sep}precompiled"
|
version += f"{sep}precompiled"
|
||||||
else:
|
else:
|
||||||
cuda_version = str(get_nvcc_cuda_version())
|
cuda_version = str(get_nvcc_cuda_version())
|
||||||
|
|||||||
@@ -2176,6 +2176,10 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
|||||||
# Each op additionally checks its own shape / dtype constraints and falls
|
# Each op additionally checks its own shape / dtype constraints and falls
|
||||||
# back to the eager path when they do not hold.
|
# back to the eager path when they do not hold.
|
||||||
"VLLM_ENABLE_HPC_OPS": lambda: bool(int(os.getenv("VLLM_ENABLE_HPC_OPS", "0"))),
|
"VLLM_ENABLE_HPC_OPS": lambda: bool(int(os.getenv("VLLM_ENABLE_HPC_OPS", "0"))),
|
||||||
|
# Whether to skip version suffix when building package
|
||||||
|
"VLLM_SKIP_VERSION_SUFFIX": lambda: bool(
|
||||||
|
int(os.getenv("VLLM_SKIP_VERSION_SUFFIX", "0"))
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2344,6 +2348,7 @@ def compile_factors() -> dict[str, object]:
|
|||||||
"LOCAL_RANK",
|
"LOCAL_RANK",
|
||||||
"CUDA_VISIBLE_DEVICES",
|
"CUDA_VISIBLE_DEVICES",
|
||||||
"NO_COLOR",
|
"NO_COLOR",
|
||||||
|
"VLLM_SKIP_VERSION_SUFFIX",
|
||||||
}
|
}
|
||||||
|
|
||||||
from vllm.config.utils import normalize_value
|
from vllm.config.utils import normalize_value
|
||||||
|
|||||||
Reference in New Issue
Block a user