Results 1 to 4 of 4

Thread: CLH_ERROR_NO_BINARY_FOR_GPU for image2d_t

  1. #1
    Junior Member
    Join Date
    Nov 2009

    CLH_ERROR_NO_BINARY_FOR_GPU for image2d_t

    This is on MacOS 10.6.1. Here's my kernel:

    Code :
    __kernel void Convolve(
    	__read_only __global image2d_t img, 
    	__write_only __global image2d_t newImg,
    	__constant uint *filter, const int filterWidth, const int filterHeight,
    	const int w, const int h)
    	__private const sampler_t sampler = 
    	uint4 val = read_imageui(img, sampler, (int2)(0, 0));

    The problem is that the build log shows this:

    Code :
    Build Log:
    Error while compiling the ptx module: CLH_ERROR_NO_BINARY_FOR_GPU
    PTX Info log: 
    PTX Error log:

    And that's no fun! Commenting out the read_imageui line causes a successful compilation, but is hardly a solution. The specs say specifically (6.11. "Image memory objects that are being read by a kernel should be declared with the __read_only qualifier." Removing the __read_only qualifier from img also doesn't help. Removing the __global qualifier does help, but why should that be? Global is the only space that could possibly hold the image because of its size.

    Should I file a bug with Apple? Or is it a case of ur doin it wrong?



  2. #2
    Senior Member
    Join Date
    Jul 2009
    Northern Europe

    Re: CLH_ERROR_NO_BINARY_FOR_GPU for image2d_t

    I would agree that you should not get this error because of the global option. Either you should get a compiler error or it should just work with global. (You don't need the "__" before private/global etc.) The no binary for GPU error suggests that the GPU's compiler failed to compile for some reason, which would be consistent with why you didn't get a compiler error string. (Those tend to come from the front-end and not the GPU back-end.) If removing the global makes it work then I would file a bug against Apple saying that putting in global fails to compile and doesn't generate an compiler error. I suspect this works fine on the CPU, though.

  3. #3
    Junior Member
    Join Date
    Nov 2009

    Re: CLH_ERROR_NO_BINARY_FOR_GPU for image2d_t

    Thanks, I have filed bug ID 7372367. Let's hope we see some action from Apple on this!

  4. #4
    Junior Member
    Join Date
    Nov 2009

    Re: CLH_ERROR_NO_BINARY_FOR_GPU for image2d_t

    Here is what Apple had to say about this issue. Apparently they are looking to Khronos to update the spec. They effectively say that image2d_t and image3d_t (as well as sampler) are structures, and you don't get to specify where the data in the structure gets stored. In addition, regardless of where the data in the structure is stored, the image content is always stored in global space.

    The image data types are opaque data structures. The contents of the image are allocated in __global address space but the variable defined to be of type image2d_t or image3d_t is not. Since these are not pointers, it does not make sense to use the __global qualifier for the image data type declaration. The spec needs to be clarified so that image type behave the same as sampler types i.e. the address space qualifier should not be specified.

Similar Threads

  1. Better way to get neighborhood on image2d_t?
    By sezaru in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 8
    Last Post: 08-15-2011, 10:50 PM
  2. CLH_ERROR_NO_BINARY_FOR_GPU when not using sampler!?
    By memo in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 3
    Last Post: 11-22-2009, 02:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean