1717"""
1818 test_enzyme_left_orth(T, sz; rng, atol, rtol)
1919
20- Test the Enzyme reverse-mode AD rules for `left_orth` with QR and polar (when `m >= n`)
20+ Test the Enzyme forward- and reverse-mode AD rules for `left_orth` with QR and polar (when `m >= n`)
2121algorithms, and their in-place variants.
2222"""
2323function test_enzyme_left_orth (
@@ -44,6 +44,9 @@ function test_enzyme_left_orth(
4444 VC, ΔVC = ad_left_orth_setup (A)
4545 test_reverse (left_orth, RT, (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔVC)
4646 test_reverse (call_and_zero!, RT, (left_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔVC)
47+ A = instantiate_matrix (T, sz)
48+ test_forward (left_orth, RT, (A, TA), (alg, Const); atol, rtol, fdm)
49+ test_forward (call_and_zero!, RT, (left_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm)
4750 end
4851 end
4952 end
5255"""
5356 test_enzyme_right_orth(T, sz; rng, atol, rtol)
5457
55- Test the Enzyme reverse-mode AD rules for `right_orth` with LQ and polar (when `m <= n`)
58+ Test the Enzyme forward- and reverse-mode AD rules for `right_orth` with LQ and polar (when `m <= n`)
5659algorithms, and their in-place variants.
5760"""
5861function test_enzyme_right_orth (
@@ -78,6 +81,9 @@ function test_enzyme_right_orth(
7881 CVᴴ, ΔCVᴴ = ad_right_orth_setup (A)
7982 test_reverse (right_orth, RT, (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔCVᴴ)
8083 test_reverse (call_and_zero!, RT, (right_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm, output_tangent = ΔCVᴴ)
84+ A = instantiate_matrix (T, sz)
85+ test_forward (right_orth, RT, (A, TA), (alg, Const); atol, rtol, fdm)
86+ test_forward (call_and_zero!, RT, (right_orth!, Const), (A, TA), (alg, Const); atol, rtol, fdm)
8187 end
8288 end
8389 end
0 commit comments