Hi, please check the latest code of beignet, there is no copy needed between CPU and GPU if the host_ptr provided by application is page aligned, and the page align limitation is expected to be removed some days later. You can also try CL_MEM_ALLOC_HOST_PTR to avoid the extra copy without align limitation.
Btw, this zero-copy is supported starting from linux kernel 3.16 and libdrm 2.4.58. From: Beignet [mailto:[email protected]] On Behalf Of spring_wind Sent: Tuesday, December 02, 2014 8:38 PM To: [email protected] Subject: [Beignet] CL_MEM_USE_HOST_PTR involve extra copy? Hi: Intel opencl optimization guide said using CL_MEM_USE_HOST_PTR can avoid extra copy between CPU and GPU, but I noticed that in beignet's implementation source it was not like that: /* Copy the data if required */ if (flags & CL_MEM_COPY_HOST_PTR || flags & CL_MEM_USE_HOST_PTR) cl_buffer_subdata(mem->bo, 0, sz, data); Could someone give me an answer?
_______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
