While my game is running I want to run an AI tool on another Nvidia GPU if present (with a fallback to the same GPU). To specify where AI tool runs I use CUDA_VISIBLE_DEVICES
.
The problem is NVML device 0 is not the same as the default GPU where Windows creates my Direct3D device, so just setting CUDA_VISIBLE_DEVICES=1
on a machine with 2 Nvidia GPUs may actually force the AI tool to use the same GPU.
Unless there’s a better way to accomplish the above, how can I figure out NVML device index for my Direct3D device?
8