Skip to content

Commit 5662ce7

Browse files
committed
fixup
1 parent c4a3267 commit 5662ce7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/rulesets/Base/mapreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ for mimum in (:minimum, :maximum)
177177
_, one_back = rrule_via_ad(config, f, xs[ind])
178178
df, one_dx_raw = one_back(unthunk(dy))
179179
one_dx = unthunk(one_dx_raw)
180-
x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind...))
180+
x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind))
181181
x_ithunk = InplaceableThunk(x_thunk) do dxs
182182
view(dxs, ind) .+= one_dx
183183
dxs

test/rulesets/Base/mapreduce.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ const CFG = ChainRulesTestUtils.ADviaRuleConfig()
117117

118118
@testset "maximum(f, xs)" begin
119119
# This calls back into AD
120-
test_rrule(maximum, abs, [-4.0, 2.0, 2.0], check_inferred=false)
121-
test_rrule(minimum, sqrt, Float64[1 2; 3 4], check_inferred=false)
122-
test_rrule(maximum, Multiplier(2.0), [2.0, 4.0, 8.0], check_inferred=false) # Multiplier defined in test_helpers.jl
120+
test_rrule(maximum, abs, [-4.0, 2.0, 2.0])
121+
test_rrule(minimum, sqrt, Float64[1 2; 3 4])
122+
test_rrule(maximum, Multiplier(2.0), [2.0, 4.0, 8.0]) # Multiplier defined in test_helpers.jl
123123

124-
# dims keyword
124+
# dims keyword -- these need to call `rrule_via_ad(broadcast, ...`
125125
@test_skip test_rrule(maximum, sqrt, Float64[1 2; 3 4], fkwargs=(;dims=1), check_inferred=false)
126126
@test_skip test_rrule(minimum, abs, randn(3,3), fkwargs=(;dims=2), check_inferred=false)
127127

0 commit comments

Comments
 (0)