diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index d22e82d3..6253546f 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -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' diff --git a/ext/ComponentArraysMooncakeExt.jl b/ext/ComponentArraysMooncakeExt.jl index a7a5de8f..7571071f 100644 --- a/ext/ComponentArraysMooncakeExt.jl +++ b/ext/ComponentArraysMooncakeExt.jl @@ -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 @@ -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