Skip to content

Commit da5f1bb

Browse files
committed
Almost
1 parent b47d076 commit da5f1bb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/testsuite/mooncake.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,10 @@ function test_mooncake(T::Type, sz; kwargs...)
168168
end
169169
test_mooncake_svd(T, sz; kwargs...)
170170
test_mooncake_polar(T, sz; kwargs...)
171-
# doesn't work yet?
172-
T <: Diagonal || test_mooncake_orthnull(T, sz; kwargs...)
171+
# doesn't work for Diagonals yet?
172+
if T <: Number
173+
test_mooncake_orthnull(T, sz; kwargs...)
174+
end
173175
end
174176
end
175177

@@ -183,7 +185,8 @@ function test_mooncake_qr(
183185
A = instantiate_matrix(T, sz)
184186
@testset "qr_compact" begin
185187
QR, ΔQR = ad_qr_compact_setup(A)
186-
Mooncake.TestUtils.test_rule(rng, qr_compact, A; is_primitive = false, mode = Mooncake.ReverseMode, atol = atol, rtol = rtol)
188+
dQR = make_mooncake_tangent(ΔQR)
189+
Mooncake.TestUtils.test_rule(rng, qr_compact, A; is_primitive = false, mode = Mooncake.ReverseMode, output_tangent = dQR, atol = atol, rtol = rtol)
187190
test_pullbacks_match(qr_compact!, qr_compact, A, QR, ΔQR)
188191
end
189192
@testset "qr_null" begin

0 commit comments

Comments
 (0)