Unverified Commit ce688ad4 authored by Boyuan Feng's avatar Boyuan Feng Committed by GitHub
Browse files

use base version for version comparison (#19587)


Signed-off-by: default avatarBoyuan Feng <boyuan@meta.com>
parent cefdb996
...@@ -31,7 +31,7 @@ logger = init_logger(__name__) ...@@ -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:
......
...@@ -44,14 +44,14 @@ class TorchAOConfig(QuantizationConfig): ...@@ -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")
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment