Closed yuxuanzhang1995 closed 1 year ago
It should just be as simple as calling:
apply_to_arrays(lambda x: torch.tensor(x, dtype=torch.float32).cuda())
, or whichever way is your favorite to get the initial torch data onto the gpu:
torch.set_default_device(device)
to set a default permanentlywith torch.device(device): ...
to set a default temporarilyThat works. Thank you!
What is your issue?
Hi quimb team,
In example 12 you showed how to perform optimizations in torch. What do I need to change in order to use cuda as the device for torch optimization?
Best, Yuxuan