Is there any code in python with either numba or tensorflow installed? For example, if I would like to know the GPU memory info, I can simply use:
from numba import cuda
gpus = cuda.gpus.lst
for gpu in gpus:
with gpu:
meminfo = cuda.current_context().get_memory_info()
print("%s, free: %s bytes, total, %s bytes" % (gpu, meminfo[0], meminfo[1]))
in numba. But I can not find any code that gives me the maximum threads per block info. I would like the code to detect the maximum number of threads per block and further calculate the specified number of blocks in each direction.