vllm.ir.util ¶
hash_source ¶
Utility method to hash the sources of functions or objects. :param srcs: strings or objects to add to the hash. Objects and functions have their source inspected. :return:
Source code in vllm/ir/util.py
weak_cache ¶
weak_lru_cache ¶
LRU Cache decorator that keeps a weak reference to 'self'. This avoids memory leakage, which happens when functools.lru_cache stores a reference to self in the global cache.
Taken from: https://stackoverflow.com/a/68052994/5082708