[arch-general] The OpenCL ICD problem

Nicolas Bigaouette nbigaouette at gmail.com
Thu Jul 7 10:46:06 EDT 2011


I've found somebody who tried to implement his own ICD loader:
https://github.com/Max-E/libclicd
It was not updated for many months, and may be missing a lot of feature.

It might be easier to create a package that just provides
/usr/lib/libOpenCL.so taken from one of the different implementation. I
suggest taking one that supports OpenCL 1.1. I think nvidia support only
1.0, while intel and amd support 1.1.

As it looks, /usr/lib/libOpenCL.so does not provide much: it's just a
wrapper (the ICD Loader). Intel's is 27 kB while AMD's and nvidia's are 21
kB each.

Here's each one's ldd:
# AMD
$ ldd
/opt/amdstream/lib/x86_64/libOpenCL.so.1

        linux-vdso.so.1 =>  (0x00007fffab8e7000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa4b6d4b000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007fa4b6b47000)
        libc.so.6 => /lib/libc.so.6 (0x00007fa4b67e5000)
        /lib/ld-linux-x86-64.so.2 (0x00007fa4b71af000)
# Nvidia (on Gentoo)
ldd /usr/lib64/libOpenCL.so.1.0.0
        linux-vdso.so.1 =>  (0x00007fffa25ff000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f68d4981000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f68d477c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f68d4416000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f68d4dcf000)
# Intel
ldd
/opt/intel/opencl-sdk/usr/lib64/libOpenCL.so

        linux-vdso.so.1 =>  (0x00007fff991ff000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f198f4b9000)
        libnuma.so.1 => /usr/lib/libnuma.so.1 (0x00007f198f2b1000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f198efa6000)
        libm.so.6 => /lib/libm.so.6 (0x00007f198ed24000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f198eb0e000)
        libc.so.6 => /lib/libc.so.6 (0x00007f198e7ac000)
        /lib/ld-linux-x86-64.so.2 (0x00007f198f906000)

On the license side, Intel is not clear. There is an EULA here:
http://software.intel.com/en-us/articles/opencl-sdk-EULA/ but it does not
say anything about OpenCL... It seems to be a generic EULA from Intel's
compiler. But there is an llvm licence file in the package
(llvm_release_license.txt). Their compiler is probably based on it. But
that's not the wrapper.

AMD has a license in /opt/amdstream/docs/opencl/LICENSES but I did not had
the courage to read it. Section 2 b) seems to talk about "you may not [...]
modify, network, rent, lend, loan, distribute or create derivative works
based upon the Software in whole or in part;" What's is forbidden? Modify or
distribute the package or modify/distribute a derivative work? I'm just
lost.

I can't find a license for nvidia, but it's probably as cryptic...

I think it's a good idea to have an ICD wrapper. Actually I need that for
myself.

> Therefore, a sollution might be to simply pick one of available ICD
> > loaders (a thin one preferably) and make it a dependency for other
> > pkgs.
>
> We only have one in our repos so there's nothing to do as far as I can
> tell.
>
> In case I misunderstood something, please clarify.
>
 There might be just one right now, but OpenCL standard says many different
implementation should be able to install side by side, and the choice
between them is taken by the ICD loader.


More information about the arch-general mailing list