-
Notifications
You must be signed in to change notification settings - Fork 307
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
Fix blas mat-vec multiplication on array with only 1 nontrivial dimension #585
Conversation
The failing tests are behavior intended by this fix, needs discussion if this is desired behavior. |
5e19627
to
db5f26f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry that it's taken me so long to review this PR. Thanks for your investigative work on this.
The only change I'd like to make is to add a comment explaining why those .max()
calls are necessary.
@@ -588,8 +588,8 @@ pub fn general_mat_vec_mul<A, S1, S2, S3>(alpha: A, | |||
{ | |||
let a_trans = CblasNoTrans; | |||
let a_stride = match layout { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add a comment, e.g.
// Determine stride between rows or columns. Note that the stride is
// adjusted to at least `k` or `m` to handle the case of a matrix with a
// trivial (length 1) dimension, since the stride for the trivial dimension
// may be arbitrary.
b5cad2f
to
b101a27
Compare
Using the maintainer push to PR to update. I'll add your comment @jturner314 jturner314 but not in that way, because it causes a textual conflict. |
@jturner314 @sebasv do you remember what the failing test comment was about? I guess it's obsolete now, because the tests pass and this looks ready to merge to me. |
I'm not sure. Maybe it's referring to the |
ok must be obsolete, thanks :) Thanks so much @sebasv for reporting and fixing! (It's me who renamed the test and the PR to avoid using the term "dot product" here.) |
Just for completeness, if I recall correctly there were two tests not related to this PR which failed because they called a dot product on a transposed array with a trivial dimension, which messed up the strides. If no tests fail now, this was probably resolved with another bugfix. @bluss @jturner314 thank you for your reviews and for merging the fix! |
First attempt at fixing #584