We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 972a526 commit c05dfb6Copy full SHA for c05dfb6
4 files changed
DifferentiationInterface/CHANGELOG.md
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
10
## [0.7.1]
11
12
+### Feat
13
+
14
+- Use Mooncake's internal copy utilities ([#809])
15
16
### Fixed
17
18
- Make basis work for `CuArray` ([#810])
@@ -40,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
40
44
[0.6.53]: https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.6.52...DifferentiationInterface-v0.6.53
41
45
42
46
[#810]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/810
47
+[#809]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/809
43
48
[#799]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/799
49
[#795]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/795
50
[#790]: https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/790
DifferentiationInterface/Project.toml
@@ -74,7 +74,7 @@ JET = "0.9"
74
JLArrays = "0.2.0"
75
JuliaFormatter = "1,2"
76
LinearAlgebra = "1"
77
-Mooncake = "0.4.121"
+Mooncake = "0.4.122"
78
Pkg = "1"
79
PolyesterForwardDiff = "0.1.2"
80
Random = "1"
DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/DifferentiationInterfaceMooncakeExt.jl
@@ -12,7 +12,7 @@ using Mooncake:
value_and_pullback!!,
zero_tangent,
_copy_output,
- _copy_to_output!
+ _copy_to_output!!
DI.check_available(::AutoMooncake) = true
DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/onearg.jl
@@ -30,7 +30,7 @@ function DI.value_and_pullback(
30
) where {F,Y,C}
31
DI.check_prep(f, prep, backend, x, ty, contexts...)
32
dy = only(ty)
33
- dy_righttype = dy isa tangent_type(Y) ? dy : _copy_to_output!(prep.dy_righttype, dy)
+ dy_righttype = dy isa tangent_type(Y) ? dy : _copy_to_output!!(prep.dy_righttype, dy)
34
new_y, (_, new_dx) = value_and_pullback!!(
35
prep.cache, dy_righttype, f, x, map(DI.unwrap, contexts)...
36
)
@@ -47,7 +47,8 @@ function DI.value_and_pullback(
ys_and_tx = map(ty) do dy
+ dy_righttype =
51
+ dy isa tangent_type(Y) ? dy : _copy_to_output!!(prep.dy_righttype, dy)
52
y, (_, new_dx) = value_and_pullback!!(
53
54
0 commit comments