Does the OpenCL2.0 SVM support allocate memory for images?

Does the OpenCL2.0 SVM support allocate memory for images?

Does the OpenCL2.0 SVM support allocate memory for images?

We can test the SVM performance like:

for(int i=0;i<size;i++)
clSetKernelArgSVMPointer(kernel, 0, d_a);
clSetKernelArgSVMPointer(kernel, 0, d_b);
clSetKernelArgSVMPointer(kernel, 0, d_c);

The SVM performance has been verified good in the example of calculation of a vector,but the clSVMAlloc() cannot allocate memory for images,
how should we do to utilize the SVM for image processing?
Thank you!

The test device is like:

        CL_DEVICE_NAME: Genuine Intel(R) CPU 0000 @ 1.60GHz
        CL_DEVICE_VENDOR:       Intel(R) Corporation
        CL_DEVICE_VERSION:      OpenCL 2.0 (Build 8228)
        CL_DEVICE_OPENCL_C_VERSION:     OpenCL C 2.0

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hello, Yi.

Although creating an image from an SVM buffer is not explicitly mentioned in the spec (it just specifies creating buffers out of memory allocated by clSVMAlloc), there is no reason why creating an image object with such a pointer and CL_MEM_USE_HOST_PTR shouldn't be valid.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen