From 70f2c2a7094cc5fbc6788f2b0b9b9da6973290cd Mon Sep 17 00:00:00 2001 From: Jee Jee Li Date: Fri, 28 Mar 2025 17:10:40 +0800 Subject: [PATCH] [Bugfix] Fix 'InductorAdaptor object has no attribute 'cache_dir' (#15674) Signed-off-by: Jee Jee Li --- vllm/compilation/compiler_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/compilation/compiler_interface.py b/vllm/compilation/compiler_interface.py index ab0f98bdaa3e5..d6e44fa6d3414 100644 --- a/vllm/compilation/compiler_interface.py +++ b/vllm/compilation/compiler_interface.py @@ -144,6 +144,7 @@ class InductorAdaptor(CompilerInterface): return hash_str def initialize_cache(self, cache_dir: str, disable_cache: bool = False): + self.cache_dir = cache_dir if disable_cache: return # redirect the cache directory to a sub-directory @@ -156,7 +157,6 @@ class InductorAdaptor(CompilerInterface): triton_cache = os.path.join(cache_dir, "triton_cache") os.makedirs(triton_cache, exist_ok=True) os.environ["TRITON_CACHE_DIR"] = triton_cache - self.cache_dir = cache_dir def compile( self,