Skip to content

Commit

Permalink
Fix method table override
Browse files Browse the repository at this point in the history
  • Loading branch information
William Moses committed Dec 9, 2024
1 parent 1d3b801 commit 9569d07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Enzyme"
uuid = "7da242da-08ed-463a-9acd-ee780be4f1d9"
authors = ["William Moses <[email protected]>", "Valentin Churavy <[email protected]>"]
version = "0.13.21"
version = "0.13.22"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
7 changes: 3 additions & 4 deletions src/compiler/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct EnzymeInterpreter{T} <: AbstractInterpreter
else
code_cache::CodeCache
end
method_table::Union{Nothing,Core.MethodTable}
method_table::Core.Compiler.MethodTableView

# Cache of inference results for this particular interpreter
local_cache::Vector{InferenceResult}
Expand Down Expand Up @@ -201,7 +201,7 @@ function EnzymeInterpreter(

return EnzymeInterpreter(
cache_or_token,
mt,
Core.Compiler.OverlayMethodTable(world, mt),

# Initially empty cache
Vector{InferenceResult}(),
Expand Down Expand Up @@ -253,8 +253,7 @@ Core.Compiler.may_compress(@nospecialize(::EnzymeInterpreter)) = true
Core.Compiler.may_discard_trees(@nospecialize(::EnzymeInterpreter)) = false
Core.Compiler.verbose_stmt_info(@nospecialize(::EnzymeInterpreter)) = false

Core.Compiler.method_table(@nospecialize(interp::EnzymeInterpreter), sv::InferenceState) =
Core.Compiler.OverlayMethodTable(interp.world, interp.method_table)
Core.Compiler.method_table(@nospecialize(interp::EnzymeInterpreter)) = interp.method_table

function is_alwaysinline_func(@nospecialize(TT))::Bool
isa(TT, DataType) || return false
Expand Down

0 comments on commit 9569d07

Please sign in to comment.