Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: fredrikekre/runic-action@v1
with:
version: '1'
14 changes: 7 additions & 7 deletions ext/ComponentArraysMooncakeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ function _increment_subarray_fdata!(f_cv, t_data::AbstractArray{P}) where {P <:
throw(
ArgumentError(
"ComponentArraysMooncakeExt: cannot aggregate a cotangent of length " *
"$(length(t_data)) into a SubArray-backed ComponentVector tangent whose " *
"parent has length $(length(parent)). This happens when a cotangent " *
"flows into a view that does not fully cover its parent; there is no " *
"way to recover the view indices from Mooncake fdata alone. Please " *
"file an issue against ComponentArrays.jl with a reproducer so the " *
"offending rrule can be patched.",
"$(length(t_data)) into a SubArray-backed ComponentVector tangent whose " *
"parent has length $(length(parent)). This happens when a cotangent " *
"flows into a view that does not fully cover its parent; there is no " *
"way to recover the view indices from Mooncake fdata alone. Please " *
"file an issue against ComponentArrays.jl with a reproducer so the " *
"offending rrule can be patched.",
),
)
end
Expand Down Expand Up @@ -109,7 +109,7 @@ function Mooncake.increment_and_get_rdata!(
end

function Mooncake.friendly_tangent_cache(x::ComponentArray)
Mooncake.FriendlyTangentCache{Mooncake.AsPrimal}(copy(x))
return Mooncake.FriendlyTangentCache{Mooncake.AsPrimal}(copy(x))
end

end
Loading