Unified Memory Warning and how to set CUDA device for GTX 1060

Hello everyone,

I’ve a laptop with an internal graphics Intel HD 530 and a Nvidia GTX 1060 (Pascal) mobile edition.

I’ve been running some sample CUDA code examples and noticed that its performance readout using nvprof is fairly bad for the hardware I am running. I compared the result to my other laptop with a GTX 960M and it was day and night difference

When I run my test program, I get an error 10964 on Unified Memory Profiling. When I try the Visual Profiler Tool, I get a different warning number 8772 but the relatively same message. An image can be seen here http://i.imgur.com/Z0Ywmx5.png

I think this is due to it confusing my integrated and dedicated card. I thought the solution was to use the environment variable “CUDA_VISIBLE_DEVICES” and set it to 0(which I think is correct based on the second powershell window showing 0 for the GTX 1060).

Am I setting the environment variable correctly in Windows? Any other tips for how to fix it so that CUDA runs off the GTX 1060 and gets profiled correctly? We are going to be using this system for computer vision tasks so performance is vital.

Thank you for the help!

Seems like this issue of a warning by nvprof has been covered in the past:
https://devtalk.nvidia.com/default/topic/979977/visual-profiler/-quot-unified-memory-profiling-is-not-supported-quot-warning-3348/

As far as your performance issue, if you are profiling a debug build or one not built with the correct compute capability, it can run slower. Check those issues first. Your code should be running on the 1060 even without setting the CUDA_VISIBLE_DEVICES variable. Any non-CUDA capable GPU’s won’t be detected and you would get an error of ‘No CUDA capable GPUs found’ if you tried to run code on a machine that didn’t have one.