SPOC is a set of tools for GPGPU programming with OCaml.
The SPOC library enables the detection and use of GPGPU devices with OCaml using Cuda and OpenCL. There is also a camlp4 syntax extension to handle external Cuda or OpenCL kernels, as well as a DSL to express GPGPU kernels from the OCaml code.
This work was part of my PhD thesis and was partially funded by the opengpu project. I'm currently in the UPMC-LIP6 laboratory.
It has currently been tested on multiple architectures and systems, mostly 64-bit Linux and 64-bit OSX systems. It should work with Windows too.
To be able to use SPOC, you'll need a computer capable of running OCaml (obviously) but also compatible with either OpenCL or Cuda. For Cuda you only need a current proprietary NVidia driver while for OpenCL you need to install the correct OpenCL implementation for your system. SPOC should compile anyway as everything is dynamically linked, but you'll need Cuda/OpenCL eventually to run your programs.
SPOC currently lacks a real tutorial, it comes with some examples and I strongly advise anyone interested to look into the slides and papers.
This has been tested with Firefox 26-28 and this plugin under Windows (32bit or 64bit), Linux (Ubuntu 13.10) (32bit and 64 bit) and Mac OS/X Mavericks.
Of course, you'll also need to have OpenCL on your system.
You should install/have :
* ocaml >= 4.01.0 * camlp4 * ocamlfind * ocp-build
For cuda compilation :
To compile SPOC:
cd Spoc make make install
Will build the ocamldoc html pages in the Spoc/docs directory
The "Samples" directory contains few programs using SPOC.
To compile those programs:
cd Samples make
Binaries will be located in the Samples/build folder
The "SpocLibs" directory contains few libraries based on Spoc.
The Sample directory contains few samples using those libraries
UPMC - LIP6
Boite courrier 169
Couloir 26-00, Etage 3, Bureau 325
4 place Jussieu
75252 PARIS CEDEX 05
Tel: 01 44 27 88 16, Mathias.Bourgoin (at) lip6.fr