cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

alariq
Adept I

Intrusive behaviour of APP Profiler.

Hello, All

I have encountered a strange behaviour of APP PRofiler from a developer point of view. I am not sure that this is a bug, maybe it is intended, but it is not really good in some cases.

Here is what happens: I have a kernel which uses global memory (read/write). It reads from buffer does some work and writes the data back to the same buffer. Then another kernel uses its results.

Everything goes fine untill i try to run my program from APP Profiler. Becaue it(APP Profiler) runs internally my kernel several times (i checked it by putting simple print message) - data in global buffer become invalid. Which in turn makes my program to misbehave.

I've rewritten my kernel to instead use 2 buffers (just to workaround this issue) and then it works. But this is not one usually wants to do.

So, the question is: Is there any way to fix it without modifying my program.

Thanks!

0 Likes
2 Replies
nou
Exemplar

profiler make backup of buffers before multiple runs of kernel. it choose according to CL_MEM_WRITE flag when  you create buffer. so you must have buffer flaged as read only but you write into that buffer.

0 Likes

Yes i was thinking the same way at the beginning, but my buffer is created as read/write with CL_MEM_READ_WRITE flag.

inside kernel it is declared as : __global uint* buf

Détecter la langue » English
0 Likes