pymlg icon indicating copy to clipboard operation
pymlg copied to clipboard

SE(3) Exp Torch only working with cpu not with cuda

Open saraybakker1 opened this issue 8 months ago • 1 comments

Hi! Thanks for providing this amazing toolbox!

When using the SE(3) torch version of the function Exp(), I get the error that not all tensors are on the same device (some are on cuda:0 and some on cpu), probably because the device is not specified for all tensors.

For example, in wedge, I think that: b1 = torch.tensor([0, 0, 0, 0], dtype = xi.dtype).reshape(1, 1, 4) should be replaced by: b1 = torch.tensor([0, 0, 0, 0], dtype = xi.dtype, device=xi.device).reshape(1, 1, 4)

and in left_jacobian in so3.py: torch.eye(3, 3).

Thanks! :)

saraybakker1 avatar Aug 15 '25 09:08 saraybakker1

hi, I'm glad you're finding pymlg useful. we're adding CUDA support here: #25. it should be merged soon-ish, but you can work off of device_complex_hotfix while we change things

angadbajwa avatar Sep 02 '25 15:09 angadbajwa