The question is very simple: One of my users encountered an error in pytorch:
Found GPU0 NVIDIA GeForce GT 710 which is of cuda capability 3.5.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability supported by this library is 3.7.
This means I cannot rely on torch.cuda.is_available()
to check whether it can actually run my code. I need to also make sure the CUDA compute capability of the GPU is >= 3.7. Yet, for some strange reason, the seemingly simple task of getting a GPU's CUDA compute capability is nowhere to be found on stack overflow or Google, despite that right there in the error message it seems to get it no problem.
What I did not realize is that the "major" and "minor" of torch.cuda.get_device_properties(0)
is actually the CUDA compute capability. For example, if major is 7 and minor is 5, cuda capability is 7.5. It can also be done via get_device_capability
.