mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-11 06:44:28 +08:00
[BugFix] Update AttnFusionPass cache key (#21947)
Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
parent
a59cd9d9f7
commit
8026a335a1
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user