Using alternatives instead of a conflict for libopencl1?

Simon Richter sjr at debian.org
Mon Apr 22 12:49:16 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 22.04.2013 14:04, Vincent Danjean wrote:

> You will need two packages if you want to allow the (IMHO) most
> useful layout: a (free) ICD loader such as ocl-icd and lots of ICD
> (amd, nvidia, intel(s), pocl, ...)

Beignet does not provide an ICD loader -- just a single library that
can be used as either a standalone implementation or as an ICD.

> The ocl-icd loader allows to specify the ICD to use in a
> environment variable, without the need to write a file into
> /etc/OpenCL/vendors. It means that it is very useful to test
> development of ICDs without being root.

I am thinking of the "end user" and "embedded" scenarios.

> For what use case ? You can only have one libOpenCL.so.1 and it
> should be compatible with all ICDs (else, they are buggy).

That, or a standalone implementation. The expectation is that an
application can open libOpenCL.so.1 and get a working implementation.
If there is only one implementation, then going through an ICD loader
is not necessary.

> I hope you do not suggest that Beignet introduces an
> libOpenCL.so.1 that is an OpenCL implementation instead of a ICD
> loader? I would oppose this as this will break expectation of other
> applications: they depends on a ICD and it will not work because
> the installed libOpenCL.so.1 ignores the ICDs...

The ICD packages depend on an ICD loader, which would provide
libOpenCL.so.1 at a higher priority -- so unless the admin forced the
use of a specific OpenCL implementation, the end result will work.

Basically, I can see the following configurations:

1. Beignet as the sole implementation

This makes sense on embedded systems or if the admin knows that no
other GPUs are present. In this case, I think it makes sense to
install Beignet as libOpenCL.so.1.

2. Multiple different ICDs

This makes sense on typical user setups, where we want to install
support for as many different configurations as possible. Here, the
OCL-ICD loader takes over as libOpenCL.so.1, and Beignet is registered
through /etc/OpenCL/vendors.

We currently have the option of installing either AMD's or nVidias
implementation standalone as well, by using "amd-libopencl1" or
"nvidia-libopencl1", respectively, in which case the "Conflicts:
libopencl1" inhibits installation of ocl-icd-libopencl1.

I'd like to provide the same option to the Beignet users, but I think
the best idea to do so would be to provide libOpenCL-Intel.so.1 and a
symlink managed by the alternatives system to make the library
accessible as libOpenCL.so.1 if no other option is installed.

   Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAlF1McsACgkQ0sfeulffv7un6QP9H/O8Z13E9WEVelT4WkkuUFJe
2xZyW3NuqkbKb6y1H7YzBBzpg0yuEkPUo727bAxQyNuH8peoWQnxqOVC/LEKcsXt
GUOwJQRcJwG442G0BS9mFk87beZKcx+cuzIzkXKFGl7rRP+ccWV8X5a7Mtukr67R
OWTdvw763O5A8yaBkSE=
=STkV
-----END PGP SIGNATURE-----



More information about the pkg-nvidia-devel mailing list