26 November 2011

OpenCL in Windows


OpenCL support is provided by the Graphics Driver you are using. Most Nvidia drivers these days come with OpenCL support and they even provide their SDKs for OpenCL. For Nvidia, you'll have to follow the following to get the OpenCL working  -

1. Go to Nvidia OpenCL site(http://developer.nvidia.com/opencl) and check for their latest drivers with OpenCL support and also other tools you want to install.

2. Download the latest GPU Computing SDK from the Nvidia site and install them.

3. This is the link for code samples related to OpenCL - http://developer.download.nvidia.com/compute/opencl/sdk/website/samples.html. Though these samples also come along with GPU Computing SDK. You may see an icon on your desktop named NVIDIA GPU Computing SDK Browser. You can open this browser and go to OpenCL tab to see the examples working. The source and project files for these examples are presesnt in C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\ folder. The required library files and header may be found along with the samples or in the C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\shared\ folder.


If you're not sure if you Graphics card supports OpenCL or whether it is enabled, you can download a software called GPU Caps Viewer from here. This shows you all the features and information of your graphics card with a feature to enable or disable the OpenCL as well as CUDA support. It also contains some binaries so that you may test them. It looks something like this -




If your graphics card doesn't support OpenCL, then you have the option of installing Intel's OpenCL SDKs which uses CPU for the task. The installation steps for Inter OpenCL SDK are -
1. Install the pre-requisites for the SDK ie.
   i) Microsoft Windows Installer 3.1 or more
  ii) Microsoft Visual C++ 2008 run-time libraries or more
 iii) Java SE Runtime Environment 6 Update 27 or more
 The installer prompts you if anything is missing. You must have the administrative priviledge while installing the SDK.

2. Download the appropriate setup for your machine from Intel's site.

3. Install the setup. Mostly the SDK is installed in C:\Program Files (x86)\Intel\OpenCL SDK\ on a 64 bit system. The sample which come along with the SDK are installed in this folder - C:\Users\Public\Documents\Intel\OpenCL SDK\1.5\samples\

Now you are ready to start programming using OpenCL. Some website links are given below which might be of help.
1. The OpenCL official page on the Khronos* website. All information about latest versions of OpenCL  - http://www.khronos.org/opencl/
2. Information on the Khronos* conformance test process - http://www.khronos.org/adopters/
3. Intel OpenCL SDK Product page - http://software.intel.com/en-us/articles/intel-opencl-sdk/
4. Intel OpenCL SDK Download page  - http://software.intel.com/en-us/articles/download-intel-opencl-sdk/
5. Intel OpenCL SDK support forum - http://software.intel.com/en-us/forums/intel-opencl-sdk/
6. NVIDIA OpenCL developer zone - http://developer.nvidia.com/opencl
7. NVIDIA OpenCL developer forum - http://forums.nvidia.com/index.php?showforum=134

No comments:

Post a Comment