File size: 168 Bytes
2eebda5
 
76091e9
0613d9c
 
76091e9
 
1
2
3
4
5
6
7
8
import torch

device = torch.accelerator.current_accelerator() or torch.device('cpu')

print(f"Device set to {torch.Tensor().to(device).device}")

__all__ = ['device']