Build error -11, but no code output for bug hints

Ok, so NVIDIA GeForce GT 730M with 470.182.03 NVIDIA drivers on Linux.

Until you know what’s causing this, I wouldn’t assume that.

  • From CL/cl.h:
    #define CL_BUILD_PROGRAM_FAILURE                    -11
    
  • OpenCL 3.0 API Spec

Have you searched for other posts where folks are getting this?

Also potentially useful:

Sounds like CL_BUILD_PROGRAM_FAILURE is roughly the equivalent of an internal compiler error. This might be instigated by your kernel source being incorrect.

Some things to check:

  • Update to the latest graphics drivers (from the NVIDIA download site, looks like you’ve got the latest for that GeForce GT 730)
  • Independently verify that the CL kernel source you’re providing is valid (use another compiler that’ll give you better syntax error reporting).
  • Check to verify that you’re not using any features in your kernel that are unsupported by your GPU+drivers.
  • “Try commenting the code of the kernel and seeing if compile. If it happens, there is a kernel code error, with CL_PROGRAM_BUILD_STATUS flag in clGetProgramBuildInfo you can check where is the problem.” (from @santtt)
  • Post your kernel source. Someone here might be able to spot the error that your OpenCL compiler can’t.