I get segfault on cpu device when I use clCreateProgramWithBinary with "enqueue_kernel" of opencl 2.0
Here is simple example - https://github.com/OmegaDoom/clCreateProgramWithBinary-segfault
If we change device to gpu then no segfault.
I have latest graphics driver - win64_22.214.171.12423
Intel® Core™ i7-7820HQ CPU @ 2.90GHz
Thanks for such an insightful issue report.
Which cpu implementation/device name/platform are you using?
Can you try Intel® CPU Runtime for OpenCL™ Applications 18.1 to use the CPU device? It debuted last week. At this point, any related changes would go into this implementation. This implementation replaces experimental cpu implementations included with the SDK and the 16.1.2 release.
See the Linux* OS and Windows* OS CPU downloads on this page: https://software.intel.com/en-us/articles/opencl-drivers
The problem still exists on driver 126.96.36.19926 (although it's good that qt is working now:)).
I wasn't precise. clCreateProgramWithBinary itself doesn't segfault. It's clEnqueueReadBuffer that throws but only with combination of clCreateProgramWithBinary.
I'm using first suitable intel platform - Intel(R) OpenCL and device - OpenCL 2.1 (Build 716)
Thank you Michael.
This problem arose when I tried to use pyopencl. By default it cashes kernels with clCreateProgramWithBinary similar to my example. it's possible to turn it off but better to fix this bug.