-
-
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
Amend matrix * vector specialization for strided arrays #32097
Conversation
@nanosoldier |
Your benchmark job has completed - no performance regressions were detected. A full report can be found here. cc @ararslan |
Marking for triage because I'd like to know:
|
I don't think that's the case. For example, given Without this method, we just allocate a This conversion is there for a reason. Now, there's probably a better way to do what it's trying to do, but I don't think this is it. |
Can we restrict the input vector eltype to |
Or how about only doing the conversion if Edit: or both? |
This restricts the element type of the input vector to be `<:Real` and only converts in case the promoted type is concrete. Fixes #32092.
2ca4c5b
to
545d9f5
Compare
Implemented that. Still needs tests though. |
Triage: seems safe to backport. |
I was going to add a test before this was merged, but ¯\_(ツ)_/¯ |
Would still be nice to do separately. |
The test should probably be backported with the fix itself, I would think. But yeah, can do. |
Test added in #32124. |
This restricts the element type of the input vector to be `<:Real` and only converts in case the promoted type is concrete. Fixes #32092. (cherry picked from commit 587cb82)
This restricts the element type of the input vector to be `<:Real` and only converts in case the promoted type is concrete. Fixes #32092. (cherry picked from commit 587cb82)
This restricts the element type of the input vector to be `<:Real` and only converts in case the promoted type is concrete. Fixes #32092. (cherry picked from commit 587cb82)
This restricts the element type of the input vector to be `<:Real` and only converts in case the promoted type is concrete. Fixes #32092. (cherry picked from commit 587cb82)
This method entirely duplicates the one below it with the exception that it also does a
convert
on one of the inputs with the result ofpromote_op
, which doesn't make a whole lot of sense in some cases. By virtue of callingmul!
, strided arrays that go through the abstract array method will still hit the same optimized methods that use BLAS.Fixes JuliaLang/LinearAlgebra.jl#632.
It would be great if this change could be backported, since it fixes an issue in private code that occurs on every version >= 1.1.0. Help coming up with a minimal test case for this would be much appreciated as well.