1 Reply Latest reply on Dec 8, 2015 4:00 AM by dipak

    Processing host's array of buffers mapped to cl_mem via CL_MEM_USE_HOST_PTR

    yhwan

      Hi everyone,

       

      I'm trying to process an array of buffers that are allocated by a host (running on Carrizo machine with OpenCL 2.0). Although clSVMAlloc() is supported, I need to use the memory allocated by the host, thus clCreateBuffer with CL_MEM_USE_HOST_PTR is currently my only option. (When is fine-grained SVM system going to be supported anyways?)

       

      I've seen many posts that say passing an array of cl_mem or double pointer of SVM to the kernel is not allowed. However, passing each element of cl_mem as a separate argument parameter is not possible either since number of buffers I need to pass are in thousands (e.g., 4096, 8192). Merging them into one long buffer is not possible either since that will require copying, which I'm trying to avoid. I also thought about passing a structure (allocated with SVM) that contains array of cl_mem objects but this doesn't seem to be possible either. Is there any way I can achieve this goal? Any help will be appreciated!

       

      Thanks,

      Younghwan