Skip to content

Commit 47e2181

Browse files
committed
move the log inside the thunk
1 parent c4540b3 commit 47e2181

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rulesets/Base/fastmath_able.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ let
184184
project_p = ProjectTo(p)
185185
function power_pullback(dy)
186186
_dx = _pow_grad_x(x, p, float(y))
187-
_dy = _pow_grad_p(x, p, float(y))
188187
return (
189188
NoTangent(),
190189
project_x(conj(_dx) * dy),
191-
@thunk project_p(conj(_dy) * dy)
190+
# _pow_grad_p contains log, perhaps worth thunking:
191+
@thunk project_p(conj(_pow_grad_p(x, p, float(y))) * dy)
192192
)
193193
end
194194
return y, power_pullback

0 commit comments

Comments
 (0)