From 4c5c1e75f1c99a41410e135f702e520345735e16 Mon Sep 17 00:00:00 2001 From: Joe Runde Date: Mon, 3 Jun 2024 10:20:43 -0600 Subject: [PATCH] Small updates from review Co-authored-by: Nick Hill Signed-off-by: Nick Hill Signed-off-by: Joe Runde --- triton_patch/custom_cache_manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/triton_patch/custom_cache_manager.py b/triton_patch/custom_cache_manager.py index a923d9e63..5c27c072e 100644 --- a/triton_patch/custom_cache_manager.py +++ b/triton_patch/custom_cache_manager.py @@ -21,11 +21,12 @@ def __init__(self, key, override=False, dump=False): # create cache directory if it doesn't exist self.cache_dir = os.getenv("TRITON_CACHE_DIR", "").strip() or default_cache_dir() - self.cache_dir = self.cache_dir + "_" + str(os.getpid()) - print(f"{self.cache_dir=}") if self.cache_dir: + self.cache_dir = f"{self.cache_dir}_{os.getpid()}" self.cache_dir = os.path.join(self.cache_dir, self.key) self.lock_path = os.path.join(self.cache_dir, "lock") os.makedirs(self.cache_dir, exist_ok=True) else: raise RuntimeError("Could not create or locate cache dir") + + print(f"Triton cache dir: {self.cache_dir=}") \ No newline at end of file