Turing AD tests

Turing.jl documentation | Turing.jl GitHub | Source code for these tests

This page is intended as a brief overview of how different AD backends perform on a variety of Turing.jl models. Note that the inclusion of any AD backend here does not imply an endorsement from the Turing team; this table is purely for information.

Results

Model name \ AD typeEnzymeForwardEnzymeReverseFiniteDifferencesForwardDiffMooncakeReverseDiffReverseDiffCompiledZygote
assume_beta2.6553.29023.4851.7037.04829.2473.055771.909
assume_dirichlet2.3603.57423.8721.3429.29216.0253.056574.738
assume_lkjcholu4.62713.282149.5712.4676.62651.7816.721error
assume_mvnormal(?) error4.01742.9681.2879.35517.4521.915642.959
assume_normal2.8523.24127.8491.4898.70320.9802.5001169.839
assume_submodel2.0952.19636.5141.2176.81813.5001.4031169.978
assume_wishart(?) error14.09444.4271.02310.62918.9714.089256.474
control_flow2.6443.23241.9891.5049.42316.795wrong1099.246
dot_assume2.8702.24978.3681.3625.26823.5612.464error
dot_assume_observe_indexwrongwrong52.7021.3516.27836.3703.572error
dot_observe2.6132.41928.3011.68410.17656.7556.420error
dynamic_constraint2.4732.55136.2961.2707.31332.7902.7671108.624
multiple_constraints_same_var4.99326.41559.3321.22413.68819.1142.248error
n0104.1102.053139.7041.6334.62424.2892.711error
n05018.2712.331626.4128.6153.97025.2112.417error
n10036.6372.1051240.02913.9674.09425.3552.652error
n500182.9682.2756753.34057.9783.76525.2192.354error
observe_index2.7452.60328.2361.6579.71459.4275.765error
observe_literal2.8692.97426.8491.4679.05333.1673.7841511.408
observe_multivariate2.6833.43450.5361.2965.96327.0472.679error
observe_submodel2.4372.26225.9831.3867.61926.8702.7642134.432

Manifest

The tests above were run with the following package versions:

PackageVersion
ADTypesv1.14.0
AbstractFFTsv1.5.0
AbstractMCMCv5.6.0
AbstractPPLv0.11.0
AbstractTreesv0.4.5
Accessorsv0.1.42
Adaptv4.3.0
AliasTablesv1.1.3
ArgCheckv2.5.0
ArgToolsv1.1.2
ArnoldiMethodv0.4.0
Artifactsv1.11.0
BangBangv0.4.4
Base64v1.11.0
Baseletv0.1.1
Bijectorsv0.15.6
CEnumv0.5.0
ChainRulesv1.72.3
ChainRulesCorev1.25.1
Chairmarksv1.3.1
ChangesOfVariablesv0.1.9
CommonSolvev0.2.4
CommonSubexpressionsv0.3.1
Compatv4.16.0
CompilerSupportLibraries_jllv1.1.1+0
CompositionsBasev0.1.2
ConsoleProgressMonitorv0.1.2
ConstructionBasev1.5.8
DataAPIv1.16.0
DataStructuresv0.18.22
DataValueInterfacesv1.0.0
Datesv1.11.0
DefineSingletonsv0.1.2
DensityInterfacev0.4.0
DiffResultsv1.1.0
DiffRulesv1.15.1
DifferentiationInterfacev0.6.52
Distributedv1.11.0
Distributionsv0.25.119
DocStringExtensionsv0.9.4
Downloadsv1.6.0
DynamicPPLv0.36.1
Enzymev0.13.38
EnzymeCorev0.8.8
Enzyme_jllv0.0.174+0
ExprToolsv0.1.10
FileWatchingv1.11.0
FillArraysv1.13.0
FiniteDifferencesv0.12.32
ForwardDiffv0.10.38
FunctionWrappersv1.1.3
Functorsv0.5.2
Futurev1.11.0
GPUArraysCorev0.2.0
GPUCompilerv1.4.0
Graphsv1.12.1
HypergeometricFunctionsv0.3.28
IRToolsv0.4.14
Inflatev0.1.5
InitialValuesv0.3.1
InteractiveUtilsv1.11.0
InverseFunctionsv0.1.17
IrrationalConstantsv0.2.4
IteratorInterfaceExtensionsv1.0.0
JLLWrappersv1.7.0
JSONv0.21.4
LLVMv9.3.1
LLVMExtra_jllv0.0.35+0
LazyArtifactsv1.11.0
LeftChildRightSiblingTreesv0.2.0
LibCURLv0.6.4
LibCURL_jllv8.6.0+0
LibGit2v1.11.0
LibGit2_jllv1.7.2+0
LibSSH2_jllv1.11.0+1
LibTracyClient_jllv0.9.1+6
Libdlv1.11.0
LinearAlgebrav1.11.0
LogDensityProblemsv2.1.2
LogExpFunctionsv0.3.29
Loggingv1.11.0
LoggingExtrasv1.1.0
MacroToolsv0.5.16
MappedArraysv0.4.2
Markdownv1.11.0
MbedTLS_jllv2.28.6+0
MicroCollectionsv0.2.0
Missingsv1.2.0
MistyClosuresv2.0.0
Mmapv1.11.0
Mooncakev0.4.117
MozillaCACerts_jllv2023.12.12
NaNMathv1.1.3
NetworkOptionsv1.2.0
ObjectFilev0.4.4
OpenBLAS_jllv0.3.27+1
OpenLibm_jllv0.8.5+0
OpenSpecFun_jllv0.5.6+0
OrderedCollectionsv1.8.0
PDMatsv0.11.34
Parsersv2.8.3
Pkgv1.11.0
PrecompileToolsv1.2.1
Preferencesv1.4.3
Printfv1.11.0
ProgressLoggingv0.1.4
ProgressMeterv1.10.4
PtrArraysv1.3.0
QuadGKv2.11.2
Randomv1.11.0
RealDotv0.1.0
Reexportv1.2.2
Requiresv1.3.1
ReverseDiffv1.16.1
Richardsonv1.4.2
Rmathv0.8.0
Rmath_jllv0.5.1+0
Rootsv2.2.7
SHAv0.7.0
Scratchv1.2.1
Serializationv1.11.0
Setfieldv1.1.2
SharedArraysv1.11.0
SimpleTraitsv0.9.4
Socketsv1.11.0
SortingAlgorithmsv1.2.1
SparseArraysv1.11.0
SparseInverseSubsetv0.1.2
SpecialFunctionsv2.5.1
SplittablesBasev0.1.15
StaticArraysv1.9.13
StaticArraysCorev1.4.3
Statisticsv1.11.1
StatsAPIv1.7.0
StatsBasev0.34.4
StatsFunsv1.5.0
StructArraysv0.7.1
StructIOv0.3.1
SuiteSparse
SuiteSparse_jllv7.7.0+0
TOMLv1.0.3
TableTraitsv1.0.1
Tablesv1.12.0
Tarv1.10.0
TerminalLoggersv0.1.7
Testv1.11.0
Tracyv0.1.4
Transducersv0.4.84
UUIDsv1.11.0
Unicodev1.11.0
Zlib_jllv1.2.13+1
Zygotev0.7.6
ZygoteRulesv0.2.7
libblastrampoline_jllv5.11.0+0
nghttp2_jllv1.59.0+0
p7zip_jllv17.4.0+2