@@ -6,22 +6,42 @@ using Random
66spacelist = ad_spacelist (fast_tests)
77eltypes = (Float64, ComplexF64)
88
9- @timedtestset " Enzyme - Index Manipulations (flip):" begin
9+ is_ci = get (ENV , " CI" , " false" ) == " true"
10+
11+ @timedtestset " Enzyme - Index Manipulations (flip and twist):" begin
1012 @timedtestset " $(TensorKit. type_repr (sectortype (eltype (V)))) ($T ) TA ($TA )" for V in spacelist, T in eltypes, TA in (Duplicated,)
1113 atol = default_tol (T)
1214 rtol = default_tol (T)
1315 has_braiding = BraidingStyle (sectortype (eltype (V))) isa HasBraiding
1416 if has_braiding
1517 A = randn (T, V[1 ] ⊗ V[2 ] ← (V[3 ] ⊗ V[4 ] ⊗ V[5 ])' )
18+ if ! (T <: Real && ! (sectorscalartype (sectortype (A)) <: Real ))
19+ EnzymeTestUtils. test_reverse (twist!, TA, (A, TA), (1 , Const); atol, rtol, fkwargs = (inv = false ,))
20+ EnzymeTestUtils. test_reverse (twist!, TA, (A, TA), ([1 , 3 ], Const); atol, rtol, fkwargs = (inv = true ,))
21+ if ! is_ci
22+ EnzymeTestUtils. test_reverse (twist!, TA, (A, TA), (1 , Const); atol, rtol)
23+ EnzymeTestUtils. test_reverse (twist!, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
24+ end
25+ EnzymeTestUtils. test_forward (twist!, TA, (A, TA), (1 , Const); atol, rtol, fkwargs = (inv = false ,))
26+ EnzymeTestUtils. test_forward (twist!, TA, (A, TA), ([1 , 3 ], Const); atol, rtol, fkwargs = (inv = true ,))
27+ if ! is_ci
28+ EnzymeTestUtils. test_forward (twist!, TA, (A, TA), (1 , Const); atol, rtol)
29+ EnzymeTestUtils. test_forward (twist!, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
30+ end
31+ end
1632 EnzymeTestUtils. test_reverse (flip, TA, (A, TA), (1 , Const); atol, rtol, fkwargs = (inv = false ,))
1733 EnzymeTestUtils. test_reverse (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol, fkwargs = (inv = true ,))
18- EnzymeTestUtils. test_reverse (flip, TA, (A, TA), (1 , Const); atol, rtol)
19- EnzymeTestUtils. test_reverse (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
34+ if ! is_ci
35+ EnzymeTestUtils. test_reverse (flip, TA, (A, TA), (1 , Const); atol, rtol)
36+ EnzymeTestUtils. test_reverse (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
37+ end
2038
2139 EnzymeTestUtils. test_forward (flip, TA, (A, TA), (1 , Const); atol, rtol, fkwargs = (inv = false ,))
2240 EnzymeTestUtils. test_forward (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol, fkwargs = (inv = true ,))
23- EnzymeTestUtils. test_forward (flip, TA, (A, TA), (1 , Const); atol, rtol)
24- EnzymeTestUtils. test_forward (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
41+ if ! is_ci
42+ EnzymeTestUtils. test_forward (flip, TA, (A, TA), (1 , Const); atol, rtol)
43+ EnzymeTestUtils. test_forward (flip, TA, (A, TA), ([1 , 3 ], Const); atol, rtol)
44+ end
2545 end
2646 end
2747end
0 commit comments