mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-02 05:11:18 +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)
|
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):
|
|||||||
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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user