The CUtil package which enables GPU computation in R

Abstract

There are some R packages which uses GPU for computation, and the better performance is provided by GPU-equipped computers. However, the current number of implemented functions in their packages is limited because special procedures are required for utilization of GPU, such as memory allocation in video memory, and data transfer between main memory and video memory. Furthermore, these packages are not easy to use for Windows users because binary packages are not provided, and it is not easy for Windows users to build a developing environment. Since there seems to be a large number of potential Windows users, it is beneficial to develop a package which enables GPU computing easily on Windows. Therefore, we began to develop a new package which utilize GPU in computation with minimum modification of R source code, and also can be used easily for Windows users. The package development is ongoing, and the detail specifications are not fixed, except that the package is developed with NVIDIA\u27s CUDA toolkit. Our package CUtil (CUDA Utility package) will be equipped with the following features.As described above, the first feature is that Windows users will be able to use this package easily. This package will be available from CRAN, and we will also try to make Windows binary packages available. The second feature is that after loading the package, the frequently used operators and functions can be overridden. With this overriding, we can enjoy GPU computation performance with minimum modification of R source code. The third feature is that the package minimize the data transfer cost between main memory and video memory. The data on video memory is treated as external pointer in R objects, and once the R object on main memory is transferred to video memory for GPU computation, the data is kept on video memory as R objects. The next time of the GPU computation, the data can be used directly by GPU without the data transfer. Because it is known that the proportion of time needed for the data transfer is relatively high, this advantage will be beneficial especially for a long series of computations, such as Markov chain Monte Carlo methods in Bayesian statistics. Other than these features, we are going to implement double precision floating-point and complex number computation in addition to single floating-point, and garbage-collection, which enables us to use a small amount of video memory effectively. This package will require computers with NVIDIA\u27s GPU (compute capability is equal to or greater than 2.0).The R User Conference 201

    Similar works