1 Reply Latest reply on Aug 12, 2014 1:02 AM by dipak

    Read problem from device buffer in Zerocopy mode

    ms_alkadi

      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