-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathdisplay.jl
More file actions
23 lines (19 loc) · 959 Bytes
/
display.jl
File metadata and controls
23 lines (19 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using ADTypes
using DifferentiationInterface
using DifferentiationInterface: required_packages
using Test
backend = SecondOrder(AutoForwardDiff(), AutoZygote())
@test string(backend) == "SecondOrder(AutoForwardDiff(), AutoZygote())"
detector = DenseSparsityDetector(AutoForwardDiff(); atol = 1.0e-23)
@test string(detector) ==
"DenseSparsityDetector(AutoForwardDiff(); atol=1.0e-23, method=:iterative)"
diffwith = DifferentiateWith(exp, AutoForwardDiff())
@test string(diffwith) == "DifferentiateWith(exp, AutoForwardDiff(), ())"
@test required_packages(AutoForwardDiff()) == ["ForwardDiff"]
@test required_packages(AutoZygote()) == ["Zygote"]
@test required_packages(AutoSparse(AutoForwardDiff())) ==
["ForwardDiff", "SparseMatrixColorings"]
@test required_packages(SecondOrder(AutoForwardDiff(), AutoZygote())) ==
["ForwardDiff", "Zygote"]
@test required_packages(MixedMode(AutoForwardDiff(), AutoZygote())) ==
["ForwardDiff", "Zygote"]