Open-source libOpenCL.so

I’m part of a group of developers of open-source library for volume data processing. We’re using (amongs others) OpenCL for computations on GPUs. We’re using openSUSE’s Open Build Service (OBS) for creating packages for various Linux distributions. Our problem is that OpenCL drivers are proprietary and thus unavailable at OBS forcing us to omit OpenCL version of the library from building/packaging.

Upon inspecting the OpenCL drivers present at our systems (from AMD & nVidia) we observed, that libOpenCL.so library contains just code for localising of ICD files installed in the system and redirecting the requests to library with real implementation (it seems to do only and just this).

If this library (libOpenCL.so) was to be released as open-source, it would be possible to build and distribute OpenCL applications without need of any proprietary library or application. To execute the OpenCL application, some full-featured implementation of the OpenCL standard would be still necessary.

My question is, whether it would be possible to open-source your code (just this one library - libOpenCL.so)? I have already written to the AMD and they replied that libOpenCL.so is owned by Khronos.

We (the Open Grid Scheduler/Grid Engine http://gridscheduler.sourceforge.net/ project) were looking for the same thing, and we found that libOpenCL.so is based on the ICD Loader specification:

http://www.khronos.org/registry/cl/exte … hr_icd.txt

One can easily write an open source implementation of it, and in fact we found one at:

http://freeocl.googlecode.com

Misc:

  • not sure if you granxarixia have already found a solution, but at least others who wanted to do the same thing would benefit. (I was doing ldd, nm, nm -D, strings, gdb, etc… to find out what’s inside libOpenCL.so)

  • not that we think it is a big deal to link against any closed source libraries, but many Linux distributions don’t ship closed source libraries, and that’s why I was trying to roll my own!

Of possible interest, we are developing a backward compatible loader (libocl.so) that adds additional features such as allowing ocl.conf files to be more precise in system configuration (/etc/OpenCL/vendors/ remains as a fallback) and supporting OpenCL RPC. Code is part of the COPRTHR SDK. Open-source L/GPLv3 licensed. Current code is available now on our ‘current’ branch and will be in release version before end of year. https://github.com/browndeer/coprthr

Just a follow-on post - none of the third-party solutions (including ours) are a substitute for an open-source libOpenCL.so reference implementation. We should not have to guess at the call vector order for an open standard. Please release the official loader open-source for 2.0. Thanks.