Open Perl99 opened 5 years ago
The build log is implemented in programs.hpp
as:
/// Returns the build log.
std::string build_log() const
{
return get_build_info<std::string>(CL_PROGRAM_BUILD_LOG, get_devices().front());
}
You can try to change this line to something like this
/// Returns the build log.
std::string build_log() const
{
std::string full_log;
for (auto& device : get_devices())
{
full_log = full_log +
device.name() +
'\n' +
get_build_info<std::string>(CL_PROGRAM_BUILD_LOG, device);
}
return full_log;
}
When you create a context with more than one device (like both Intel CPU and Intel GPU) and there is build error, the build_log() method only returns log for first device. It should do so for each device in the context.
In my case, build for the CPU was successful, but for the GPU had error. The build log only contained info about CPU.