Skip to content

Commit 47479f4

Browse files
committed
test muladd mixing numbers and zerotangents
1 parent e05886a commit 47479f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/rulesets/Base/base.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@
153153
test_rrule(muladd, 10randn(), randn(), randn())
154154
end
155155

156+
@testset "muladd ZeroTangent" begin
157+
test_frule(muladd, 2.0, 3.0, ZeroTangent())
158+
test_frule(muladd, 2.0, ZeroTangent(), 4.0)
159+
test_frule(muladd, ZeroTangent(), 3.0, 4.0)
160+
161+
test_rrule(muladd, 2.0, 3.0, ZeroTangent())
162+
test_rrule(muladd, 2.0, ZeroTangent(), 4.0)
163+
test_rrule(muladd, ZeroTangent(), 3.0, 4.0)
164+
end
165+
166+
156167
@testset "fma" begin
157168
test_frule(fma, 10randn(), randn(), randn())
158169
test_rrule(fma, 10randn(), randn(), randn())

0 commit comments

Comments
 (0)