Create packages for OpenCL headers
On some OpenCL platforms, no OpenCL headers are installed, even when a driver is available (e.g. libOpenCL.so). The headers can be fetched e.g. as follows:
# mkdir /usr/include/CL
# cd /usr/include/CL
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/opencl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/cl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/cl_platform.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/cl_ext.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/cl_gl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/opencl12/CL/cl_gl_ext.h
# wget https://github.com/KhronosGroup/OpenCL-CLHPP/releases/download/v2.0.10/cl2.hpp
What's worse, building a package using OpenCL may fail due to missing headers half way or further down the build. This wastes time.
CK should detect the driver version and download the appropriate headers when none are found.
I had an old package to download such headers. I attached it. ckr-ck-old-packages.zip I suggest to create several packages (that can work on Linux, Windows, Android and MacOS using universal downloader) for OpenCL 1.1,1.2,2.0 and any others - we can then provide dependency on a specific version in other packages - help is appreciated!
We saw the need for such package here: https://github.com/dividiti/ck-caffe/issues/137#issuecomment-374845305 . Should check it again at some point ...
We should assign this task to an enthusiastic newbie, as I've hit this issue once again :)
# mkdir /usr/include/CL
# cd /usr/include/CL
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/opencl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/cl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/cl_platform.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/cl_ext.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/cl_gl.h
# wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/master/CL/cl_gl_ext.h
# wget https://github.com/KhronosGroup/OpenCL-CLHPP/releases/download/v2.0.10/cl2.hpp
root@diviniti:/usr/include/CL# ls -la
total 508
drwxr-xr-x 2 root root 4096 Sep 21 12:21 .
drwxr-xr-x 43 root root 4096 Sep 21 12:19 ..
-rw-r--r-- 1 root root 299999 May 23 2017 cl2.hpp
-rw-r--r-- 1 root root 30788 Sep 21 12:21 cl_ext.h
-rw-r--r-- 1 root root 2869 Sep 21 12:21 cl_gl_ext.h
-rw-r--r-- 1 root root 7672 Sep 21 12:21 cl_gl.h
-rw-r--r-- 1 root root 78817 Sep 21 12:21 cl.h
-rw-r--r-- 1 root root 47062 Sep 21 12:21 cl_platform.h
-rw-r--r-- 1 root root 1993 Sep 21 12:19 opencl.h