Created
October 4, 2023 13:20
-
-
Save n1ckfg/67c7d6d65326b50db8b700704b2c83c7 to your computer and use it in GitHub Desktop.
check_gpu.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import onnxruntime as ort | |
torch.cuda.is_available() # Nvidia or AMD GPU | |
torch.backends.mps.is_available() # Apple GPU | |
ort.get_device() # any GPU |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment