Skip to content

Commit a94c9e9

Browse files
authored
perf: remove Mooncake warmup during preparation (#772)
* perf: remove Mooncake warmup during preparation * Bump
1 parent ba8a2fa commit a94c9e9

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

DifferentiationInterface/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DifferentiationInterface"
22
uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
33
authors = ["Guillaume Dalle", "Adrian Hill"]
4-
version = "0.6.50"
4+
version = "0.6.51"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/onearg.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function DI.prepare_pullback_nokwarg(
1717
y = f(x, map(DI.unwrap, contexts)...)
1818
dy_righttype = zero_tangent(y)
1919
prep = MooncakeOneArgPullbackPrep(_sig, cache, dy_righttype)
20-
DI.value_and_pullback(f, prep, backend, x, ty, contexts...)
2120
return prep
2221
end
2322

@@ -111,11 +110,10 @@ function DI.prepare_gradient_nokwarg(
111110
) where {F,C}
112111
_sig = DI.signature(f, backend, x, contexts...; strict)
113112
config = get_config(backend)
114-
cache = prepare_pullback_cache(
113+
cache = prepare_gradient_cache(
115114
f, x, map(DI.unwrap, contexts)...; config.debug_mode, config.silence_debug_messages
116115
)
117116
prep = MooncakeGradientPrep(_sig, cache)
118-
DI.value_and_gradient(f, prep, backend, x, contexts...)
119117
return prep
120118
end
121119

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/twoarg.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ function DI.prepare_pullback_nokwarg(
3131
)
3232
dy_righttype_after = zero_tangent(y)
3333
prep = MooncakeTwoArgPullbackPrep(_sig, cache, dy_righttype_after, target_function)
34-
DI.value_and_pullback(f!, y, prep, backend, x, ty, contexts...)
3534
return prep
3635
end
3736

0 commit comments

Comments
 (0)