Bug#695883: nvidia improper OpenCL dependencies

Vincent Danjean vdanjean.ml at free.fr
Thu Jan 24 08:19:01 UTC 2013

Le 24/01/2013 03:33, Bob Bib a écrit :
> Sun, 20 Jan 2013, 13:58 +01:00 from Vincent Danjean:
>> Bob, OpenCL implementation are API but also ABI compatible.
>> Why do you insist (695883, 695884, 698520) that each package from
>> each implementation prefers its own other packages? What is the
>> problem you are trying to solve?
>> In any case, all libopencl1 implementation are really similar. The
>> main difference I can see is that ocl-icd-libopencl1 is free.
> It's doubtful that a free "ocl-icd-libopencl1" package
> can improve the "freeness" of a package which is already in "non-free".
> I'm not sure all these OpenCL implementation are 100% compatible
> (more to say, they rely on different hardware driver backends),
> therefore I suggest to use the native package library version.

I think you should look more closely at the difference between
the OpenCL ICD *Loaders* and the OpenCL ICD *drivers*.

Loaders can be exchanged at any time and do not depends on any
specific backend or hardware. All vendors and ocl-icd provide
one. All of them can be used with any OpenCL ICD drivers.

You insist on installing by default the loader created by the
vendor of the driver you want. I do not see the interest of
doing so. In my opinion, if we push for a specific implementation
by default, it would be better to push the free one
(ocl-icd-libopencl1) in any cases.

> Well, the current package is already hardware-specific,

The driver, yes. The loader, not at all.

> then why it shouldn't suggest its own opencl-icd implementation?

Because there is no reason to do so?

> BTW, I do agree the current issue is not major and can be simply
> worked around by specifying the complete list of necessary packages:
> # apt-get install nvidia-opencl-icd nvidia-libopencl1
> but it's good when the dependencies are resolved automatically :)

I would do on my machines:
apt-get install nvidia-opencl-icd ocl-icd-libopencl1
and that must always be possible because this is working.
  It means that we can adjust the default package installed
but nothing more. If you want nvidia-libopencl1, you will
always have to indicate explicitly to "apt-get install".
You cannot rely on the dependencies because it is a feature
of OpenCL to have loaders that can load *any* drivers.

> Sun, 20 Jan 2013, 14:03 +01:00 from Vincent Danjean:
>>   If nvidia-libopencl1 does not work with any of the packages providing
>> opencl-icd, then yes, there is a bug. It is the case? Do you experiment
>> a bug when running your program?
> Yes, exactly, with "amd-opencl-icd" instead of "nvidia-opencl-icd"
> (on NVIDIA hardware)
> the program exits with an error:
> clGetDeviceIDs() returns CL_DEVICE_NOT_FOUND.

Here, you are talking about the ICD drivers. They are hardware
Loaders are not.
Only one loader can be installed at any time on a system.
Any number of drivers can be co-installed at any time on a system.

> $ apt-file -F show nvidia-opencl-icd
> $ apt-file -F show amd-opencl-icd

There are drivers. They are hardware specific and can be co-installed.
They require one loader. Any loader whould work (unless bugs).


Vincent Danjean          Adresse: Laboratoire d'Informatique de Grenoble
Téléphone:  +33 4 76 61 20 11            ENSIMAG - antenne de Montbonnot
Fax:        +33 4 76 61 20 99            ZIRST 51, avenue Jean Kuntzmann
Email: Vincent.Danjean at imag.fr           38330 Montbonnot Saint Martin

More information about the pkg-nvidia-devel mailing list