Skip to content

Implement LinearAlgebra's storage-specific mul! methods - #630

Merged
maleadt merged 1 commit into
mainfrom
tb/linalg-mul-1.13
Sep 3, 2026
Merged

Implement LinearAlgebra's storage-specific mul! methods#630
maleadt merged 1 commit into
mainfrom
tb/linalg-mul-1.13

Conversation

@maleadt

@maleadt maleadt commented Sep 3, 2026

Copy link
Copy Markdown
Member

Julia 1.13-rc4 bumped LinearAlgebra to a version including JuliaLang/LinearAlgebra.jl#1671, which renamed the storage-level generic_matvecmul!/generic_matmatmul! entry points into 6- and 7-argument mul! methods. LinearAlgebra's strided BlasFloat mul! is more specific than the fallback that still routes to the old names, so our generic_matvecmul! overload was never reached on 1.13 and matrix-vector products ended up in CPU BLAS.

This implements the products as the new mul! methods and keeps the legacy names only as forwarding shims for Julia < 1.13 (one @static block per file, to be dropped when 1.13 becomes the floor). It requires GPUArrays 11.5.14 (JuliaGPU/GPUArrays.jl#775, now registered), whose generic_matmatmul_wrapper! hooks route through mul! on 1.13.

@maleadt
maleadt force-pushed the tb/linalg-mul-1.13 branch 2 times, most recently from 34739ff to c1d7862 Compare September 3, 2026 13:24
@maleadt
maleadt marked this pull request as ready for review September 3, 2026 14:33
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.31%. Comparing base (db8bc78) to head (6013fc2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #630      +/-   ##
==========================================
+ Coverage   81.19%   81.31%   +0.11%     
==========================================
  Files          50       50              
  Lines        3568     3569       +1     
==========================================
+ Hits         2897     2902       +5     
+ Misses        671      667       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

For matrix-vector products this breaks oneMKL dispatch: LinearAlgebra's
strided BlasFloat `mul!` method is more specific than that fallback, so
it wins over our `generic_matvecmul!` overload and calls into CPU BLAS
with device pointers.

Implement the dense and sparse products as the new `mul!` methods, 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.
@maleadt
maleadt merged commit 83c9130 into main Sep 3, 2026
5 checks passed
@maleadt
maleadt deleted the tb/linalg-mul-1.13 branch September 3, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant