forked from JuliaDiff/DifferentiationInterface.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandard.jl
More file actions
57 lines (47 loc) · 1.34 KB
/
standard.jl
File metadata and controls
57 lines (47 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using ADTypes
using DifferentiationInterface
using DifferentiationInterfaceTest
using FiniteDiff: FiniteDiff
using ForwardDiff: ForwardDiff
using SparseConnectivityTracer
using SparseMatrixColorings
using Random
LOGGING = get(ENV, "CI", "false") == "false"
## Dense
test_differentiation(
[AutoForwardDiff(), AutoForwardDiff(; chunksize=100)],
default_scenarios(; include_smaller=true, include_constantified=true);
logging=LOGGING,
)
test_differentiation(
[AutoForwardDiff(), AutoFiniteDiff(; relstep=1e-5)],
default_scenarios(;
include_batchified=false,
include_normal=false,
include_cachified=true,
include_constantorcachified=true,
);
logging=LOGGING,
)
test_differentiation(
[AutoForwardDiff()], empty_scenarios(); excluded=[:gradient], logging=LOGGING
)
test_differentiation(
[AutoFiniteDiff()], empty_scenarios(); excluded=[:jacobian], logging=LOGGING
)
## Sparse
sparse_backend = AutoSparse(
AutoForwardDiff();
sparsity_detector=TracerSparsityDetector(),
coloring_algorithm=GreedyColoringAlgorithm(),
)
test_differentiation(
sparse_backend,
sparse_scenarios(; include_cachified=true, use_tuples=false);
sparsity=true,
logging=LOGGING,
)
## Complex
test_differentiation(
AutoFiniteDiff(), vcat(complex_scenarios(), complex_sparse_scenarios()); logging=LOGGING
)