Enzyme.jl icon indicating copy to clipboard operation
Enzyme.jl copied to clipboard

Union of Return

Open wsmoses opened this issue 3 years ago • 0 comments

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)

wsmoses avatar Nov 22 '21 22:11 wsmoses