@@ -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,25 +23,31 @@ for backend in backends
2323end
2424
2525test_differentiation (
26- backends[3 : 4 ], default_scenarios (); excluded= SECOND_ORDER, logging= LOGGING
26+ backends[3 : 4 ],
27+ default_scenarios ();
28+ excluded = SECOND_ORDER,
29+ logging = LOGGING,
2730);
2831
2932test_differentiation (
3033 backends[3 : 4 ],
3134 nomatrix (
3235 default_scenarios (;
33- include_normal= false ,
34- include_constantified= true ,
35- include_cachified= true ,
36- use_tuples= true ,
37- ),
36+ include_normal = false ,
37+ include_constantified = true ,
38+ include_cachified = true ,
39+ use_tuples = true
40+ )
3841 );
39- excluded= SECOND_ORDER,
40- logging= LOGGING,
42+ excluded = SECOND_ORDER,
43+ logging = LOGGING,
4144);
4245
4346test_differentiation (
44- backends[1 : 2 ], nomatrix (default_scenarios ()); excluded= SECOND_ORDER, logging= LOGGING
47+ backends[1 : 2 ],
48+ nomatrix (default_scenarios ());
49+ excluded = SECOND_ORDER,
50+ logging = LOGGING,
4551);
4652
4753EXCLUDED = @static if VERSION ≥ v " 1.11-" && VERSION ≤ v " 1.12-"
5763test_differentiation (
5864 [SecondOrder (AutoMooncakeForward (), AutoMooncake ())],
5965 nomatrix (default_scenarios ());
60- excluded= EXCLUDED,
61- logging= LOGGING,
66+ excluded = EXCLUDED,
67+ logging = LOGGING,
6268)
6369
6470@testset " NamedTuples" begin
65- ps = (; A= rand (5 ), B= rand (5 ))
71+ ps = (; A = rand (5 ), B = rand (5 ))
6672 myfun (ps) = sum (ps. A .* ps. B)
6773 grad = gradient (myfun, backends[1 ], ps)
6874 @test grad. A == ps. B
6975 @test grad. B == ps. A
7076end
7177
7278test_differentiation (
73- backends[3 : 4 ], nomatrix (static_scenarios ()); logging= LOGGING, excluded= SECOND_ORDER
79+ backends[3 : 4 ],
80+ nomatrix (static_scenarios ());
81+ logging = LOGGING,
82+ excluded = SECOND_ORDER
7483)
7584
7685@testset " Friendly tangents structured matrices" begin
77- backend = AutoMooncake (; config= Mooncake. Config (; friendly_tangents= true ))
86+ backend = AutoMooncake (; config = Mooncake. Config (; friendly_tangents = true ))
7887 inputs = (
7988 Symmetric ([2.0 1.0 ; 1.0 3.0 ]),
8089 Hermitian (ComplexF64[2 1 + im; 1 - im 3 ]),
0 commit comments