“Compile Server Error.” while building OpenCL kernels

久未见 提交于 2019-12-24 03:44:07

问题


I am trying to compile OpenCL kernels on OS X. Everything is ok when there are just a few lines. However, after the code grows over 1.5k lines, clGetProgramBuildInfo with CL_PROGRAM_BUILD_LOG flag returned "Compile Server Error." every time. I googled but found nothing about it. Could anyone help me?


回答1:


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).

Please find the original answer by @James




回答2:


This unhelpful error message indicates that there is bug in Apple's compiler. You can inform them of such bugs by using the Apple Bug Reporting System.



来源:https://stackoverflow.com/questions/30000473/compile-server-error-while-building-opencl-kernels

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!