Created
November 12, 2023 19:21
-
-
Save FlyingFathead/613de3fab0f0cc6df7579c1e39ac0a7c to your computer and use it in GitHub Desktop.
Get your CUDA compute level on CLI
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
# requires the pip `pycuda` package | |
# install it with: `pip install pycuda` | |
import pycuda.driver as cuda | |
cuda.init() | |
# Assuming you want to check the first GPU | |
device = cuda.Device(0) | |
compute_capability = device.compute_capability() | |
print(f"CUDA Compute Capability: {compute_capability[0]}.{compute_capability[1]}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment