PDA

View Full Version : Image2D OpenCL & Snow Leopard



Letinono
08-31-2011, 06:51 AM
Hello,

I have a problem with an OpenCL code that runs correctly on Windows XP and 7 on different graphic cards (GF 8400GS, GF 9500GT, GTX285, GTX 470, Quadro 4000).

But with Snow Leopard on a mac mini (9400m) the code doesn't work and we get the following errors:

1. After a clEnqueueReadBuffer -> CL_INVALID_COMMAND_QUEUE

2. When we try to use clCreateImage2D with the following image format configuration


cl_image_format image_format;
image_format.image_channel_order = CL_INTESITY;
image_format.image_channel_data_type = CL_FLOAT;


we get the error : CL_IMAGE_FORMAT_NOT_SUPPORTED.

Is there a problem with OsX SL and OpenCL?

I try to install the latest cuda 4 driver and it changes nothing;

Thanks for your help.

david.garcia
08-31-2011, 04:14 PM
Have you checked whether that image format is supported on your mac mini? You can query that with clGetSupportedImageFormats() (http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSupportedImageFormats.html).

Letinono
09-01-2011, 12:38 AM
No I will try it.

Thanks a lot.

Letinono
09-01-2011, 06:09 AM
OpenCL implementation in osX snow loepard seems to not support our image format.

Unfortunately no format supported can answer to our problem.

That's a bad news :D

Any idea for the first problem? Is a bad kernel execution can corrupt the command queue and return CL_INVALID_COMMAND_QUEUE when we use it after?

Thanks a lot.

david.garcia
09-01-2011, 03:00 PM
Are you sure that this won't work for you?



cl_image_format image_format;
image_format.image_channel_order = CL_R;
image_format.image_channel_data_type = CL_FLOAT;


It's almost the same as CL_INTENSITY and likely supported everywhere.


Is a bad kernel execution can corrupt the command queue and return CL_INVALID_COMMAND_QUEUE when we use it after?

Yes, that's exactly what happens. You would need to at least destroy the queue and create a new one.

Letinono
09-05-2011, 03:59 AM
On our mac osX 10.6.8 with GeForce 9400m, there is only CL_RGBA and CL_BGRA that supports CL_FLOAT.

We will try later with 10.7.x.

Thanks.

mshomam
04-05-2012, 11:11 AM
Any idea for the first problem? Is a bad kernel execution can corrupt the command queue and return CL_INVALID_COMMAND_QUEUE when we use it after? http://methoo.com