cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

spectral
Adept II

Debugging OpenCL program ?

Hi,

I use Visual Studio under Windows XP and would like to know if there are some way to "debug/trace" into an OpenCL kernel/program ?

I have some complex algorithms and it will be very useful.

Thanks

0 Likes
4 Replies
genaganna
Journeyman III

There is no way to debug kernel code presently. you can use printf in kernel code to trace if you are running for CPU.  In beta4, this is working only for Linux.  It will be supported for Windows in upcoming releases.

is this what you are expecting?

0 Likes

Thanks,

It is already a way to know what's happen on the OpenCL side 😉

The best will be something like Nexus from NVidia, but that will work with any OpenCL compliant device.

Yes, I'm running from CPU under Windows, but I have to wait for the next release in order to use it then 😞

Thanks

0 Likes

should this be working in windows version of ATI stream sdk v2?

 

I'm trying it and getting :

 

C:\Users\jfranta\AppData\Local\Temp\OCLC2E2.tmp.cl(115): error: function

          "printf" declared implicitly

      printf("id: %i d: %i",tid,d);



0 Likes

jfranta,

you need to enable the printf function as it is only supported as an extension:

type this above your kernel code:

#pragma OPENCL EXTENSION cl_amd_printf:enable

your printf will then work.

thanks

0 Likes