Skip to content

Commit bf2071f

Browse files
committed
rm some un-thunks
1 parent 895d442 commit bf2071f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/rulesets/Base/mapreduce.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ end
178178
end
179179

180180
@testset "types" begin
181-
back = unthunk(rrule(cumprod, [1, 2, 3])[2]) # allow integer input
181+
back = rrule(cumprod, [1, 2, 3])[2] # rule allows integer input, but test_rrule does not
182182
@test unthunk(back(fill(0.5, 3))[2]) == [9/2, 2, 1]
183183

184-
back = unthunk(rrule(cumprod, PermutedDimsArray([1 2; 3 4], (2,1)); dims=1)[2])
184+
back = rrule(cumprod, PermutedDimsArray([1 2; 3 4], (2,1)); dims=1)[2]
185185
@test unthunk(back(ones(Float32, 2,2))[2]) == [3 5; 1 3]
186186

187-
@test_throws Exception cumprod(Symmetric([1 2; 3 4]), dims=1) # forward pass fails
187+
@test_throws Exception cumprod(Symmetric([1 2; 3 4]), dims=1) # forward pass fails, so can't test gradient
188188

189-
back = unthunk(rrule(cumprod, Diagonal([1, 2]); dims=1)[2])
189+
back = rrule(cumprod, Diagonal([1, 2]); dims=1)[2]
190190
@test unthunk(back(fill(0.5, 2, 2))[2]) [1/2 3/2; 1/2 0]
191191
end
192192
end

0 commit comments

Comments
 (0)