coding beacon

[programming & visualization]

Tag Archives: OpenCL

Choosing GPU Hardware for Neural Network Modeling (draft)

Hardware Interaction Model

CUDA

It is not yet clear to me whether whether specific NVidia hardware makes a lot of difference. More on this later. In the mean time, here’s a library that claims to need Fermi/Tesla or equivalent (“Fermi-generation GPU (GTX 4xx, GTX 5xx, or Tesla equivalent required.”) What the reason is, I can only guess.

https://code.google.com/p/cuda-convnet/

OpenCL

http://deeplearning.net/software/theano/tutorial/using_gpu.html (mentioned in the second half of the page)

More on this later

GPU Use with Neural Networks (Other Sources)

http://deeplearning.net/software/theano/tutorial/using_gpu.html

How to start using OpenCL ASAP

The following is written assuming the computer has Intel CPU:

Supported Targets

3rd Generation Intel Core Processors
Intel “Bay Trail” platforms with Intel HD Graphics
4th Generation Intel Core Processors, need kernel patch currently, see the “Known Issues” section.
5th Generation Intel Core Processors “Broadwell”.

To start programming right away, do the following:

1. Get Beignet. https://wiki.freedesktop.org/www/Software/Beignet/

Beignet is an open source implementation of the OpenCL specification – a generic compute oriented API. This code base contains the code to run OpenCL programs on Intel GPUs which basically defines and implements the OpenCL host functions required to initialize the device, create the command queues, the kernels and the programs and run them on the GPU.

In terms of the OpenCL 1.2 spec, beignet is quite complete now (at the time of writing, 28/03/2015).

2. Get OpenCL Studio http://opencldev.com/

title.jpg

The OpenCL Programming Book

http://www.fixstars.com/en/opencl/book/OpenCLProgrammingBook/contents/

Eclipse: prepare for OpenCL programming

http://stackoverflow.com/questions/21318112/how-to-prepare-eclipse-for-opencl-programming-intel-opencl-sdk-installed-in-li

http://marketplace.eclipse.org/content/opencl-development-tool

High Performance Computing Libraries (to be updated)

1. IRC channel #opencl at freenode network

2. https://blog.ajguillon.com/

3. Reference on installing pre-requisites (hardware drivers)

http://cran.r-project.org/web/packages/OpenCL/INSTALL

CUDA vs OpenCL

https://www.wikivs.com/wiki/CUDA_vs_OpenCL

http://streamcomputing.eu/blog/2010-01-28/opencl-the-battle-part-i/

http://programmers.stackexchange.com/questions/53410/cuda-vs-opencl-opinions#53699

http://blog.accelereyes.com/blog/2012/02/17/opencl_vs_cuda_webinar_recap/

ArrayFire (open source) http://arrayfire.com/

“ArrayFire supports both CUDA-capable NVIDIA GPUs and most OpenCL devices, including AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. We want your code to run as fast as possible, regardless of the hardware.”

“ArrayFire is a blazing fast software library for GPU computing. Its easy-to-use API and array-based function set make GPU programming simple. A few lines of code in ArrayFire can replace dozens of lines of raw GPU code, saving you valuable time and lowering development costs.”

Getting Started

(written prior to being open-source): http://blog.accelereyes.com/blog/2013/03/04/arrayfire-examples-part-1-of-8-getting-started/

Overview by NVidia: http://devblogs.nvidia.com/parallelforall/arrayfire-portable-open-source-accelerated-computing-library/

* Download here

http://arrayfire.com/download/ & install, and append “%AF_PATH%/lib;” to your PATH env.variable

* Sources

https://github.com/arrayfire/arrayfire

* Files required to use ArrayFire from R (prerequisites: source files above)

https://github.com/arrayfire/arrayfire_r