Skip to content

Commit 6c06a77

Browse files
committed
Improve docstring for AutoTapir
1 parent 59ceff3 commit 6c06a77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dense.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,13 @@ Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
287287
288288
# Fields
289289
290-
- `safe_mode::Bool`: whether to run additional checks to catch errors early. On by default. Turn off to maximise performance if your code runs correctly.
290+
- `safe_mode::Bool`: whether to run additional checks to catch errors early. While this is
291+
on by default to ensure that users are aware of this option, you should generally turn
292+
it off for actual use, as it has substantial performance implications.
293+
If you encounter a problem with using Tapir (it fails to differentiate a function, or
294+
something truly nasty like a segfault occurs), then you should try switching `safe_mode`
295+
on and look at what happens. Often errors are caught earlier and the error messages are
296+
more useful.
291297
"""
292298
Base.@kwdef struct AutoTapir <: AbstractADType
293299
safe_mode::Bool = true

0 commit comments

Comments
 (0)