Skip to content

Commit f4b44c9

Browse files
authored
Update ad_utils.jl
1 parent 2f93d75 commit f4b44c9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/test_utils/ad_utils.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ adbackends = [
2222
Turing.AutoForwardDiff(; chunksize=0), Turing.AutoReverseDiff(; compile=false)
2323
]
2424

25-
# Tapir isn't supported for older Julia versions, hence the check.
26-
install_tapir = isdefined(Turing, :AutoTapir)
27-
if install_tapir
28-
# TODO(mhauru) Is there a better way to install optional dependencies like this?
29-
Pkg.add("Tapir")
30-
push!(adbackends, Turing.AutoTapir(false))
31-
end
32-
3325
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
3426
# Stuff for checking that the right AD backend is being used.
3527

@@ -62,6 +54,15 @@ const eltypes_by_adtype = Dict(
6254
),
6355
)
6456

57+
# Tapir isn't supported for older Julia versions, hence the check.
58+
install_tapir = isdefined(Turing, :AutoTapir)
59+
if install_tapir
60+
# TODO(mhauru) Is there a better way to install optional dependencies like this?
61+
Pkg.add("Tapir")
62+
push!(adbackends, Turing.AutoTapir(false))
63+
push!(eltypes_by_adtype, Turing.AutoTapir => (Tapir.CoDual,))
64+
end
65+
6566
"""
6667
AbstractWrongADBackendError
6768

0 commit comments

Comments
 (0)