Skip to content

Commit d16a90c

Browse files
committed
fixup
1 parent c6d6c56 commit d16a90c

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
@@ -211,7 +211,7 @@ for mimum in (:minimum, :maximum)
211211
_, one_back = rrule_via_ad(config, f, xs[ind])
212212
df, one_dx_raw = one_back(unthunk(dy))
213213
one_dx = unthunk(one_dx_raw)
214-
x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind...))
214+
x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind))
215215
x_ithunk = InplaceableThunk(x_thunk) do dxs
216216
view(dxs, ind) .+= one_dx
217217
dxs

test/rulesets/Base/mapreduce.jl

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

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

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

0 commit comments

Comments
 (0)