5 Replies Latest reply on Oct 4, 2010 5:41 PM by MicahVillmow

    clCreateImage2D "Unimplemented"?

      Don't know how to load an image using OpenCL


      I'm just trying to load an image using clCreateImage2D but I keep getting the following error when I call this function:

      /home/ayouhas/opencl/opencl/runtime/src/api/cl_memobj.cpp:585: Unimplemented()


      The directory above, "ayouhas", doesn't even actually exist on my system (Ubuntu 9.04), which makes it even more confusing.

      I know the image is there because I can load it using the OpenCV library.

      It would be great if someone could inspect the attached code sample and provide any suggestions to help me get this working.



      cl_int status = 0; cl_int error; cl_context context = clCreateContextFromType(0, CL_DEVICE_TYPE_DEFAULT, NULL, NULL, &status); void* image = fopen("test_image.bmp","rb"); size_t width = //ASSIGN WIDTH HERE size_t height = //ASSIGN HEIGHT HERE size_t rowpitch = 0; cl_image_format format; format.image_channel_order = CL_RGBA; format.image_channel_data_type = CL_UNSIGNED_INT8; cl_mem_flags flags; flags = CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR; cl_mem myClImage = clCreateImage2D( context, // a valid OpenCL context flags, // option flags [1] &format, // image format properties [2] width, // width of the image in pixels height, // height of the image in pixels rowpitch, // scan-line pitch in bytes [3] image, // pointer to the image data &error // on return, the result code );

        • clCreateImage2D "Unimplemented"?

          Image support is optional in OpenCL.  I think I saw a printout either in the AMD SDK or on this forum, of an AMD sample program, that showed the AMD CPU device did not actually support images, but cannot find it on the forum.  I am on my Mac right now, and the SDK is not on here.  

          You might be just too early to use the AMD beta, if you require images.  If time is critical, you might have to switch to MAC, or try to get into the NVIDIA early access.

          Or then next beta for AMD could be just right around the corner, with either GPU's or the CPU supporting Images.  The Intel CPU device does on Mac OS.  Not sure that Intel actually wrote it though.  I would definitely look through the AMD sample programs, or make a clGetDeviceInfo() call to confirm, before proceeding further, trying to fix something in vain.

          • clCreateImage2D "Unimplemented"?

            it is some kind assert error because

            cl_bool img_support;
                clGetDeviceInfo(devices, CL_DEVICE_IMAGE_SUPPORT, sizeof(cl_bool), &img_support, NULL);

            return 0 so current AMD OpenCL implementation dosent have image support.

              • clCreateImage2D "Unimplemented"?

                Thank you very much for the fast response.

                I'm actually "just" a student. I'm using OpenCL for a project in my parallel systems course (choice of parallel language was ours).

                It's good to know there is no support (at present anyway), as I can now continue on a slightly different path.

                I have OpenCV setup on this system also so will simply build a multi-dim array representation of the image and pass that along to my kernels... not the most efficient method, but this is a class project, not a commercial app.

                Thanks again,


                • clCreateImage2D "Unimplemented"?

                  i am on OSX Mac Pro 12 core with ATI HD 5870 latest model

                  i discovered that my code runs on all mac books as well on mac pro 

                  with nvidea cards. only this new ATI card does not support images 


                  i troed to get info via: 

                  clGetDeviceInfo CL_DEVICE_IMAGE_SUPPORT

                  and it return 0 which means no image support

                  the stream SDK for windows and linux seems to have it but there  is nothing 

                  for osx. I guess that apple is writing their own implementation. So is this a problem of apple or AMD/ATI ? 

                  does somebody know if there in update for it 

                  with image support on OSX ? 

                  thank you 


                • clCreateImage2D
                  Please contact Apple with any concerns about their OpenCL implementation. They handle their own software as we only support Linux and Windows.