7 Replies Latest reply on Jul 5, 2013 1:17 AM by himanshu.gautam

    Zero copy also need memory transfer on APU?

    Biaowang

      Hi, Guys:

       

      I have APU A6-4455M and try to employ "zero copy" to optimize the memory transfer. However, after I read the programming guide and read the code of  the BufferBandwidth, I found actually you need a copy anyway to tranfer data from CPU to GPU by following sequences:      

      1. hostptr = clEnqueueMapBuff(cl_mem_obj)
      2. memcpy(hostptr,  ptr_with_initialized_data_on_host, size_of_data)
      3. clEnqueueUnMapMemobj(cl_mem_obj, hostptr)

       

      If the understanding of zero copy above were correct, the question is, why it is called "zero copy" if it need a copy anyway from CPU to GPU or vice verse? Zero copy, IMHO, should have no copy at all since now the CPU and GPU are at the same die without the PCIe connection for APU.

      Any explanation is appreciated!