blazingsql.BlazingContext.get_free_memory¶
-
BlazingContext.
get_free_memory
()¶ This function returns a dictionary which contains as key the gpuID and as value the free memory (bytes)
# single-GPU >>> from blazingsql import BlazingContext >>> bc = BlazingContext() >>> free_mem = bc.get_free_memory() >>> print(free_mem)
{0: 4234220154}
# multi-GPU (4 GPUs): >>> from blazingsql import BlazingContext >>> from dask_cuda import LocalCUDACluster >>> from dask.distributed import Client >>> cluster = LocalCUDACluster() >>> client = Client(cluster) >>> bc = BlazingContext(dask_client=client, network_interface=’lo’) >>> free_mem = bc.get_free_memory() >>> print(free_mem)
- {0: 4234220154, 1: 4104210987,
2: 4197720291, 3: 3934320116}