Skip to content

Commit bad6f5b

Browse files
committed
Polar and orthnull
1 parent 517706a commit bad6f5b

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

test/enzyme/orthnull.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ for T in (BLASFloats..., GenericFloats...), n in (17, m, 23)
1515
TestSuite.seed_rng!(1234)
1616
if !is_buildkite
1717
TestSuite.test_enzyme_orthnull(T, (m, n); atol = m * n * TestSuite.precision(T), rtol = m * n * TestSuite.precision(T))
18+
AT = Diagonal{T, Vector{T}}
19+
m == n && TestSuite.test_enzyme_orthnull(AT, (m, m); atol = m * m * TestSuite.precision(T), rtol = m * m * TestSuite.precision(T))
1820
end
1921
end

test/enzyme/polar.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ for T in (BLASFloats..., GenericFloats...), n in (17, m, 23)
1515
TestSuite.seed_rng!(1234)
1616
if !is_buildkite
1717
TestSuite.test_enzyme_polar(T, (m, n); atol = m * n * TestSuite.precision(T), rtol = m * n * TestSuite.precision(T))
18+
AT = Diagonal{T, Vector{T}}
19+
#m == n && TestSuite.test_enzyme_polar(AT, (m, m); atol = m * m * TestSuite.precision(T), rtol = m * m * TestSuite.precision(T))
1820
end
1921
end

test/testsuite/enzyme/orthnull.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function test_enzyme_left_orth(
3737
test_reverse(call_and_zero!, RT, (left_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔVC)
3838
end
3939

40-
if m >= n
40+
if m >= n && !(T <: Diagonal)
4141
@testset "polar" begin
4242
A = instantiate_matrix(T, sz)
4343
alg = MatrixAlgebraKit.select_algorithm(left_orth!, A, :polar)
@@ -71,7 +71,7 @@ function test_enzyme_right_orth(
7171
test_reverse(call_and_zero!, RT, (right_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔCVᴴ)
7272
end
7373

74-
if m <= n
74+
if m <= n && !(T <: Diagonal)
7575
@testset "polar" begin
7676
A = instantiate_matrix(T, sz)
7777
alg = MatrixAlgebraKit.select_algorithm(right_orth!, A, :polar)

0 commit comments

Comments
 (0)