use base version for version comparison (#19587)

Signed-off-by: Boyuan Feng <boyuan@meta.com>
This commit is contained in:
Boyuan Feng 2025-06-13 00:09:34 -07:00 committed by GitHub
parent cefdb9962d
commit ce688ad46e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ logger = init_logger(__name__)
def make_compiler(compilation_config: CompilationConfig) -> CompilerInterface: def make_compiler(compilation_config: CompilationConfig) -> CompilerInterface:
if compilation_config.use_inductor: if compilation_config.use_inductor:
if envs.VLLM_USE_STANDALONE_COMPILE and is_torch_equal_or_newer( if envs.VLLM_USE_STANDALONE_COMPILE and is_torch_equal_or_newer(
"2.8.0"): "2.8.0a"):
logger.debug("Using InductorStandaloneAdaptor") logger.debug("Using InductorStandaloneAdaptor")
return InductorStandaloneAdaptor() return InductorStandaloneAdaptor()
else: else:

View File

@ -44,14 +44,14 @@ class TorchAOConfig(QuantizationConfig):
""" """
# TorchAO quantization relies on tensor subclasses. In order, # TorchAO quantization relies on tensor subclasses. In order,
# to enable proper caching this needs standalone compile # to enable proper caching this needs standalone compile
if is_torch_equal_or_newer("2.8.0"): if is_torch_equal_or_newer("2.8.0a"):
os.environ["VLLM_TEST_STANDALONE_COMPILE"] = "1" os.environ["VLLM_TEST_STANDALONE_COMPILE"] = "1"
logger.info( logger.info(
"Using TorchAO: Setting VLLM_TEST_STANDALONE_COMPILE=1") "Using TorchAO: Setting VLLM_TEST_STANDALONE_COMPILE=1")
# TODO: remove after the torch dependency is updated to 2.8 # TODO: remove after the torch dependency is updated to 2.8
if is_torch_equal_or_newer( if is_torch_equal_or_newer(
"2.7.0") and not is_torch_equal_or_newer("2.8.0"): "2.7.0") and not is_torch_equal_or_newer("2.8.0a"):
os.environ["VLLM_DISABLE_COMPILE_CACHE"] = "1" os.environ["VLLM_DISABLE_COMPILE_CACHE"] = "1"
logger.info("Using TorchAO: Setting VLLM_DISABLE_COMPILE_CACHE=1") logger.info("Using TorchAO: Setting VLLM_DISABLE_COMPILE_CACHE=1")
""" """