Created
July 23, 2019 14:57
-
-
Save andrewssobral/7f9bae1690195e929f5602c3c9456252 to your computer and use it in GitHub Desktop.
pytorch_gpu_test.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 | |
print(torch.cuda.current_device()) | |
# 0 | |
print(torch.cuda.device(0)) | |
# <torch.cuda.device at 0x...> | |
print(torch.cuda.device_count()) | |
# 1 | |
print(torch.cuda.get_device_name(0)) | |
# 'GeForce RTX 2070' | |
print(torch.cuda.is_available()) | |
# True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment