Paul Baines
Duncan Temple Lang
This R package is an interface to the CUDA API and libraries. It allows R programmers to invoke code on a Nvidia (GP)GPU. This gives extensive parallelism on ALUs.
This package is similar to Simon Urbanek's OpenCL package, but specifically targets CUDA and Nvidia. These packages provide the building blocks for people to use the GPUs from within R in arbitrary ways. They allow one to write code in R that manipulates the GPU. This is different from packages such as gputools or rgpu which provide R functions for particular algorithms which are programmed in C and leverage the GPU through that C code. OpenCL and RCUDA aim to make writing that code feasible in R. This is allows us to use higher-level programming languages and also makes it much easier to experiment with GPUs. This leads to more flexible code and much less of it.
We have programmatically generated bindings to almost all of the routines in the CUDA SDK API and to the enumerated constants and non-opaque data structures.
We have also managed to translate/compile a very simple kernel written in R code to PTX code and load and invoke that with RCUDA. The compilation is done in R using the Rllvm and RLLVMCompile packages. (See the development versions on github at present)
We have also developed an interface to libNVVM for converting LLVM Intermediate Representation (IR) code to PTX. This gives us two ways to generate the PTX from R code.