Skip to content

Commit

Permalink
add more test case for inference with overlayed method table
Browse files Browse the repository at this point in the history
This test case is particularily crafted for #48097, which has occurred
a couple of times.
This should help GPUCompiler keep working with the nightly.

closes #48097
  • Loading branch information
aviatesk committed Mar 13, 2023
1 parent 441c570 commit f67d26b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/compiler/AbstractInterpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ Base.@assume_effects :total totalcall(f, args...) = f(args...)
end
end |> only === Nothing

# GPUCompiler needs accurate inference through kwfunc with the overlay of `Core.throw_inexacterror`
# https://github.com/JuliaLang/julia/issues/48097
@newinterp Issue48097Interp
@MethodTable Issue48097MT
CC.method_table(interp::Issue48097Interp) = CC.OverlayMethodTable(CC.get_world_counter(interp), Issue48097MT)
issue48097(; kwargs...) = return 42
@test fully_eliminated(; interp=Issue48097Interp(), retval=42) do
issue48097(; a=1f0, b=1.0)
end

# AbstractLattice
# ===============

Expand Down

0 comments on commit f67d26b

Please sign in to comment.