File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
model_executor/layers/quantization Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 3131def make_compiler (compilation_config : CompilationConfig ) -> CompilerInterface :
3232 if compilation_config .use_inductor :
3333 if envs .VLLM_USE_STANDALONE_COMPILE and is_torch_equal_or_newer (
34- "2.8.0 " ):
34+ "2.8.0a " ):
3535 logger .debug ("Using InductorStandaloneAdaptor" )
3636 return InductorStandaloneAdaptor ()
3737 else :
Original file line number Diff line number Diff line change @@ -44,14 +44,14 @@ def __init__(self,
4444 """
4545 # TorchAO quantization relies on tensor subclasses. In order,
4646 # to enable proper caching this needs standalone compile
47- if is_torch_equal_or_newer("2.8.0 "):
47+ if is_torch_equal_or_newer("2.8.0a "):
4848 os.environ["VLLM_TEST_STANDALONE_COMPILE"] = "1"
4949 logger.info(
5050 "Using TorchAO: Setting VLLM_TEST_STANDALONE_COMPILE=1")
5151
5252 # TODO: remove after the torch dependency is updated to 2.8
5353 if is_torch_equal_or_newer(
54- "2.7.0") and not is_torch_equal_or_newer("2.8.0 "):
54+ "2.7.0") and not is_torch_equal_or_newer("2.8.0a "):
5555 os.environ["VLLM_DISABLE_COMPILE_CACHE"] = "1"
5656 logger.info("Using TorchAO: Setting VLLM_DISABLE_COMPILE_CACHE=1")
5757 """
Original file line number Diff line number Diff line change @@ -2905,10 +2905,6 @@ def sha256(input) -> int:
29052905def is_torch_equal_or_newer (target : str ) -> bool :
29062906 """Check if the installed torch version is >= the target version.
29072907
2908- This function uses base_version for comparison such that pre release
2909- versions are considered to be older than the target version. For example,
2910- torch version 2.8.0a0+git093fd47 is considered to be older than 2.8.0.
2911-
29122908 Args:
29132909 target: a version string, like "2.6.0".
29142910
@@ -2917,8 +2913,7 @@ def is_torch_equal_or_newer(target: str) -> bool:
29172913 """
29182914 try :
29192915 torch_version = version .parse (str (torch .__version__ ))
2920- base_version = version .parse (torch_version .base_version )
2921- return base_version >= version .parse (target )
2916+ return torch_version >= version .parse (target )
29222917 except Exception :
29232918 # Fallback to PKG-INFO to load the package info, needed by the doc gen.
29242919 return Version (importlib .metadata .version ('torch' )) >= Version (target )
You can’t perform that action at this time.
0 commit comments