Difference between revisions of "GPGPU"

From ArchWiki
Jump to: navigation, search
(Changing structure for better clarity)
Line 14: Line 14:
 
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br>
 
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br>
  
==Installation==
+
 
===OpenCL===
+
==OpenCL==
 +
 
 +
===Overview===
 
A distribution of the OpenCL framework generally constists of:
 
A distribution of the OpenCL framework generally constists of:
 
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])
 
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])
Line 26: Line 28:
 
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.
 
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.
  
====The OpenCL ICD model====
+
===The OpenCL ICD model===
 
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.
 
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.
 
In practice, this is implemented using the Installable Client Driver (ICD) model.
 
In practice, this is implemented using the Installable Client Driver (ICD) model.
Line 40: Line 42:
 
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended.  Both libcl and libopencl should still work with all the implementations.
 
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended.  Both libcl and libopencl should still work with all the implementations.
  
===CUDA===
+
===Implementations===
{{Expansion}}
+
 
+
==Implementations==
+
 
To see which OpenCL imeplentations are currently active on your system, use the following command:
 
To see which OpenCL imeplentations are currently active on your system, use the following command:
 
{{Cli|$ ls /etc/OpenCL/vendors}}
 
{{Cli|$ ls /etc/OpenCL/vendors}}
  
===Nvidia===
+
====Nvidia====
 
{{Expansion}}
 
{{Expansion}}
  
===AMD===
+
====AMD====
 
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.
 
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.
  
Line 60: Line 59:
 
Code is compiled using {{Package Official|llvm}} (dependency).
 
Code is compiled using {{Package Official|llvm}} (dependency).
  
===Intel===
+
====Intel====
 
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK],  
 
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK],  
 
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.
 
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.
  
==Developement==
+
===Developement===
 
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.
 
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.
 +
 +
 +
==CUDA==
 +
{{Expansion}}
 +
  
 
==Links and references==
 
==Links and references==

Revision as of 02:41, 9 August 2011

Note: This article is a non-public work in progress as of yet



Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

GPGPU stands for General-purpose computing on graphics processing units. In Linux, there are currently two major GPGPU frameworks: OpenCL and CUDA


OpenCL

Overview

A distribution of the OpenCL framework generally constists of:

  • Library's shared object (libOpenCL.so, for detailed information see bellow)
  • One or more vendor-specific OpenCL implementation packages
  • Device drivers

For the OpenCL shared object, installing Template:Package Official should do in general case:

# pacman -S libcl

See Implementations on how to install implementation and device driver packages.

The OpenCL ICD model

OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time. In practice, this is implemented using the Installable Client Driver (ICD) model. The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object). Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.

Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:

  • extra/Template:Package Official by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.
  • unsupported/Template:Package AUR by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.
Note: ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably
(as long as they are implemented correctly)

For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.

Implementations

To see which OpenCL imeplentations are currently active on your system, use the following command: Template:Cli

Nvidia

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:GPGPU#)

AMD

OpenCL implementation from AMD is known as AMD APP SDK, formerly also known as AMD Stream SDK or ATi Stream.

For Arch Linux, AMD APP SDK is currently available in AUR as Template:Package AUR. This package is installed as Template:Filename and apart from SDK files it also contains a profiler (Template:Filename) and a number of code samples (Template:Filename). It also provides the Template:Filename utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.

As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the Template:Package AUR package (an optional dependency), the open-source driver (Template:Package Official) does not support OpenCL.

Code is compiled using Template:Package Official (dependency).

Intel

The Intel implementation, named simply Intel OpenCL SDK, provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: Template:Package AUR.

Developement

For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the Template:Package Official package is needed. Link your code against libOpenCL.


CUDA

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:GPGPU#)


Links and references