-
Notifications
You must be signed in to change notification settings - Fork 69
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
error in nodecayed_phis #1031
Comments
Does this help? #1038 (hard to check without a test) |
Segfault in getindex on an expression of the form |
Can you post a reproducer? |
This segfaults for me |
using Enzyme
Enzyme.API.printall!(true)
function f(q)
total = 0.0f0
v = Vector{Float32}()
for i in 1:100
push!(v, q)
end
first(v[v .> -1000000000.0f0])
end
f(1.0f0)
@show autodiff(Enzyme.ReverseWithPrimal, f, Active, Active(1.0f0)) |
using Enzyme
Enzyme.API.printall!(true)
@inline function iterate(mask, N, c)
Bc = mask
Bi = 1
while c == 0
Bi >= N && return nothing
c = @inbounds Bc[Bi+=1]
end
c = Base._blsr(c)
return c # (i1 - tz, c)
end
function f(dest, I, N)
state = iterate(I, N, 0xffffffff)
tot = 0.0f0
while true
tot += dest
state = iterate(I, N, state)
if state === nothing
return tot
end
end
return tot
end
num = 64
I = UInt64[0xffffffff]
dest = Vector{Float32}(undef, num)
ddest = Vector{Float32}(undef, num)
f(1.0f0, I, 1)
fwd, rev = autodiff_thunk(Enzyme.ReverseSplitWithPrimal, Const{typeof(f)}, Active, Active{Float32}, Const{typeof(I)}, Const{Int})
res = fwd(Const(f), Active(1.0f0), Const(I), Const(1))
rev(Const(f), Active(1.0f0), Const(I), Const(1), 1.0f0, res[1]) |
This should now be fixed. The nodecayed phis by #1088 and the segfault by the earlier jll bump |
Private repo but nodecayed_phis doesn't handle bitcastinst and fails here as in log. Repo code in question involves dynamic dispatch of the form
`
function f(objs::Vector{SomeAbstractType}, output::Vector{Float32})
for o in objs
g(o, output)
end
end
`
out.txt
The text was updated successfully, but these errors were encountered: