Differences between revisions 13 and 14
Revision 13 as of 2012-02-06 10:08:53
Size: 3662
Comment: Some clarification OpenCL/Stream/APP and binaries in the text (I think).
Revision 14 as of 2012-02-06 10:38:00
Size: 3916
Comment: added instructions for multiarch
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
technology in the dpkg package of the experimental section. technology in the dpkg package of the experimental section. So, for running 32bit OpenCL libraries
on a 64bit platform, do {{{
sudo apt-get install multiarch-support
sudo apt-get install -t experimental dpkg
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install amd-libopencl1:i386
}}}

Translation(s): English - Français - Italiano


ATI Stream is the OpenCL library for AMD/ATI graphics cards. It is now marketed as APP (accelerated parallel processing) [1, 2]. This uses the GPU of your graphics card to perform highly parallel computations. The OpenCL code to address that hardware is however functional also without the right hardware and also development is possible, say, on a many years old laptop with Intel graphics.

Installation

The AMD SDK is non-free. amd64 and i386 binaries are provided directly from upstream, which can be installed tediously but easily. The libraries to execute the OpenCL binaries are now (i.e. since version 11.11 of Catalyst / fglrx) distributed also with the vendor's regular graphics cards' driver. Debian offers all of AMD's driver in its typical manner a series of packages, separated for its technology. The APP/Stream library ships as amd-libopencl1. So, for getting OpenCL to run for your machine, a mere

apt-get install amd-libopencl1

should get you going. For the full accelerated experience, one just needs to also install the non-free fglrx driver, asdescribed on this Wiki's ATIProprietary page.

For earlier releases of fglrx, some good soul named 'nou' once prepared external Debian packages called amd-app to provide the AMD Stream libraries and their API [3]. Those had an edge in that they install both 32 and 64 bit libraries, while the Debian's amd-libopencl1 only does the library of the respective platform. This advantage has now gone away with the arrival of multi-arch technology in the dpkg package of the experimental section. So, for running 32bit OpenCL libraries on a 64bit platform, do

sudo apt-get install multiarch-support
sudo apt-get install -t experimental dpkg
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install amd-libopencl1:i386

Some additional life-time-saving bits are found in the unofficial Wiki for AMD Linux drivers [4].

Development

When developing your own OpenCL applications, the former external amd-app packages [2] had their own -dev package. This is not required for the Debian packages. Here you can share the package opencl-headers with the prior mentioned libraries. No separate -dev needed. It is a standard after all.

Caveats

The current OpenCL libraries are 64bit for the 64bit platform amd64 and 32bit for the 32bit platform i386. This is in preparation of the "real soon now" expected cross-platformness of Debian, which will allow the direct installation of the i386's binary on amd64. When you do this now, just add --force-architecture to dpkg when installing a manual download of the .deb, the 64bit driver will be removed, which is not what you want. The amd-app package gets you all in one go, a temporary advantage as we all hope.

When contributing to BOINC

When running BOINC [5] (or any external binary) with your exciting hardware, and if it is only for testing the setup, please know that e.g. the Primegrid project gives you a true 64bit OpenCL binary. Albert is 32bit and consequently will fail on amd64 with Debian's 64bit library. You can test the platform by executing ldd /var/lib/boinc/project/projectname/binary name, which should find the OpenCL binary.

References