Enzyme.jl
Enzyme.jl copied to clipboard
`CombinedAdjointThunk` should also return ret value
julia> autodiff(f, Active(2.0))
(4.0,)
Should maybe be:
julia> (4.0, (4.0,))
(4.0, (4.0,))
https://github.com/wsmoses/Enzyme.jl/blob/aa78016bfd046689aa33b2ceba50049b329dd0d5/src/compiler.jl#L1189
@tansongchen this might be a good place to start.
Just went though compiler.jl, this should be straightfoward. will do it
Adding this as an option actually enables us to handle https://github.com/wsmoses/Enzyme.jl/issues/112 by simply returning the shadow return via the corresponding shadow return arg.
@wsmoses #537 did implement this right?
I don't think so, but it changed the ABI to have a place for this.
Done in https://github.com/EnzymeAD/Enzyme.jl/pull/598