[arch-dev-public] Opencl/Cuda headers
stephane at archlinux.org
Sat Oct 30 00:45:58 EDT 2010
Since version 260.19.12, upstream developers of nvidia-utils dropped C headers
for OpenCL and Cuda. After a discussion with Ionuț on IRC, we agreed that it
would be good to ask other developers on the best way to provide these
For those unfamiliar with these programming languages/libraries, there are
part of the so-called GPGPU technologies (General-Purpose Processing on
Graphical Processing Unit), where the primary objective is to perform any type
of parallel computing on graphics processors. For example, I am using OpenCL
in a personal programming project to speed up a partial differential equation
solver. OpenCL is an open standard that has been recently (May 2009) ratified
by The Khronos Group. C for Cuda is a similar proprietary solutions from
Nvidia. Nvidia-utils contains the dynamic libraries for both OpenCL and Cuda.
Other vendors, like AMD and Intel, provide or will provide soon an
implementation of OpenCL for their GPUs.
To get a satisfactory OpenCL developement environment, it could be as simple
as creating a new package that provide the header files. These headers can be
either downloaded from The Khronos Group (like this ) or extracted from
the Nividia toolkit.
However, for Cuda, it might be a little more complicated because it must use a
compiler provided by nvidia (nvcc). A solution may be to create a package for
the Cuda Toolkit. The main disadvantage of this solution is the addition of
proprietary software for which we can only provide limited support in case of
bugs or incompatibility with other updates. According to the maintainer of the
Cuda package in AUR , Cuda requires gcc version 4.4 (it is broken with
version 4.5) and sometimes releases depend on beta drivers. I think it is
probably better to wait until these dependency problems are fixed before
thinking about inclusion in [extra] or [community].
My suggestion would be to package only OpenCL headers (Khronos version) and
eventually discuss addition of Cuda if it becomes easier to maintain in a
rolling release distribution. The new "khronos-opencl-headers" package could
be added as optional dependencies for nvidia-utils which will also include a
"provides=('libCL')". I tested this solution on several codes and it works
well. It also seems that Debian is going to do something very similar.
So what do other people think about this problem ?
 Personnal communication
 cf. FS#20558
More information about the arch-dev-public