From 17f320cb5ccfc4cb40c31640e931bf06f466772c Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Thu, 28 Nov 2024 13:49:41 -0500 Subject: [PATCH 1/2] Speed up invoke --- src/compiler/interpreter.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/interpreter.jl b/src/compiler/interpreter.jl index e1204a709f..497e8b2669 100644 --- a/src/compiler/interpreter.jl +++ b/src/compiler/interpreter.jl @@ -889,7 +889,7 @@ function abstract_call_known( end return Base.@invoke abstract_call_known( interp::AbstractInterpreter, - f, + f::Any, arginfo::ArgInfo, si::StmtInfo, sv::AbsIntState, From 998fbbdfbd6860f047039b8de539388cbd65de53 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Thu, 28 Nov 2024 14:35:58 -0500 Subject: [PATCH 2/2] handler specialize --- src/compiler/interpreter.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/interpreter.jl b/src/compiler/interpreter.jl index 497e8b2669..1e442482be 100644 --- a/src/compiler/interpreter.jl +++ b/src/compiler/interpreter.jl @@ -759,13 +759,13 @@ end end function abstract_call_known( - @nospecialize(interp::EnzymeInterpreter), + interp::EnzymeInterpreter{Handler}, @nospecialize(f), arginfo::ArgInfo, si::StmtInfo, sv::AbsIntState, max_methods::Int = get_max_methods(interp, f, sv), -) +) where Handler (; fargs, argtypes) = arginfo