vllm.utils.torch_version
¶
Torch version checks.
Kept free of other vLLM imports so that early importers such as
vllm.env_override don't pull in vllm.utils.torch_utils, which resolves
current_platform at import time.
Functions:
-
is_torch_equal–Check if the installed torch version is == the target version
-
is_torch_equal_or_newer–Check if the installed torch version is >= the target version
is_torch_equal(target)
¶
Check if the installed torch version is == the target version (a string like "2.6.0").
Source code in vllm/utils/torch_version.py
is_torch_equal_or_newer(target)
¶
Check if the installed torch version is >= the target version (a string like "2.6.0").