Multiplication / device.py
xcx0902's picture
Upload folder using huggingface_hub
76091e9 verified
import torch
device = torch.accelerator.current_accelerator() or torch.device('cpu')
print(f"Device set to {torch.Tensor().to(device).device}")
__all__ = ['device']