-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatch even more to BLAS #33743
Dispatch even more to BLAS #33743
Conversation
Earlier commits were failing a specific test: julia/stdlib/LinearAlgebra/test/matmul.jl Line 155 in c7e4b99
We are passing it on master by pure luck. |
Maybe you can use julia/stdlib/LinearAlgebra/test/matmul.jl Lines 584 to 598 in f806717
|
The test I mentioned does not dispatch to |
Ah, sorry, I misread your earlier comment. |
I have extended the coefficient promotion to |
I think this is ready for review. |
BTW, should this be a 1.3 milestone? I guess we wouldn't really want to ship 5-arg |
Gentle bump. |
FWIW, it looks good to me. It's a performance bug fix that does not change the API at all so it would be nice if it can be backported to 1.3 (especially because it's still in RC). |
The failing tests appear not to be relevant. Is this otherwise good to merge? Do we need reviews from anyone else? |
Unless there are requests for changes, I think this is good to merge. |
How about putting the backport label, so that @KristofferC can check if it's OK for backport? |
I added the backport label. Let's see... |
Should certainly be 1.3.1 or later. |
Thanks @dkarrasch ! |
This PR probably introduced recent test failures: JuliaLang/LinearAlgebra.jl#655 |
Wherever this goes (in terms of backport), #33843 must go with it. |
* get MulAddMul out of the BLAS way, promote alpha/beta coeffs * fix ambiguity * simplify promotion, :crossedfingers: * remove promote_unless_bool, add symmetry check `syrk_wrapper!` (bugfix) * give BLAS another chance * extend coefficient promotion to sym(v/m)! and hem(v/m)! * fix typo (cherry picked from commit 1ed96b2)
* get MulAddMul out of the BLAS way, promote alpha/beta coeffs * fix ambiguity * simplify promotion, :crossedfingers: * remove promote_unless_bool, add symmetry check `syrk_wrapper!` (bugfix) * give BLAS another chance * extend coefficient promotion to sym(v/m)! and hem(v/m)! * fix typo (cherry picked from commit 1ed96b2)
* get MulAddMul out of the BLAS way, promote alpha/beta coeffs * fix ambiguity * simplify promotion, :crossedfingers: * remove promote_unless_bool, add symmetry check `syrk_wrapper!` (bugfix) * give BLAS another chance * extend coefficient promotion to sym(v/m)! and hem(v/m)! * fix typo
This addresses an issue raised in #29634 (comment), by applying the methodology of #33229 to the entire
matmul.jl
, (edit: and fixes an issue in thesyrk_wrapper!
).One drawback, just as in #33229, is that alsoBool
parameters are promoted to the numeric type of the matrices, which is unnecessary forBLAS.gemv!
andBLAS.gemm!
. We can think about how to work around that, perhaps by working on the types only and introduce some moreif
branches, but I guess avoiding the generic fallback in some more cases is already a significant improvement.