[arch-general] The OpenCL ICD problem

Nicolas Bigaouette nbigaouette at gmail.com
Fri Jul 8 15:11:20 EDT 2011


>
> @Nicolas:
>  You pointed out that the nVidia ICD loader (libOpenCL.so) is only
> 1.0 (outdated),
> that is correct, but the ICD specs only require 1.0, so 1.1 possibly
> should not be needed.
> See specs:
> http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt
>
I think it requires 1.0 to provide, well, 1.0... Version 1.1 adds many
things. For example, there is no type3 (float3, int3, etc.) in 1.0, just in
1.1. So if your code uses float3, then you'll probably get some undefined
symbols when linking to a 1.0 libOpenCL.so. This is a guess though. If this
is true, then using nvidia's loader would prevent any 1.1 implementation
from being compiled/loaded. Not good.

As for the library I wrote, I think I will release it, probably GPL3. Bear
in mind that it was written to abstract the OpenCL initialization out of my
other programs. In that sense, it might still contain some details specific
to my projets. For example, it uses "std_cout" instead of "std::cout", which
allows logging to a file every printed statement. I might add an #ifndef
std_cout #define std_cout std::cout #endif, I think that should fix this.
Also, the makefile are really targetted toward scientific simulations. But
since it's only two files (one .hpp and one .cpp) it should be trivial to
write a makefile...

I think a package providing a libOpenCL.so and all others depending on it is
the way to go too. About the name, I don't really care, as long as it's
consistant. libcl is weird though, as the library is not "cl" but
"opencl"...

Also kralyk , regarding the intel ocl package, I think we should install it
in /opt/intel/opencl-sdk, not /opt/intel-opencl-sdk. The reason is that
other intel's product are installed in /opt/intel. For example, the compiler
goes into /opt/intel/composerxe-<version>. Putting all intel product into
its own folder make sense I think... At least it's consistant.

N


More information about the arch-general mailing list