Skip to content

Commit 410d4b7

Browse files
Merge pull request #350 from yebai/patch-1
Add friendly_tangent_cache function to Mooncake
2 parents 0f51238 + 29ddd04 commit 410d4b7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ext/ComponentArraysMooncakeExt.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ function Mooncake.increment_and_get_rdata!(
1111
return Mooncake.increment_and_get_rdata!(f.data[:data], r, t)
1212
end
1313

14+
function Mooncake.friendly_tangent_cache(x::ComponentArray)
15+
Mooncake.FriendlyTangentCache{Mooncake.AsPrimal}(copy(x))
16+
end
17+
1418
end

0 commit comments

Comments
 (0)