cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ms_alkadi
Journeyman III

Read problem from device buffer in Zerocopy mode

I use a single buffer to store multiple values. At the last line of my openCL kernel I update one of these variables using an atmoic operation. Reading this variable in C after the end of kernel execution gives sometimes a wrong/old value. Other variables located in the same buffer are read correctly.

I use clEnqueueMap (blocking mode). The buffer is located on the GPU and was created using  CL_MEM_USE_PERSISTENT_MEM_AMD. Reading is perfomed  in Zerocopy mode (VM enabled).

This problem disappears when I set a break point after the clFinish and then read. It disappears also when I copy the device buffer to a host buffer and then map and read it.

Can anybody expect where the problem could be?

Nachricht geändert durch Soubhi Al Kadi

0 Likes
1 Reply
dipak
Big Boss

Hi,

Sorry for this delayed reply.

Please can you share some test code (host and device) which manifests the problem? Please also let us know your setup details such as OS, driver, device etc.

Regards,

0 Likes