Skip to content

Commit

Permalink
Deprecate AutoTapir
Browse files Browse the repository at this point in the history
  • Loading branch information
willtebbutt committed Sep 25, 2024
1 parent d6c521c commit 149c655
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
18 changes: 1 addition & 17 deletions src/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,7 @@ mode(::AutoSymbolics) = SymbolicMode()
"""
AutoTapir
Struct used to select the [Tapir.jl](https://github.com/withbayes/Tapir.jl) backend for automatic differentiation.
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
# Constructors
AutoTapir(; safe_mode=true)
# Fields
- `safe_mode::Bool`: whether to run additional checks to catch errors early. While this is
on by default to ensure that users are aware of this option, you should generally turn
it off for actual use, as it has substantial performance implications.
If you encounter a problem with using Tapir (it fails to differentiate a function, or
something truly nasty like a segfault occurs), then you should try switching `safe_mode`
on and look at what happens. Often errors are caught earlier and the error messages are
more useful.
Tapir.jl has been renamed to Mooncake.jl. Please use `AutoMooncake` instead of this type.
"""
Base.@kwdef struct AutoTapir <: AbstractADType
safe_mode::Bool = true
Expand Down
2 changes: 2 additions & 0 deletions src/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ function AutoModelingToolkit(; obj_sparse::Bool = false, cons_sparse::Bool = fal
:AutoModelingToolkit; force = false)
return mtk_to_symbolics(obj_sparse, cons_sparse)
end

@deprecate AutoTapir AutoMooncake
4 changes: 4 additions & 0 deletions test/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ end
ad = @test_deprecated AutoReverseDiff(true)
@test ad.compile
end

@testset "AutoTapir" begin
@test_deprecated AutoTapir()
end

0 comments on commit 149c655

Please sign in to comment.