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):
logger.debug("Fused quantization onto %s attention nodes", count)
self.dump_graph(graph, "after_attn_fusion")
self.end_and_log()
def uuid(self):
return VllmInductorPass.hash_source(self, AttentionStaticQuantPattern)
......@@ -76,9 +76,10 @@ class InductorPass(CustomGraphPass):
for src in srcs:
if isinstance(src, str):
src_str = src
elif isinstance(src, types.FunctionType):
elif isinstance(src, (types.FunctionType, type)):
src_str = inspect.getsource(src)
else:
# object instance
src_str = inspect.getsource(src.__class__)
hasher.update(src_str.encode("utf-8"))
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