How to specify nvprof “devices” option for Nvidia Visual Profiler?

I have posted the same question on StackOverflow. https://stackoverflow.com/q/49877983/4486071

CUDA Toolkit 9.0, Windows 10, GTX 1060 & NVS 315, 385.54 Driver version.

Nvidia Visual Profiler always fails to profile, returning the following two warning messages:

“Warning: This version of nvprof doesn’t support the underlying device, GPU profiling skipped”

“Warning: No CUDA application was profiled, exiting”

Note my machine has two GPUs installed. Physically removing the NVS 315 fixes the problem; Visual Profiler works. I only want to profile the GTX 1060, but I want to do so with the NVS 315 installed.

Using nvprof and specifying the “–devices” option works:

C:>nvprof --devices 0 bandwidthTest.exe
Whereas

C:>nvprof --devices 1 bandwidthTest.exe
======== Warning: This version of nvprof doesn’t support the underlying device, GPU profiling skipped
Exporting the results from nvprof, then opening in Visual Profiler works:

C:>nvprof --devices 0 --export-profile results.nvvp bandwidthTest.exe
But I’m lazy and don’t want to repeat this a hundred times every time I profile.

So it seems there is something about the NVS 315 that is incompatible. Furthermore, specifying something like “–devices 0” to Visual Profiler (nvvp) would seem to be a solution. If only I knew how.

Hi, tyson.hilmer

You can set an environement variable before you do nvprof or launch visual profiler.

On windows, it is

set CUDA_VISIBLE_DEVICES=0