[Pkg-opencl-devel] pocl ITP, and opencl-icd selection

Rebecca N. Palmer r.palmer at bham.ac.uk
Wed Apr 30 10:26:26 UTC 2014


> I've subscribed to [pkg-opencl-devel] mailing list;
As have I.

Is the Alioth python-pyopencl git head (commit 
82540072d0917430eff3cb01234c9576e036d8c1, 7 days old) the package you 
plan to upload?

>> Currently, OpenCL-using applications Depend: on opencl-icd, which means
>> "whichever ICD apt happens to pick, often not one that actually works on
>> that hardware".
>> I suggested earlier [0] that we solve this problem (at least for the
>> ~40% of users whose hardware has a free ICD [1]) by making it instead
>> mean "all ICDs unless the user explicitly chooses one", similar to the
>> video drivers:
>>
>
> I'm not sure whether I understand your proposal.
> Are those mutually excluding options from which we should choose one,
> or are those steps to make while changing all packages related
> to OpenCL?
Whether Depends: opencl-icd means "a random one" or "all of them" is an 
either/or, but only involves changing opencl-icd: either we add my 
opencl-icd metapackage or we don't.

The suggested change to applications is "require them to work when only 
some of the installed ICDs are usable" (in your case, the patch you've 
already added is a partial fix, #745456 has the rest); this can be 
useful even without the above opencl-icd change (if a user installs an 
OpenCL application, finds that it doesn't work because it picked the 
wrong ICD, and installs the correct ICD, this won't remove the wrong 
one), but will become more important with it.

If my scheme is accepted, I hence propose to file patches for the 
applications before adding the metapackage.

>> #application/library that needs OpenCL
>> #do *not* depend on any specific ICD (i.e. #739176 is not a bug), as
>> doing so prevents automatic installation of the others
>> python-pyopencl Depends: libopencl1, opencl-icd
(python[3]-pyopencl currently Depends:
sid (2013.2-1): explicit ocl-icd-libopencl1 | libopencl1, opencl-icd; 
added by the build process libopencl-1.1-1, libopencl-1.2-1
Alioth git head: ocl-icd-libopencl1 | libopencl1, mesa-opencl-icd | 
beignet | opencl-icd )

> I've added dependency on specific libopencl1
That's unrelated to my proposal; it now appears to be unnecessary 
(linking against ocl-icd-libopencl1 now automatically adds a Depends: 
libopencl-1.2-1, fixing the "can pick a 1.1 libopencl1 it won't work 
with" problem), but is harmless.

> As for ICD dependency - there is a risk that wrong ICD gets
> picked, and e.g. causes installation of full NVIDIA stack on AMD
> machine, so your initiative is important here.
Please go back to Depends: opencl-icd without explicit alternatives; 
changing opencl-icd can't do anything if applications bypass that mechanism.

>> #new metapackage, and also still the virtual package
>> #list the CPU implementation first, so --no-install-recommends picks it
>> opencl-icd Depends: pocl-opencl-icd | beignet | mesa-opencl-icd
>> Recommends: pocl-opencl-icd, beignet, mesa-opencl-icd
>
> So this new package should both depend on and recommend all ICDs?
The Depends is OR, the Recommends is AND: the intention is that the 
default is all of them (so OpenCL just works) but that users can still 
choose one if they are short of space.



More information about the Pkg-opencl-devel mailing list