[Pkg-opencl-devel] OpenCL and multiarch

Andreas Beckmann anbe at debian.org
Tue Feb 24 13:00:48 UTC 2015


On 2015-02-24 08:32, Graham Inggs wrote:
> On 19 February 2015 at 01:00, Simon Richter <sjr at debian.org> wrote:
>> I've asked this about a year or two ago already, but dropped the ball.
>> How should we deal with ICDs in a multiarch system, especially with a
>> system like wine, which pulls in both i386 and amd64 ICD loaders?

>> with paths pointing to multiarch locations, which allows for
>> co-installable packages, but requires the ICD loader to properly handle
>> the error from attempting to load libraries for the wrong architecture.

which dlopen() should do automatically

> On my (Ubuntu) system, all I have in /etc/OpenCL is a directory named
> vendors containing a text file, nvidia.icd (installed by
> nvidia-opencl-icd-331), containing:
> libnvidia-opencl.so.1

Yes, that works well here. dlopen() silently skips over libraries for
"wrong" architectures.

AMD solved it differently, their library is named libamdocl{32,64}.so
(and placed in /usr/lib/<triplet>, too) and their icd file
amdocl{32,64}.icd accordingly.

It's only problematic for icds that don't live in /usr/lib/<triplet>,
because they need to use full paths in their icd file. Perhaps we should
them to /usr/lib/<triplet>. Or would an ICD file with
${ORIGIN}/bar-icd/libfoo-icd.so.42 work? (IIRC ${ORIGIN} should resolve
to the location of libOpenCL.so.1).

Andreas



More information about the Pkg-opencl-devel mailing list