Skip to content

Commit 1c08573

Browse files
committed
inline + indents
1 parent 40174cd commit 1c08573

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/rulesets/Base/base.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ function frule((_, _, Δx, _), ::typeof(Base.literal_pow), ::typeof(^), x::Real,
192192
end
193193

194194
function rrule(::typeof(Base.literal_pow), ::typeof(^), x::Real, ::Val{2})
195-
@inline pow2_pullback(dy) = (NoTangent(), NoTangent(), ProjectTo(x)(2 * x * dy), NoTangent())
196-
return x * x, pow2_pullback
195+
square_pullback(dy) = (NoTangent(), NoTangent(), ProjectTo(x)(2 * x * dy), NoTangent())
196+
return x * x, square_pullback
197197
end
198198
function rrule(::typeof(Base.literal_pow), ::typeof(^), x::Real, ::Val{3})
199199
x2 = x * x
200-
@inline pow3_pullback(dy) = (NoTangent(), NoTangent(), ProjectTo(x)(3 * x2 * dy), NoTangent())
201-
return x2 * x, pow3_pullback
200+
cube_pullback(dy) = (NoTangent(), NoTangent(), ProjectTo(x)(3 * x2 * dy), NoTangent())
201+
return x2 * x, cube_pullback
202202
end

src/rulesets/Base/fastmath_able.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ let
178178
y = x^p
179179
project_x = ProjectTo(x)
180180
project_p = ProjectTo(p)
181-
@inline function power_pullback(dy)
181+
function power_pullback(dy)
182182
_dx = _pow_grad_x(x, p, float(y))
183183
_dy = _pow_grad_p(x, p, float(y))
184184
return (
185185
NoTangent(),
186186
project_x(conj(_dx) * dy),
187187
@thunk project_p(conj(_dy) * dy)
188-
)
188+
)
189189
end
190190
return y, power_pullback
191191
end

0 commit comments

Comments
 (0)