We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I would like to confirm whether CL_MEM_USE_HOST_PTR has extra overhead, such as memory copy, on Mali G72.
According to ARM OpenCL Optimization Guide, using CL_MEM_USE_HOST_PTR is discouraged.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.100614_0300_00_en/index.html
"8.3.3 Do not create buffers with CL_MEM_USE_HOST_PTR if possible"
Thanks,
Jeff
Hi Jeff,
CL_MEM_USE_HOST_PTR will result in copies being performed during map/unmap operations (unless the host_ptr passed in has been obtained with clSVMAlloc). To create a buffer that wraps memory that hasn't been obtained from the OpenCL runtime without having to pay the cost of copies, I recommend having a look at our memory import extension: https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_import_memory.txt
Regards,
Kévin