[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:
co-authored by
Tyler Michael Smith
parent
463aa5e30f
commit
6dcc5d7cae
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user