Closed gdalle closed 2 hours ago
Yup!
Sorry I meant to say “yes that is supported”
@gdalle check out the "buffer donation" tests https://github.com/EnzymeAD/Reactant.jl/blob/main/test/buffer_donation.jl
Buffer Donation means that the XLA buffer we are passing as an argument will no longer be available after the call to the function, so it can reuse that buffer for the result if the shapes are the same... which is exactly what happens on a in-place mutation when you reformulate it as a SSA code.
There's no such example in the readme, but will I run into trouble if I try to compile an in-place function
f!(y, x)
?