We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4a3267 commit 5662ce7Copy full SHA for 5662ce7
src/rulesets/Base/mapreduce.jl
@@ -177,7 +177,7 @@ for mimum in (:minimum, :maximum)
177
_, one_back = rrule_via_ad(config, f, xs[ind])
178
df, one_dx_raw = one_back(unthunk(dy))
179
one_dx = unthunk(one_dx_raw)
180
- x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind...))
+ x_thunk = @thunk project(_zerolike_writeat(xs, one_dx, dims, ind))
181
x_ithunk = InplaceableThunk(x_thunk) do dxs
182
view(dxs, ind) .+= one_dx
183
dxs
test/rulesets/Base/mapreduce.jl
@@ -117,11 +117,11 @@ const CFG = ChainRulesTestUtils.ADviaRuleConfig()
117
118
@testset "maximum(f, xs)" begin
119
# 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
+ test_rrule(maximum, abs, [-4.0, 2.0, 2.0])
+ test_rrule(minimum, sqrt, Float64[1 2; 3 4])
+ test_rrule(maximum, Multiplier(2.0), [2.0, 4.0, 8.0]) # Multiplier defined in test_helpers.jl
123
124
- # dims keyword
+ # dims keyword -- these need to call `rrule_via_ad(broadcast, ...`
125
@test_skip test_rrule(maximum, sqrt, Float64[1 2; 3 4], fkwargs=(;dims=1), check_inferred=false)
126
@test_skip test_rrule(minimum, abs, randn(3,3), fkwargs=(;dims=2), check_inferred=false)
127
0 commit comments