Skip to content

Commit

Permalink
Update Tapir to use cached rules where possible (#464)
Browse files Browse the repository at this point in the history
* Use get_tapir_interpreter

* Bump patch

* Revert version bump

* Bump compat

---------

Co-authored-by: Guillaume Dalle <22795598+gdalle@users.noreply.github.com>
  • Loading branch information
willtebbutt and gdalle authored Sep 12, 2024
1 parent 60e7815 commit 41bade9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DifferentiationInterface/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SparseArrays = "<0.0.1,1"
SparseConnectivityTracer = "0.5.0,0.6"
SparseMatrixColorings = "0.4.0"
Symbolics = "5.27.1, 6"
Tapir = "0.2.4"
Tapir = "0.2.48"
Tracker = "0.2.33"
Zygote = "0.6.69"
julia = "1.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using Tapir:
fdata,
rdata,
__value_and_pullback!!,
TapirInterpreter
get_tapir_interpreter

DI.check_available(::AutoTapir) = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ end
function DI.prepare_pullback(f, backend::AutoTapir, x, ty::Tangents)
y = f(x)
rrule = build_rrule(
TapirInterpreter(),
get_tapir_interpreter(),
Tuple{typeof(f),typeof(x)};
safety_on=backend.safe_mode,
silence_safety_messages=false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ end

function DI.prepare_pullback(f!, y, backend::AutoTapir, x, ty::Tangents)
rrule = build_rrule(
TapirInterpreter(),
get_tapir_interpreter(),
Tuple{typeof(f!),typeof(y),typeof(x)};
safety_on=backend.safe_mode,
silence_safety_messages=false,
Expand Down

0 comments on commit 41bade9

Please sign in to comment.