Skip to content

Commit

Permalink
Small updates from review
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Hill <nickhill@us.ibm.com>
Signed-off-by: Nick Hill <nickhill@us.ibm.com>
Signed-off-by: Joe Runde <joe@joerun.de>
  • Loading branch information
joerunde and njhill committed Jun 3, 2024
1 parent cf4eae9 commit 4c5c1e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions triton_patch/custom_cache_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=}")

0 comments on commit 4c5c1e7

Please sign in to comment.