Zero Copy Buffers using cl_arm_import_memory extension in OpenCL 1.2 - arm mali midgard GPUs.

Hi,

I wish to allocate a vector and use it's data pointer to allocate a zero copy buffer on the GPU. There is this cl_arm_import_memory extension which can be used to do this. But I am not sure wether its supported for all mali midgard OpenCL drivers or not.

I was going through this link and I am quite puzzled by the following lines : -

      If the extension string cl_arm_import_memory_host is exposed then importing
      from normal userspace allocations (such as those created via malloc) is
      supported.

What exactly does these lines mean ? I am specifically working on rockchip's RK3399 boards. Kindly help.
Parents
  • Well, I queried ONE THE COMPUTE DEVICE using the CL_DEVICE_EXTENSIONS query string and I just saw the c;l_arm_import_memory string and not the cl_arm_import_memory_host string. What does this mean? Can I still use the extension function. Another possible workaround might be to first allcate a gpu side buffer using alloc_host_ptr and then write a custom allocator to map the gpu buffer pointer to a vector. But, I wish to know how safe is this? Will this work ?

Reply
  • Well, I queried ONE THE COMPUTE DEVICE using the CL_DEVICE_EXTENSIONS query string and I just saw the c;l_arm_import_memory string and not the cl_arm_import_memory_host string. What does this mean? Can I still use the extension function. Another possible workaround might be to first allcate a gpu side buffer using alloc_host_ptr and then write a custom allocator to map the gpu buffer pointer to a vector. But, I wish to know how safe is this? Will this work ?

Children
More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.