Long OpenCL compile time when debugger is attached

Hi All,

I am using OpenCL on Windows 7 64bit, compiling with Visual Studio 2008. When I run a program with the debugger attached (ie, launch by pressing F5), it takes around 15 seconds to compile a very simple OpenCL kernel from source using clBuildProgram(). However, running the same program without the debugger attached (ie, launch by pressing crtl-F5) results in a compile time of under half a second.

I am using the Cuda Toolkit v3.0 and GPU Computing SDK v3.0 with driver version 197.16. The target platform has two devices, both of which are Geforce GTX 260M cards.

Has anyone else seen this behavior, and if so, is there a workaround to make OpenCL kernels build faster with the debugger attached?

Thanks,

Dan

I have(had) the same problem, but not as extreme and the amount of extra time varies dramatically over time. For the last few weeks there has been no noticeable difference at all so I assumed that it was fixed in 3.0.

Thanks for the reply - glad to hear I’m not alone! Can you tell me what driver version you are using? Maybe that makes the difference.

Cheers,

Dan

Driver 197.13 on 64-bit Windows Vista, GeForce GTX 285.

Some output from oclDeviceQuery

OpenCL SW Info:

CL_PLATFORM_NAME:	  NVIDIA CUDA

 CL_PLATFORM_VERSION:   OpenCL 1.0 CUDA 3.0.1

 OpenCL SDK Revision:   5537818

 CL_DRIVER_VERSION:					197.13

I have an XP 64bit box that does not have this problem and it is using 197.13. I’ll try switching from 197.16 to 197.13 and see if the problem goes away.

Cheers,

Dan

Windows 7 x64, Visual Studio 2008, and the latest 1.1 conformant driver and SDK, and clBuildProgram() takes 6-7 seconds for the RecursiveGaussian example when run under the debugger. Instantaneous when not run from the debugger. Rather annoying.

Bummer - I was going to try the new 1.1 drivers in hope that this problem was fixed. How do we go about reporting this as a bug to NVidia? I really think they ought to fix this problem.

Cheers,

Dan

Hi, I have reported the problem to NVidia (with a sample) and they are looking at the problem. In our case, it was compiling during 30 seconds… and with the last version of our kernel… it never ending (waiting during 15 min) !

If someone has a solution to bypass the problem, he’s welcome ;-)

Hi, I have reported the problem to NVidia (with a sample) and they are looking at the problem. In our case, it was compiling during 30 seconds… and with the last version of our kernel… it never ending (waiting during 15 min) !

If someone has a solution to bypass the problem, he’s welcome ;-)

I do not think this is a driver issue. I think the long compile times is related to if heap debugging is enabled or not. Using the microsoft utility, gflags.exe, you can tell the operating system to enable heap debugging or not. If heap debugging is enabled, then with or without visual studio, the Nvidia compiler runs much slower. I’m not sure about this, but my guess is that visual studio 2008 is automatically enabling heap debugging in debug mode.

I do not think this is a driver issue. I think the long compile times is related to if heap debugging is enabled or not. Using the microsoft utility, gflags.exe, you can tell the operating system to enable heap debugging or not. If heap debugging is enabled, then with or without visual studio, the Nvidia compiler runs much slower. I’m not sure about this, but my guess is that visual studio 2008 is automatically enabling heap debugging in debug mode.

Made any progress with this yet? I always run my applications under the debugger during development, and this is REALLY slowing everything down. I hope NVIDIA isn’t punishing us for not using CUDA! :-)

Made any progress with this yet? I always run my applications under the debugger during development, and this is REALLY slowing everything down. I hope NVIDIA isn’t punishing us for not using CUDA! :-)