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 31
31
def make_compiler (compilation_config : CompilationConfig ) -> CompilerInterface :
32
32
if compilation_config .use_inductor :
33
33
if envs .VLLM_USE_STANDALONE_COMPILE and is_torch_equal_or_newer (
34
- "2.8.0 " ):
34
+ "2.8.0a " ):
35
35
logger .debug ("Using InductorStandaloneAdaptor" )
36
36
return InductorStandaloneAdaptor ()
37
37
else :
Original file line number Diff line number Diff line change @@ -44,14 +44,14 @@ def __init__(self,
44
44
"""
45
45
# TorchAO quantization relies on tensor subclasses. In order,
46
46
# 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 "):
48
48
os.environ["VLLM_TEST_STANDALONE_COMPILE"] = "1"
49
49
logger.info(
50
50
"Using TorchAO: Setting VLLM_TEST_STANDALONE_COMPILE=1")
51
51
52
52
# TODO: remove after the torch dependency is updated to 2.8
53
53
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 "):
55
55
os.environ["VLLM_DISABLE_COMPILE_CACHE"] = "1"
56
56
logger.info("Using TorchAO: Setting VLLM_DISABLE_COMPILE_CACHE=1")
57
57
"""
Original file line number Diff line number Diff line change @@ -2905,10 +2905,6 @@ def sha256(input) -> int:
2905
2905
def is_torch_equal_or_newer (target : str ) -> bool :
2906
2906
"""Check if the installed torch version is >= the target version.
2907
2907
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
-
2912
2908
Args:
2913
2909
target: a version string, like "2.6.0".
2914
2910
@@ -2917,8 +2913,7 @@ def is_torch_equal_or_newer(target: str) -> bool:
2917
2913
"""
2918
2914
try :
2919
2915
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 )
2922
2917
except Exception :
2923
2918
# Fallback to PKG-INFO to load the package info, needed by the doc gen.
2924
2919
return Version (importlib .metadata .version ('torch' )) >= Version (target )
You can’t perform that action at this time.
0 commit comments