@@ -13,8 +13,8 @@ nomatrix(scens) = filter(s -> !(s.x isa AbstractMatrix) && !(s.y isa AbstractMat
1313backends = [
1414 AutoMooncake (),
1515 AutoMooncakeForward (),
16- AutoMooncake (; config = Mooncake. Config (; friendly_tangents = true )),
17- AutoMooncakeForward (; config = Mooncake. Config (; friendly_tangents = true )),
16+ AutoMooncake (; config= Mooncake. Config (; friendly_tangents= true )),
17+ AutoMooncakeForward (; config= Mooncake. Config (; friendly_tangents= true )),
1818]
1919
2020for backend in backends
@@ -23,31 +23,25 @@ for backend in backends
2323end
2424
2525test_differentiation (
26- backends[3 : 4 ],
27- default_scenarios ();
28- excluded = SECOND_ORDER,
29- logging = LOGGING,
26+ backends[3 : 4 ], default_scenarios (); excluded= SECOND_ORDER, logging= LOGGING
3027);
3128
3229test_differentiation (
3330 backends[3 : 4 ],
3431 nomatrix (
3532 default_scenarios (;
36- include_normal = false ,
37- include_constantified = true ,
38- include_cachified = true ,
39- use_tuples = true
40- )
33+ include_normal= false ,
34+ include_constantified= true ,
35+ include_cachified= true ,
36+ use_tuples= true ,
37+ ),
4138 );
42- excluded = SECOND_ORDER,
43- logging = LOGGING,
39+ excluded= SECOND_ORDER,
40+ logging= LOGGING,
4441);
4542
4643test_differentiation (
47- backends[1 : 2 ],
48- nomatrix (default_scenarios ());
49- excluded = SECOND_ORDER,
50- logging = LOGGING,
44+ backends[1 : 2 ], nomatrix (default_scenarios ()); excluded= SECOND_ORDER, logging= LOGGING
5145);
5246
5347EXCLUDED = @static if VERSION ≥ v " 1.11-" && VERSION ≤ v " 1.12-"
6357test_differentiation (
6458 [SecondOrder (AutoMooncakeForward (), AutoMooncake ())],
6559 nomatrix (default_scenarios ());
66- excluded = EXCLUDED,
67- logging = LOGGING,
60+ excluded= EXCLUDED,
61+ logging= LOGGING,
6862)
6963
7064@testset " NamedTuples" begin
71- ps = (; A = rand (5 ), B = rand (5 ))
65+ ps = (; A= rand (5 ), B= rand (5 ))
7266 myfun (ps) = sum (ps. A .* ps. B)
7367 grad = gradient (myfun, backends[1 ], ps)
7468 @test grad. A == ps. B
7569 @test grad. B == ps. A
7670end
7771
7872test_differentiation (
79- backends[3 : 4 ],
80- nomatrix (static_scenarios ());
81- logging = LOGGING,
82- excluded = SECOND_ORDER
73+ backends[3 : 4 ], nomatrix (static_scenarios ()); logging= LOGGING, excluded= SECOND_ORDER
8374)
8475
8576@testset " Friendly tangents structured matrices" begin
86- backend = AutoMooncake (; config = Mooncake. Config (; friendly_tangents = true ))
77+ backend = AutoMooncake (; config= Mooncake. Config (; friendly_tangents= true ))
8778 inputs = (
8879 Symmetric ([2.0 1.0 ; 1.0 3.0 ]),
8980 Hermitian (ComplexF64[2 1 + im; 1 - im 3 ]),
0 commit comments