Implement LinearAlgebra's storage-specific mul! methods - #775
Merged
Conversation
Julia 1.13-rc4 bumped LinearAlgebra to a version that includes JuliaLang/LinearAlgebra.jl#1671, which renamed the storage-level `generic_matvecmul!`/`generic_matmatmul!` entry points into 6- and 7-argument `mul!` methods, with the old names kept only as a fallback behind the generic `mul!` method. LinearAlgebra's strided BlasFloat `mul!` methods are more specific than that fallback, so on 1.13 our `generic_matvecmul!` overload for strided GPU arrays was never reached and products ended up in CPU BLAS (which only works for GPU array types that happen to expose a host pointer). The `generic_matmatmul_wrapper!` hooks likewise forwarded to the legacy name, which on 1.13 bypasses the `mul!` methods that back-ends provide. Implement the generic fallback as the new `mul!` methods, route the wrapper hooks through them, and keep the legacy names only as forwarding shims for Julia before 1.13, so that they can be dropped together once 1.13 becomes the floor. Back-ends should overload the same `mul!` signatures for their own array types.
maleadt
force-pushed
the
tb/linalg-mul-1.13
branch
from
September 3, 2026 11:59
89e06ad to
ecfc499
Compare
This was referenced Sep 3, 2026
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Julia 1.13-rc4 bumped LinearAlgebra to a version that includes JuliaLang/LinearAlgebra.jl#1671, which renamed the storage-level
generic_matvecmul!/generic_matmatmul!entry points into 6- and 7-argumentmul!methods, with the old names kept only as a fallback behind the genericmul!method.LinearAlgebra's strided BlasFloat
mul!methods are more specific than that fallback, so on 1.13 ourgeneric_matvecmul!overload for strided GPU arrays was never reached and products ended up in CPU BLAS (which only works for GPU array types that happen to expose a host pointer). Thegeneric_matmatmul_wrapper!hooks likewise forwarded to the legacy name, which on 1.13 bypasses themul!methods that back-ends provide.Implement the generic fallback as the new
mul!methods, route the wrapper hooks through them, and keep the legacy names only as forwarding shims for Julia before 1.13, so that they can be dropped together once 1.13 becomes the floor. Back-ends should overload the samemul!signatures for their own array types.