-
Notifications
You must be signed in to change notification settings - Fork 200
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
Nx.LinAlg.qr does not support vectorization #1556
Comments
Which version of Nx are you using? Please try the main branch, as I ran into a bug when implementing LU that was also present in QR that could be account for this. I'm getting different results in main than 0.9.1, and main reconstructs |
The bug was due to "overstriding" the pointer arithmetic. In C++ the size of the datatype is automatically multiplied to the right operand, and I was multiplying explicitly. This might be the cause of the exit you're seeing too |
Interesting, thanks! I was on 0.8 and just verified that it doesn't work on 0.9.1 either, like you said. I was going to try main, but using: {:nx,
git: "https://github.com/elixir-nx/nx.git", tag: "9e2cd048de610151b85a27a183035bc0873fa77f"},
{:exla,
git: "https://github.com/elixir-nx/nx.git", tag: "9e2cd048de610151b85a27a183035bc0873fa77f"}, in
I imagine this is because Nx and EXLA are both defined in this repository. What would be the correct way to set Mix deps? EDIT: The full error is:
|
I think you're right that this works on I messed around with options and this in {:nx, git: "https://github.com/elixir-nx/nx.git", sparse: "nx", ref: "main", override: true},
{:exla, git: "https://github.com/elixir-nx/nx.git", sparse: "exla", ref: "main"}, The output is now:
|
Thanks so much for the help! For my own edification, is 7af065e the commit that contains the fix you mentioned? |
Glad it worked! Yes, that's the commit with the fix :) Also, for the future, you can use a shorter notation for github deps: {:nx, github: "elixir-nx/nx", branch: "main", sparse: "nx"} |
Hello! Thanks again for making Nx. Sorry I haven't been able to try out your CPU-based implementation of LU yet from #1388 (comment)!
I noticed today that QR does not seem to work with vectorized inputs in EXLA:
The result is incorrect; all results except for the first are zero.
Also, the process my Livebook is attached to exits with "Abort trap: 6" shortly afterwards! This happens if I execute
Nx.LinAlg.qr
in a Livebook session or through IEx.Is there anything I can do to help debug this? Thanks again.
The text was updated successfully, but these errors were encountered: