Skip to content

Commit

Permalink
Add some docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
  • Loading branch information
tdoublep committed Jul 5, 2024
1 parent 4dd9367 commit 889d6dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vllm/triton_utils/custom_cache_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


def maybe_set_triton_cache_manager() -> None:
"""Set environment variable to tell Triton to use a
custom cache manager"""
cache_manger = os.environ.get("TRITON_CACHE_MANAGER", None)
if cache_manger is None:
manager = "vllm.triton_utils.custom_cache_manager:CustomCacheManager"
Expand All @@ -17,6 +19,11 @@ def maybe_set_triton_cache_manager() -> None:


class CustomCacheManager(FileCacheManager):
"""Re-implements Triton's cache manager, ensuring that a
unique cache directory is created for each process. This is
needed to avoid collisions when running with tp>1 and
using multi-processing as the distributed backend.
"""

def __init__(self, key, override=False, dump=False):
self.key = key
Expand Down

0 comments on commit 889d6dd

Please sign in to comment.