Skip to content

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(target)

Check if the installed torch version is == the target version (a string like "2.6.0").

is_torch_equal_or_newer(target)

Check if the installed torch version is >= the target version (a string like "2.6.0").