Using AMD SDK 2.5 & A6 3650 i have achieved a zero copy from GPU to CPU by allocating a buffer using CL_MEM_ALLOC_HOST_PTR [1] and switching between devices with enqueueMap/Unmap.
If i have the information already on CPU mem can i map the memory to the GPU region ? I have looked in the APP SDK programming guide section 4.4 and saw a mention regarding CL_MEM_USE_PERSISTENT_MEM_AMD but if i pass as host_ptr argument in the buffer allocation i get an error saying "INVALID HOST PTR".
Likewise in the later case how would i map/unmap ? Would i use the same functions with the same arguments ? Does mapping mean something different when applying it to host resident memory or should i use unmap to get the GPU to see the memory ?
The guide specifies "CL_MEM_ALLOC_HOST_PTR - a zero copy buffer that resides on the host." but using both i get invalid host. With CL_MEM_ALLOC_HOST_PTR i was though able to allocate a region on the GPU and use it map/unmap for zero copy. But first i had to copy the data using map/memcpy/unmap for the GPU to process it - which is very expensive....
[1] http://blogs.amd.com/developer/2011/08/01/cpu-to-gpu-data-transfers-exceed-15gbs-using-apu-zero-copy...