Skip to content

Commit b5076d7

Browse files
Merge pull request #356 from abhro/runic
Run runic and update workflow
2 parents 29176ab + 524286e commit b5076d7

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/FormatCheck.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v6
17+
- uses: julia-actions/setup-julia@v2
18+
with:
19+
version: '1'
1720
- uses: fredrikekre/runic-action@v1
1821
with:
1922
version: '1'

ext/ComponentArraysMooncakeExt.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ function _increment_subarray_fdata!(f_cv, t_data::AbstractArray{P}) where {P <:
5454
throw(
5555
ArgumentError(
5656
"ComponentArraysMooncakeExt: cannot aggregate a cotangent of length " *
57-
"$(length(t_data)) into a SubArray-backed ComponentVector tangent whose " *
58-
"parent has length $(length(parent)). This happens when a cotangent " *
59-
"flows into a view that does not fully cover its parent; there is no " *
60-
"way to recover the view indices from Mooncake fdata alone. Please " *
61-
"file an issue against ComponentArrays.jl with a reproducer so the " *
62-
"offending rrule can be patched.",
57+
"$(length(t_data)) into a SubArray-backed ComponentVector tangent whose " *
58+
"parent has length $(length(parent)). This happens when a cotangent " *
59+
"flows into a view that does not fully cover its parent; there is no " *
60+
"way to recover the view indices from Mooncake fdata alone. Please " *
61+
"file an issue against ComponentArrays.jl with a reproducer so the " *
62+
"offending rrule can be patched.",
6363
),
6464
)
6565
end
@@ -109,7 +109,7 @@ function Mooncake.increment_and_get_rdata!(
109109
end
110110

111111
function Mooncake.friendly_tangent_cache(x::ComponentArray)
112-
Mooncake.FriendlyTangentCache{Mooncake.AsPrimal}(copy(x))
112+
return Mooncake.FriendlyTangentCache{Mooncake.AsPrimal}(copy(x))
113113
end
114114

115115
end

0 commit comments

Comments
 (0)