From ff11aed290de0af63352248c808fb8818ecc9d83 Mon Sep 17 00:00:00 2001 From: Will Tebbutt Date: Fri, 8 Nov 2024 11:57:34 +0000 Subject: [PATCH] Update tutorials/docs-10-using-turing-autodiff/index.qmd Co-authored-by: Tor Erlend Fjelde --- tutorials/docs-10-using-turing-autodiff/index.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutorials/docs-10-using-turing-autodiff/index.qmd b/tutorials/docs-10-using-turing-autodiff/index.qmd index b6ebdfb2f..7e9ab50a3 100755 --- a/tutorials/docs-10-using-turing-autodiff/index.qmd +++ b/tutorials/docs-10-using-turing-autodiff/index.qmd @@ -19,7 +19,8 @@ While `Tracker` is still available, its use is discouraged due to a lack of acti As of Turing version v0.30, the global configuration flag for the AD backend has been removed in favour of [`AdTypes.jl`](https://github.com/SciML/ADTypes.jl), allowing users to specify the AD backend for individual samplers independently. Users can pass the `adtype` keyword argument to the sampler constructor to select the desired AD backend, with the default being `AutoForwardDiff(; chunksize=0)`. -For `ForwardDiff`, pass `adtype=AutoForwardDiff(; chunksize)` to the sampler constructor. A `chunksize` of 0 permits the chunk size to be automatically determined. For more information regarding the selection of `chunksize`, please refer to [related section of `ForwardDiff`'s documentation](https://juliadiff.org/ForwardDiff.jl/dev/user/advanced/#Configuring-Chunk-Size). +For `ForwardDiff`, pass `adtype=AutoForwardDiff(; chunksize)` to the sampler constructor. A `chunksize` of `nothing` permits the chunk size to be automatically determined. For more information regarding the selection of `chunksize`, please refer to [related section of `ForwardDiff`'s documentation](https://juliadiff.org/ForwardDiff.jl/dev/user/advanced/#Configuring-Chunk-Size). + For `ReverseDiff`, pass `adtype=AutoReverseDiff()` to the sampler constructor. An additional keyword argument called `compile` can be provided to `AutoReverseDiff`. It specifies whether to pre-record the tape only once and reuse it later (`compile` is set to `false` by default, which means no pre-recording). This can substantially improve performance, but risks silently incorrect results if not used with care.