- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to report compile errors for the kernels? cl::Program::build() simply returns CL_BUILD_PROGRAM_FAILURE which doesn't give any indication where the errors are.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get the build log by calling cl::Program::getInfo and passing the CL_PROGRAM_BUILD_LOG param. Have you tried that? Or you can use the KernelBuilder to verify if your kernel has any errors, if you are using the Intel OpenCL SDK.
Thanks,
Raghu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cl::Program::getBuildInfo was what I was looking for. Thanks!
[cpp]
result = program.build(devices,NULL,NULL,NULL);
std::string buildLog =
program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(devices[0]);
if(result != CL_SUCCESS)
{
printf("### Kernel compile log ###\n%s\n",buildLog.c_str());
exit(result);
}
[/cpp]
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page