-
Notifications
You must be signed in to change notification settings - Fork 230
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
Bugfixes when using \ operator with non square matrices #1584
Conversation
Thanks! I'm not too familiar with this implementation, so I'll trust you on it. Can you add a test? The error reported here is the same as what now happens in #1584, so I guess this fixes that issue? |
I updated the PR by adding a few tests. This indeed fixes the issue I was talking about in my PR in DFTK: we use the |
CI failures are relevant. |
I think I found out what was happening. |
That's because JuliaLang/julia#42594 is only in 1.8 |
Hi,
I was experiencing issues with the
\
operator and QR decomposition in CUDA. I checked the issues and saw #138, but it is quite old and outdated. Currently, here is the bug I am facingThis also fails if
A
is a rectangular matrix, or if it is a square matrix andB
is a rectangular matrix.I took a look at how it's done in LinearAlgebra and it seems that there are two specialized versions of
ldiv!
, one for vectors and one for matrices. These twoldiv!
functions select only the relevant part of the input elements by using a view, and this is how it avoids dimension mismatch.I tried to reproduce this in CUDA by breaking down
ldiv!
into two functions. With this, I can run the code above and it gives the correct result.Fixes #1584