LION.utils.device¶
The device LION uses when none is given.
Pick the GPU once, at the top of a script, and LION follows it:
torch.cuda.set_device(2) # or torch.set_default_device(“cuda:2”)
Anything given an explicit device= uses that instead. On machines with many
GPUs where only one may be used, the most robust option is to make only that GPU
visible to the process: CUDA_VISIBLE_DEVICES=2 python script.py.
Functions
Return the device LION uses when no device is given. |