Skip to content

Commit

Permalink
Update interpreter.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Dec 7, 2024
1 parent 159d33b commit 9918798
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/compiler/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ function rule_backedge_holder_generator(world::UInt, source, self, ft::Type)

sig = Tuple{typeof(EnzymeRules.noalias), Vararg{<:Annotation}}
push!(edges, (ccall(:jl_method_table_for, Any, (Any,), sig), sig))

sig = Tuple{typeof(EnzymeRules.inactive_type), Type}
push!(edges, (ccall(:jl_method_table_for, Any, (Any,), sig), sig))
end
@show edges
new_ci.edges = edges
Expand Down Expand Up @@ -333,14 +336,14 @@ function Core.Compiler.abstract_call_gf_by_type(

if interp.forward_rules
Core.Compiler.add_backedge!(sv, GPUCompiler.methodinstance(typeof(Enzyme.Compiler.Interpreter.rule_backedge_holder), Tuple{typeof(EnzymeRules.forward)}, interp.world)::Core.MethodInstance)
Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(EnzymeRules.forward))
Enzyme.Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(EnzymeRules.forward))
end
if interp.reverse_rules
Core.Compiler.add_backedge!(sv, GPUCompiler.methodinstance(typeof(Enzyme.Compiler.Interpreter.rule_backedge_holder), Tuple{typeof(EnzymeRules.augmented_primal)}, interp.world)::Core.MethodInstance)
Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(EnzymeRules.augmented_primal))
Enzyme.Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(EnzymeRules.augmented_primal))
end
Core.Compiler.add_backedge!(sv, GPUCompiler.methodinstance(typeof(Enzyme.Compiler.Interpreter.rule_backedge_holder), Tuple{Val{0}}, interp.world)::Core.MethodInstance)
Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(Val(0)))
Enzyme.Compiler.Interpreter.rule_backedge_holder(Base.inferencebarrier(Val(0)))
end

@static if VERSION v"1.11-"
Expand Down

0 comments on commit 9918798

Please sign in to comment.