Results 1 to 4 of 4

Thread: Nvidia bug in clCreateKernelsInProgram

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    14

    Nvidia bug in clCreateKernelsInProgram

    When a program was created for two Nvidia devices, but built for only one of them, Nvidia's implementation of clCreateKernelsInProgram() returns the error CL_INVALID_PROGRAM_DEFINITION.

    Needless to mention, this error is not even listed in the OpenCL specification for the "clCreateKernelsInProgram" function, besides there should be no error in the first place as the OpenCL specifications clearly states:

    "Kernel objects are not created for any __kernel functions in program that do not have the same function definition across all devices for which a program executable has been successfully built.

    program is a program object with a successfully built executable"

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Nvidia bug in clCreateKernelsInProgram

    Maybe this is something you should bring up in NVidia's support forums.

    How did you get the human-readable error string "CL_INVALID_PROGRAM_DEFINITION"? What numeric error code do you get fro clCreateKernelsInProgram?

    As for the specification, I believe it's saying that you will only get kernel objects for those kernels that are defined with the same name and signature for all devices in the context. If you haven't built the program for one of the two devices in the context, then it makes sense that you won't get any kernel objects.

    The error code that should be returned is CL_INVALID_PROGRAM_EXECUTABLE. Perhaps there's a small issue with the numeric-code-to-human-readable-string function.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    14

    Re: Nvidia bug in clCreateKernelsInProgram

    How did you get the human-readable error string "CL_INVALID_PROGRAM_DEFINITION"? What numeric error code do you get fro clCreateKernelsInProgram?
    Oops, sorry for the typo - the correct error-code that I get is "CL_INVALID_KERNEL_DEFINITION" (-47)

    If you haven't built the program for one of the two devices in the context, then it makes sense that you won't get any kernel objects.
    But I can get kernel objects using clCreateKernel, just not using clCreateKernelsInProgram.

    (in my case, I must use "clCreateKernelsInProgram" because I don't know the kernel-names: if I had a way to know, then indeed I could simply use "clCreateKernel" instead)

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Nvidia bug in clCreateKernelsInProgram

    Okay, that sounds like an honest bug. You would have better luck posting it in NVidia's support forums since I doubt we have any NVidia engineers lurking around here
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. Replies: 2
    Last Post: 11-09-2009, 07:00 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
  •