You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see from the stack trace, the problem occurs in _ir_abstract_constant_propagation, which is the function which performs type inference, performs constant propagation, and a few other things (I think).
We could do with a general strategy for working around this whenever it is encountered, or fixing it by patching the compiler internals until it is fixed more widely. Unfortunately, just fixing CC.populate_use_def_map! does not appear to resolve the problem, so I'm assuming that this is the surface of the problem. In slack, Keno mentioned that the code path on which this occurs is likely under-tested :(
edit: I've managed to find a more minimal reproducer:
using Pkg
Pkg.activate(; temp=true)
Pkg.@pkg_str"add [email protected]"using Mooncake
functionh(θ)
d = [0.0, 0.0]
x = θ[1:2]
return d
end
Mooncake.build_rrule(Tuple{typeof(h), Vector{Float64}})
The text was updated successfully, but these errors were encountered:
There is a known issue with
Core.Compiler.populate_use_def_map!
, as discussed here: JuliaLang/julia#56193This can result in problems like that encountered by @penelopeysm in this PR: TuringLang/Bijectors.jl#338
For posterity, here is the kind of error that you see if you encounter it:
As you can see from the stack trace, the problem occurs in
_ir_abstract_constant_propagation
, which is the function which performs type inference, performs constant propagation, and a few other things (I think).A minimal reproducer on Julia 1.11.1 is:
We could do with a general strategy for working around this whenever it is encountered, or fixing it by patching the compiler internals until it is fixed more widely. Unfortunately, just fixing
CC.populate_use_def_map!
does not appear to resolve the problem, so I'm assuming that this is the surface of the problem. In slack, Keno mentioned that the code path on which this occurs is likely under-tested :(edit: I've managed to find a more minimal reproducer:
The text was updated successfully, but these errors were encountered: