Bug#695883: nvidia improper OpenCL dependencies

Bob Bib bobbibmpn at mail.ru
Thu Jan 24 02:33:55 UTC 2013

Sun, 20 Jan 2013, 13:58 +01:00 from Vincent Danjean:
> OpenCL implementations are API and ABI compatible
> > Well, I've found one more minor dependencies defect:
> > 'nvidia-opencl-icd' depends just on 'libopencl1' virtual package
> > (provided by 'amd-libopencl1', 'nvidia-libopencl1' and
> 'ocl-icd-libopencl1').
> >
> > Thus, I suggest replacing:
> >
> > Depends: libopencl1
> >
> > with
> >
> > Depends: nvidia-libopencl1 | libopencl1
> Why to you want to propose this modification?
> 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.

It's also inspired by "nvidia-opencl-dev":
Depends: nvidia-libopencl1 | libopencl1

> And, to select a good opencl-icd, this have nothing to do with
> package (pre)choices, but only with the hardware available on
> the machine (and apt/dpkg cannot take decisions based on the
> current hardware to my knowledge)

Well, the current package is already hardware-specific,
then why it shouldn't suggest its own opencl-icd implementation?

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 :)

Sun, 20 Jan 2013, 14:03 +01:00 from Vincent Danjean:
> mixing nvidia and amd
> > # apt-get install nvidia-libopencl1
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > The following extra packages will be installed:
> >   amd-opencl-icd
> > Recommended packages:
> >   opencl-icd nvidia-opencl-icd
> > The following NEW packages will be installed:
> >   amd-opencl-icd nvidia-libopencl1
>   Yes, and ?
>   I fail to see the problem here.
>   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.

No wonder AMD OpenCL driver refuses to work with NVIDIA GPU drivers.
BTW, each of those packages have some specific files inside:

$ apt-file -F show nvidia-opencl-icd
nvidia-opencl-icd: /usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1
nvidia-opencl-icd: /usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.304.64
nvidia-opencl-icd: /usr/share/bug/nvidia-opencl-icd/control
nvidia-opencl-icd: /usr/share/bug/nvidia-opencl-icd/script
nvidia-opencl-icd: /usr/share/doc/nvidia-opencl-icd/changelog.Debian.gz
nvidia-opencl-icd: /usr/share/doc/nvidia-opencl-icd/changelog.gz
nvidia-opencl-icd: /usr/share/doc/nvidia-opencl-icd/copyright
nvidia-opencl-icd: /usr/share/lintian/overrides/nvidia-opencl-icd

$ apt-file -F show amd-opencl-icd
amd-opencl-icd: /etc/OpenCL/vendors/amdocl64.icd
amd-opencl-icd: /usr/lib/x86_64-linux-gnu/libSlotMaximizerAg.so
amd-opencl-icd: /usr/lib/x86_64-linux-gnu/libSlotMaximizerBe.so
amd-opencl-icd: /usr/lib/x86_64-linux-gnu/libamdocl64.so
amd-opencl-icd: /usr/share/bug/amd-opencl-icd
amd-opencl-icd: /usr/share/doc/amd-opencl-icd/changelog.Debian.gz
amd-opencl-icd: /usr/share/doc/amd-opencl-icd/copyright
amd-opencl-icd: /usr/share/lintian/overrides/amd-opencl-icd

More information about the pkg-nvidia-devel mailing list