Enzyme.jl
Enzyme.jl copied to clipboard
Union of Return
The generated sret variable by julia doens't actually have sret marked on the LLVM function, leading to issues.
The sret condition needs to be replaced with something more robust.
cc @vtjnash
using Enzyme
function meta(a, out, cond)
if cond
out[] = a
end
end
out = Ref(0.0)
dout = Ref(1.0)
@show Enzyme.autodiff(meta, Active(2.0), Duplicated(out, dout), true)