Skip to content

Commit

Permalink
write InplaceableThunk correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Oct 14, 2020
1 parent 49324b5 commit cb34c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rulesets/Base/arraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ end

function rrule(::typeof(-), x::AbstractArray)
function negation_pullback(ȳ)
return NO_FIELDS, InplaceableThunk(@thunk(-ȳ), _subtract!!)
return NO_FIELDS, InplaceableThunk(@thunk(-ȳ), -> _subtract!!(ā, ȳ))
end
return -x, negation_pullback
end

0 comments on commit cb34c16

Please sign in to comment.