Hi,
I am working on a ARNDALE board which consists of a Mali T604 GPU. I have an application developed with OpenCL which runs fine on this board. The application uses buffer memory. Now I want to use texture memory instead of buffer memory. I changed my host code to use texture memory but when I try to compile the application, I get error mentioning that the compiler cannot recognize the write_image, clCreateImage functions. From the device query I can see that texture memory is supported on this GPU. It seems like the driver does not support it. Could anyone please clarify whether or not Mali T604 and its driver supports texture memory ?
Ps: I contacted Mali 4 days ago but did not receive any clarification from them yet.
Hi mainul,
Currently the Mali Midgard (T600+) GPUs support OpenCL 1.1, but clCreateImage only exists in CL 1.2. For 1.1 you need to use clCreateImage[2|3]D. And by write_image, do you mean it errors on the use of the define CL_COMMAND_WRITE_IMAGE?
How did you contact us and I can see what the current state is?
Thanks,
Chris
Hi Chris,
When I tried to create texture memory I always get the error code -10 which means "CL_IMAGE_FORMAT_NOT_SUPPORTED".
Here is my code for creating image:
cl_image_format format;
format.image_channel_data_type = CL_UNSIGNED_INT16;
format.image_channel_order = CL_R;
size_t image_width=integralFactor * (image.cols + 1);
size_t image_height=image.rows + 1;
size_t image_row_pitch;
cl_mem tex_integral = clCreateImage2D((cl_context)image.clCxt->oclContext(),
CL_MEM_WRITE_ONLY ,
&format,
image_width,
image_height,
0,
NULL,
&status);
The same code works fine in imagination's GPU and also in AMD's GPU.
I do not understand why it does not work in MALI GPU.
Could you give some idea what might be the reason?
My another colleague was working with a project while he got the error saying
"no matching function for call to 'write_imagef' "
"no matching function for call to 'write_imagei' "
and the kernel gave a build error.
I submitted an online enquiry form asking about this texture memory on May 23, 2014.
Thanks and regards,
Mainul
P.S, write_imagef and write_imagei are valid functions in the CL 1.1 BIFL, so if you could provide an example kernel which is failing to compile we'd be happy to take a look at it. Although the spec does say this:
write_imagef can only be used with image objects created with image_channel_data_type set to one of the pre-defined packed formats or set to CL_SNORM_INT8, CL_UNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT16, CL_HALF_FLOAT or CL_FLOAT. Appropriate data format conversion will be done to convert channel data from a floating-point value to actual data format in which the channels are stored.
write_imagei can only be used with image objects created with image_channel_data_type set to one of the following values: CL_SIGNED_INT8, CL_SIGNED_INT16 and CL_SIGNED_INT32.
Unsure what the "pre-defined packed formats" are offhand for write_imagef, but write_imagei definitely won't work with CL_UNSIGNED_INT16 according to the spec.
Hi Mainul,
According to http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf section 5.3.2.1, "Minimum List of Supported Image Formats", CL_R is not in that list, so it could be that the version of the driver you're running is very old and does not expose this. I have looked at the source and the combination you are requesting is on trunk, so could you check the available formats on your driver release with clGetSupportedImageFormats? It's always worth checking the available formats for formats/combinations which are not guaranteed to be available by the specification.
As there's been no activity on this post for a couple of months I'm going to mark the question as assumed answered. Let us know if you want to open it back up.
Ellie