Last active
October 8, 2019 15:58
-
-
Save kylebgorman/29d913dabf95d0f5590d652c31c3c29f to your computer and use it in GitHub Desktop.
Checks that PyTorch can reach CUDA
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
#!/usr/bin/env python | |
"""Checks that PyTorch can reach CUDA.""" | |
import sys | |
import torch | |
if __name__ == "__main__": | |
if not torch.cuda.is_available(): | |
print("FAIL", file=sys.stderr) | |
exit(1) | |
else: | |
print("OK", file=sys.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment