Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions test/test_utils/ad_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ adbackends = [
Turing.AutoForwardDiff(; chunksize=0), Turing.AutoReverseDiff(; compile=false)
]

# Tapir isn't supported for older Julia versions, hence the check.
install_tapir = isdefined(Turing, :AutoTapir)
if install_tapir
# TODO(mhauru) Is there a better way to install optional dependencies like this?
Pkg.add("Tapir")
push!(adbackends, Turing.AutoTapir(false))
end

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Stuff for checking that the right AD backend is being used.

Expand Down Expand Up @@ -62,6 +54,15 @@ const eltypes_by_adtype = Dict(
),
)

# Tapir isn't supported for older Julia versions, hence the check.
install_tapir = isdefined(Turing, :AutoTapir)
if install_tapir
# TODO(mhauru) Is there a better way to install optional dependencies like this?
Pkg.add("Tapir")
push!(adbackends, Turing.AutoTapir(false))
push!(eltypes_by_adtype, Turing.AutoTapir => (Tapir.CoDual,))
end

"""
AbstractWrongADBackendError

Expand Down