Skip to content

Instantly share code, notes, and snippets.

@frankwwu
Last active October 5, 2023 19:40
Show Gist options
  • Save frankwwu/a13ee77f56213a1256a1283505616441 to your computer and use it in GitHub Desktop.
Save frankwwu/a13ee77f56213a1256a1283505616441 to your computer and use it in GitHub Desktop.
numba_cuda.py
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