File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
1616[weakdeps ]
1717GPUArrays = " 0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
1818KernelAbstractions = " 63c18a36-062a-441e-b654-da1e3ab1ce7c"
19+ Mooncake = " da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
1920Optimisers = " 3bd65402-5787-11e9-1adc-39752487f4e2"
2021Reactant = " 3c362404-f566-11ee-1572-e11a4b42c853"
2122RecursiveArrayTools = " 731186ca-8d62-57ce-b412-fbd966d074cd"
@@ -27,6 +28,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
2728[extensions ]
2829ComponentArraysGPUArraysExt = " GPUArrays"
2930ComponentArraysKernelAbstractionsExt = " KernelAbstractions"
31+ ComponentArraysMooncakeExt = " Mooncake"
3032ComponentArraysOptimisersExt = " Optimisers"
3133ComponentArraysReactantExt = " Reactant"
3234ComponentArraysRecursiveArrayToolsExt = " RecursiveArrayTools"
@@ -45,6 +47,7 @@ GPUArrays = "10.3.1, 11"
4547KernelAbstractions = " 0.9.29"
4648LinearAlgebra = " 1.10"
4749Optimisers = " 0.3, 0.4"
50+ Mooncake = " 0.5"
4851Reactant = " 0.2.15"
4952RecursiveArrayTools = " 3.8"
5053ReverseDiff = " 1.15"
Original file line number Diff line number Diff line change 1+ module ComponentArraysMooncakeExt
2+
3+ using ComponentArrays, Mooncake
4+
5+ # ComponentVector handling in @from_rrule
6+ function Mooncake. increment_and_get_rdata! (
7+ f:: Mooncake.FData{@NamedTuple{data::A, axes::Mooncake.NoFData}} ,
8+ r:: Mooncake.NoRData ,
9+ t:: A ,
10+ ) where {P <: Union{Base.IEEEFloat, Complex{<:Base.IEEEFloat}} , A <: Array{P} }
11+ return Mooncake. increment_and_get_rdata! (f. data[:data ], r, t)
12+ end
13+
14+ end
You can’t perform that action at this time.
0 commit comments