clBuildProgram failed with error code -11 and without build log

前端 未结 4 2048
忘了有多久
忘了有多久 2021-01-12 08:31

I have worked little bit in OpenCL now but recently \"clBuildProgram\" failed in one of my program. My code excerpt is below:

cl_program program;
program = c         


        
4条回答
  •  余生分开走
    2021-01-12 08:59

    You can learn the meaning of OpenCL error codes by searching in cl.h. In this case, -11 is just what you'd expect, CL_BUILD_PROGRAM_FAILURE. It's certainly curious that the build log is empty. Two questions:

    1.) What is the return value from clGetProgramBuildInfo?

    2.) What platform are you on? If you are using Apple's OpenCL implementation, you could try setting CL_LOG_ERRORS=stdout in your environment. For example, from Terminal:

    $ CL_LOG_ERRORS=stdout ./myprog

    It's also pretty easy to set this in Xcode (Edit Scheme -> Arguments -> Environment Variables).

提交回复
热议问题