Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create packages for OpenCL headers #44

Open
psyhtest opened this issue Sep 6, 2017 · 4 comments
Open

Create packages for OpenCL headers #44

psyhtest opened this issue Sep 6, 2017 · 4 comments

Comments

@psyhtest
Copy link
Contributor

psyhtest commented Sep 6, 2017

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.

@gfursin
Copy link
Member

gfursin commented Sep 26, 2017

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!

@gfursin
Copy link
Member

gfursin commented Mar 21, 2018

We saw the need for such package here: dividiti/ck-caffe#137 (comment) . Should check it again at some point ...

@psyhtest
Copy link
Contributor Author

We should assign this task to an enthusiastic newbie, as I've hit this issue once again :)

@psyhtest
Copy link
Contributor Author

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants