We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
I think it will be best if the code picked the best device automatically. This will also support Mac's mps device.
def get_best_device(): if torch.backends.mps.is_available(): return "mps" elif torch.cuda.is_available(): return "cuda" else: return "cpu"
Activity