Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spurious dispatch report from @report_opt log(2.1) #334

Closed
aviatesk opened this issue Mar 20, 2022 · 0 comments
Closed

spurious dispatch report from @report_opt log(2.1) #334

aviatesk opened this issue Mar 20, 2022 · 0 comments

Comments

@aviatesk
Copy link
Owner

From the discourse post https://discourse.julialang.org/t/log-performance-regression-and-jet-failures/78146.

The minimum reproducer is:

julia> report_opt() do
           Val()
       end
═════ 1 possible error found ═════
┌ @ REPL[21]:2 Main.Val()
│┌ @ essentials.jl:714 %1()
││ runtime dispatch detected: %1::Type{Val{_A}} where _A()
│└─────────────────────

This Cthulhu view suggests that this issue is because JET still checks frames that are folded by the new concrete evaluation features:

julia> descend(; optimize=false) do
           Val()
       end
(::var"#15#16")() in Main at REPL[23]:2
Variables
  #self#::Core.Const(var"#15#16"())

│ ─ %-1  = invoke #15()::Core.Const(Val{:ϵ}())
    @ REPL[23]:2 within `#15`
1%1 = Main.Val()::Core.Const(Val{:ϵ}())
└──      return %1
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
 • %1  = < consteval > Val(::Core.Const())::Core.Const(Val{:ϵ}())
   
Val(x) in Base at essentials.jl:714
Variables
  #self#::Type{Val}
  x::Symbol

│ ─ %-1  = invoke Val(::Symbol)::Val
    @ essentials.jl:714 within `Val`
1%1 = Core.apply_type(Base.Val, x)::Type{Val{_A}} where _A
│   %2 = (%1)()::Val
└──      return %2
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
 • %2  = Val()::Val
   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant