-
Notifications
You must be signed in to change notification settings - Fork 149
Fix 0-sized CGemV with unitialized memory #1719
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
Conversation
ce31b9b to
35e76e3
Compare
This is failing in the CI and isn't used?
1ef7d4d to
60c9d88
Compare
| } else | ||
| { | ||
| // Empty A matrix, just scale y by beta | ||
| if (dbeta != 1.0) |
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.
Why not if dbeta == 1?
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.
then you get the initial y. We don't create gemv with uninitialized y when dbeta!=0
That would show up in y = y * beta + A @ x * alpha. You get whatever the user y was. Multiplying by 1 wouldn't change it
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.
Or I may have missed the motivation for your question. This is an eager optimization the theano guys had, do you think it's silly?
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.
Ah of course. 🤦
Looks good to me, except for the test failure then.
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's just the unrelated torch module or did miss another?
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 think it's just that
Closes #1716
It seems like I this one is on me. I removed the else branch in 709f745 and we didn't have any test that failed.
These functions are not trivial to setup correctly. This is like the 3rd or 4th bug I remember fixing (and apparently causing) and we still have #1262