should add!!(x, t::InplacableThunk)
make sure that x is mutable before calling t.add!
#232
Labels
inplace accumulation
for things relating to inplace accumulation of gradients
Came up in JuliaDiff/ChainRules.jl#287
I suspect
add!!
should take responsiblity as to if it is appropriate to call theInplaceableThunk
'sadd!
field.Its fairly easy for us to setup a baseline set of mutable types:
ArrayInterface has something like this, but gets it wrong (JuliaArrays/ArrayInterface.jl#77)
and we don't want the dependency
Other types can specialize
add!!
themselves; with what ever way they like to be mutated.The text was updated successfully, but these errors were encountered: