It would be good to provide (some?) of the memory stats.
We can get total memory (e.g. device.global_mem_size ).
Getting allocated memory doesn't seem as easy - but getting the amount of free memory seems to need an extension CL_DEVICE_GLOBAL_FREE_MEMORY_AMD which isn't on RustiCL (I don't know if it's available on non-AMD devices when using the proprietary drivers).
import pyopencl as cl
platform = cl.get_platforms()[0]
device = platform.get_devices()[0]
print(f"Total global memory: {device.global_mem_size / (1024**3):.2f} GB")
print(f"Global memory cache size: {device.global_mem_cache_size / 1024:.2f} KB")
print(f"Local memory size: {device.local_mem_size / 1024:.2f} KB")
print(f"Max single allocation: {device.max_mem_alloc_size / (1024**3):.2f} GB")
print(f"Host unified memory: {device.host_unified_memory}")
It would be good to provide (some?) of the memory stats.
We can get total memory (e.g.
device.global_mem_size).Getting allocated memory doesn't seem as easy - but getting the amount of free memory seems to need an extension CL_DEVICE_GLOBAL_FREE_MEMORY_AMD which isn't on RustiCL (I don't know if it's available on non-AMD devices when using the proprietary drivers).