eye doesn't keep tensors on the gpu:
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.