[Bugfix] Include device index in compile cache paths (#38962)

Signed-off-by: Neil Schemenauer <nas@arctrix.com>
Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Co-authored-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
This commit is contained in:
Neil Schemenauer
2026-08-21 09:07:16 -07:00
committed by GitHub
co-authored by Tyler Michael Smith
parent 463aa5e30f
commit 6dcc5d7cae
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -559,7 +559,8 @@ def _support_torch_compile(
rank = self.vllm_config.parallel_config.rank
dp_rank = self.vllm_config.parallel_config.data_parallel_index
cache_dir = os.path.join(cache_dir, f"rank_{rank}_{dp_rank}")
dev = torch.accelerator.current_device_index()
cache_dir = os.path.join(cache_dir, f"rank_{rank}_{dp_rank}_dev{dev}")
aot_compilation_path = os.path.join(cache_dir, "model")
if not envs.VLLM_DISABLE_COMPILE_CACHE:
loaded_fn = _try_load_aot_compiled_fn(self, aot_compilation_path)