Last active
October 5, 2023 19:40
-
-
Save frankwwu/a13ee77f56213a1256a1283505616441 to your computer and use it in GitHub Desktop.
numba_cuda.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
from numba.cuda.cudadrv import enums | |
from numba import cuda | |
device = cuda.get_current_device() | |
attribs= [name.replace("CU_DEVICE_ATTRIBUTE_", "") for name in dir(enums) if name.startswith("CU_DEVICE_ATTRIBUTE_")] | |
for attr in attribs: | |
print(attr, '=', getattr(device, attr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment