We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
eye doesn't keep tensors on the gpu:
eye
In [1]: import lab as B In [2]: import lab.torch In [3]: import torch In [4]: B.eye(torch.ones((2, 2)).cuda()) Out[4]: tensor([[1., 0.], [0., 1.]]) # isn't on cuda
I traced this issue back from pinv which fails due to this issue.
pinv
The text was updated successfully, but these errors were encountered:
Hey @InfProbSciX, this behaviour is as intended, although admittedly it might not be most convenient default behaviour.
What you're really after is likely the following:
with B.on_device(x): eye = B.eye(x)
If desired, we could change the behaviour of B.eye(x) for a tensor x so that the above in fact what happens if you just call B.eye(x).
B.eye(x)
x
Sorry, something went wrong.
No branches or pull requests
eye
doesn't keep tensors on the gpu:I traced this issue back from
pinv
which fails due to this issue.The text was updated successfully, but these errors were encountered: