@@ -60,7 +60,7 @@ using Base.Broadcast: broadcasted
6060 test_rrule (copy∘ broadcasted, / , (rand (2 ),), rand (3 ), check_inferred= false )
6161 end
6262
63- @testset " lazy rules" begin
63+ @testset " fused rules" begin
6464 @testset " arithmetic" begin
6565 test_rrule (copy∘ broadcasted, + , rand (3 ), rand (3 ))
6666 test_rrule (copy∘ broadcasted, + , rand (3 ), rand (4 )' )
@@ -88,8 +88,9 @@ using Base.Broadcast: broadcasted
8888 @test y4 == [im, 2im , 3im ]
8989 @test unthunk (bk4 ([4 , 5im , 6 + 7im ])[4 ]) == [0 ,5 ,7 ]
9090
91- test_rrule (copy∘ broadcasted, * , rand (3 ), rand (3 ), rand (3 ), rand (3 ), rand (3 ))
92- test_rrule (copy∘ broadcasted, * , rand (), rand (), rand (3 ), rand (3 ) .+ im, rand (4 )' )
91+ test_rrule (copy∘ broadcasted, * , rand (3 ), rand (3 ), rand (3 ), rand (3 ), rand (3 ), check_inferred= false ) # Union{NoTangent, ZeroTangent}
92+ test_rrule (copy∘ broadcasted, * , rand (), rand (), rand (3 ), rand (3 ) .+ im, rand (4 )' , check_inferred= false ) # Union{NoTangent, ZeroTangent}
93+ # (These two may infer with vararg rrule)
9394
9495 test_rrule (copy∘ broadcasted, Base. literal_pow, ^ , rand (3 ), Val (2 ))
9596 test_rrule (copy∘ broadcasted, Base. literal_pow, ^ , rand (3 ) .+ im, Val (2 ))
@@ -134,6 +135,7 @@ using Base.Broadcast: broadcasted
134135 test_rrule (copy∘ broadcasted, - , rand (), rand ())
135136 test_rrule (copy∘ broadcasted, - , rand ())
136137 test_rrule (copy∘ broadcasted, * , rand (), rand ())
138+ test_rrule (copy∘ broadcasted, * , rand (), rand (), rand (), rand ())
137139 test_rrule (copy∘ broadcasted, Base. literal_pow, ^ , rand (), Val (2 ))
138140 test_rrule (copy∘ broadcasted, / , rand (), rand ())
139141 end
0 commit comments