Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] virtual/opencl: new version
Date: Sun, 05 Apr 2020 05:45:03
Message-Id: f53957ed03adc773733069d1323b680c1fe3cd3f.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] virtual/opencl: new version by Marek Szuba
1 On Sat, 2020-04-04 at 22:59 +0100, Marek Szuba wrote:
2 > Instead of pulling in various OpenCL runtimes, only depend on
3 > eselect-opencl and an OpenCL ICD loader (dev-libs/ocl-icd) in order
4 > to provide hardware-independent header files and libraries for
5 > OpenCL-aware software to build against. Actual runtimes are now simply
6 > suggested to the user via a postinst message.
7 >
8 > Signed-off-by: Marek Szuba <marecki@g.o>
9 > ---
10 > virtual/opencl/opencl-3.ebuild | 31 +++++++++++++++++++++++++++++++
11 > 1 file changed, 31 insertions(+)
12 > create mode 100644 virtual/opencl/opencl-3.ebuild
13 >
14 > diff --git a/virtual/opencl/opencl-3.ebuild b/virtual/opencl/opencl-3.ebuild
15 > new file mode 100644
16 > index 00000000000..9851d1ccbeb
17 > --- /dev/null
18 > +++ b/virtual/opencl/opencl-3.ebuild
19 > @@ -0,0 +1,31 @@
20 > +# Copyright 1999-2020 Gentoo Authors
21 > +# Distributed under the terms of the GNU General Public License v2
22 > +
23 > +EAPI=6
24
25 Is there really a good reason to use an old EAPI here?
26
27 > +
28 > +inherit multilib-build
29 > +
30 > +DESCRIPTION="Virtual for OpenCL API"
31 > +SLOT="0"
32 > +KEYWORDS="~amd64 ~x86"
33 > +
34 > +RDEPEND="app-eselect/eselect-opencl
35 > + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]"
36
37 Wouldn't it make sense to remove the virtual and just have stuff depend
38 on that instead?
39
40 > +
41 > +pkg_postinst() {
42 > + elog
43 > + elog "In order to take advantage of OpenCL you will need a runtime for your hardware."
44 > + elog "Currently included in Gentoo are:"
45 > + elog
46 > + elog " dev-libs/intel-neo - integrated Intel GPUs from Broadwell onwards. Open. 64-bit only"
47 > + elog " dev-libs/rocm-opencl-runtime - AMD GPUs supported by the amdgpu kernel driver. Mostly open [1]. 64-bit only"
48 > + elog " media-libs/mesa[opencl] - some older AMD GPUs; see [2]. Open. 32-bit support"
49 > + elog " dev-libs/amdgpu-pro-opencl - AMD Polaris GPUs. Proprietary, provided as-is. 32-bit support"
50 > + elog " dev-util/intel-ocl-sdk - Intel CPUs. Proprietary. 64-bit only"
51 > + elog " x11-drivers/nvidia-drivers[uvm] - Nvidia GPUs; specific package versions required for older ones [3]. Proprietary. 32-bit support"
52 > + elog
53 > + elog " [1] Proprietary library from dev-libs/hsa-ext-rocr required for image support"
54 > + elog " [2] https://dri.freedesktop.org/wiki/GalliumCompute/"
55 > + elog " [3] https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/"
56 > + elog
57 > +}
58
59 This looks like README.gentoo material.
60
61 --
62 Best regards,
63 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [PATCH] virtual/opencl: new version Marek Szuba <marecki@g.o>