Originally published at: https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda_visible_devices/
As a CUDA developer, you will often need to control which devices your application uses. In a short-but-sweet post on the Acceleware blog, Chris Mason writes: Does your CUDA application need to target a specific GPU? If you are writing GPU enabled code, you would typically use a device query to select the desired GPUs.…
Hi, does the CUDA_VISIBLE_DEVICE permits to be sure to activate the desired GPU for a specific calculation if OPTIMUS technology is present?
Hi, I am wondering what’s the difference between CUDA_VISIBLE_DEVICES and NVIDIA_VISIBLE_DEVICES
I’m not 100% sure, but I believe NVIDIA_VISIBLE_DEVICES
is used by the NVIDIA Docker Runtime to select GPUs visible inside a container. CUDA_VISIBLE_DEVICES
is used by the CUDA driver to decide what devices should be visible to CUDA.