"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "6f1e7f7226447f606a0731376a2d0bd080aa2767"
Unverified Commit 8026a335 authored by Richard Zou's avatar Richard Zou Committed by GitHub
Browse files

[BugFix] Update AttnFusionPass cache key (#21947)


Signed-off-by: default avatarRichard Zou <zou3519@gmail.com>
parent a59cd9d9
...@@ -164,3 +164,6 @@ class AttnFusionPass(VllmInductorPass): ...@@ -164,3 +164,6 @@ class AttnFusionPass(VllmInductorPass):
logger.debug("Fused quantization onto %s attention nodes", count) logger.debug("Fused quantization onto %s attention nodes", count)
self.dump_graph(graph, "after_attn_fusion") self.dump_graph(graph, "after_attn_fusion")
self.end_and_log() self.end_and_log()
def uuid(self):
return VllmInductorPass.hash_source(self, AttentionStaticQuantPattern)
...@@ -76,9 +76,10 @@ class InductorPass(CustomGraphPass): ...@@ -76,9 +76,10 @@ class InductorPass(CustomGraphPass):
for src in srcs: for src in srcs:
if isinstance(src, str): if isinstance(src, str):
src_str = src src_str = src
elif isinstance(src, types.FunctionType): elif isinstance(src, (types.FunctionType, type)):
src_str = inspect.getsource(src) src_str = inspect.getsource(src)
else: else:
# object instance
src_str = inspect.getsource(src.__class__) src_str = inspect.getsource(src.__class__)
hasher.update(src_str.encode("utf-8")) hasher.update(src_str.encode("utf-8"))
return hasher.hexdigest() return hasher.hexdigest()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment