We check, if GPUs are available in following line:
|
HAS_GPU = nvml.device_get_count() > 0 |
If my machine has GPUs, but I want to run in CPU-only mode by setting CUDA_VISIBLE_DEVICE, the Merlin Library still has HAS_GPU=True
Example:
export CUDA_VISIBLE_DEVICES='';python -c 'from dask.distributed.diagnostics import nvml; print(nvml.device_get_count())'
Returns 2 for 2x GPUs. But I set CUDA_VISIBLE_DEVICES to empty