[Pkg-opencl-devel] opencl-icd selection

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Fri Nov 14 11:41:58 UTC 2014


On Thu, Nov 13, 2014 at 11:48 PM, Rebecca N. Palmer
<rebecca_palmer at zoho.com> wrote:
>> Would it be possible to specify the dependencies in such a
>> way that GPU-related ICDs are installed only if the corresponding mesa
>> packages are already installed (or would be otherwise installed anyway
>> in this run)?
>
> No, and it would be mostly pointless anyway as the video drivers also
> default to installing them all (
> https://packages.debian.org/sid/xserver-xorg ): if a user cares enough about
> saving space/bandwidth to manually pick one video driver, they can also
> manually pick one ICD, which will then satisfy dependencies on opencl-icd
> because of the Provides: (
> https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual ).

Good point. So, for whatever, it's worth, I'm ok with installing all
(free) ICDs by default, with the Provides: mechanism to allow finer
manual selection.

>> I think that just extending ocl-icd to have a smarter default context
>> selection (and possibly ICD ordering) would fix it. My idea is the
>> following:
>
> The applications I checked weren't passing NULL platform (probably because,
> as you note, this doesn't work on all ICD loaders): they were either
> explicitly picking the first platform, or treating any error (including
> CL_DEVICE_NOT_FOUND) when iterating over platforms as fatal.  Hence, it's
> the platform order that most needs changing.

Agreed.

>> We should probably discuss this with the ocl-icd authors too.
>
> ocl-icd's maintainer is Vincent Danjean, who has previously agreed in
> principle that this is a good idea:
> http://lists.alioth.debian.org/pipermail/pkg-opencl-devel/Week-of-Mon-20140203/000079.html

I'll try to find the time to work on a proof of concept patch for the
proposal, but I think the discussion for that would best be done on
the ocl-icd ML

>> Ideally, it would be nice if mesa-opencl-icd included support for CPU
>> devices as well (or does it, and I didn't know about it?)
>
> It's nominally on their todo list (
> http://dri.freedesktop.org/wiki/GalliumCompute/ ), as is an open-source
> replacement for nvidia-opencl-icd, but I don't know if anyone is actively
> working on either.

I wonder if it would be possible to integrate GalliumCompute with pocl
somehow, to make things easier. The only key point would probably be
the buffer sharing for the mixed contexts.

-- 
Giuseppe "Oblomov" Bilotta



More information about the Pkg-opencl-devel mailing list