<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I’ve been playing around with Rcpp and CUDA (CUBLAS and Magma in particular) for quite a while now and definitely find it useful for improving performance. My interest is mostly in spatial models and gaussian processes where the rate limiting step is usually O(n^3) matrix decomposition where n is between 1000 to 5000.</div><div class=""><br class=""></div><div class="">For these types of tasks I routinely see ~2x improvements over RcppArmadillo & OpenBLAS using a $100 consumer grade card, which isn’t huge but makes a big difference when the overall runtime is around 80 hours per model.</div><div class=""><br class=""></div><div class="">If anyone is interested in looking at some code I have the early stages of a package up on github: <a href="https://github.com/rundel/RcppGP" class="">https://github.com/rundel/RcppGP</a>. In particular the gpu_mat class has a reasonably mature interface for moving data between armadillo and cuBLAS.</div><div class=""><br class=""></div><div class="">-Colin</div><div class=""><br class=""></div><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">-----<br class=""><br class="">Colin Rundel<br class="">Assistant Professor of the Practice<br class="">Duke University, Department of Statistical Science<br class=""><a href="http://www.stat.duke.edu/~cr173/" class="">www.stat.duke.edu/~cr173/</a></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On May 16, 2015, at 12:24 PM, Yue Li <<a href="mailto:gorillayue@gmail.com" class="">gorillayue@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Thanks for the quick insightful replies! I will look into the solutions and keep the list posted on any progress on this end.<br class=""><br class="">Yue<br class=""><br class=""><blockquote type="cite" class="">On May 16, 2015, at 12:10 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org" class="">edd@debian.org</a>> wrote:<br class=""><br class=""><br class="">On 16 May 2015 at 17:05, Sean O'Riordain wrote:<br class="">| Some students I have been working with managed to get Rcpp to work with Cuda<br class="">| for a simple use case - calculating a big log-likelihood for MCMC - and they<br class="">| got a bit of a speedup compared with Rcpp - but it needs more work.  They<br class="">| promised they would write up a note for the gallery once their exams are over<br class="">| in a couple of weeks.<br class=""><br class="">That is splendid news!<br class=""><br class="">I better make sure I can compile with CUDA then or else building the article<br class="">may be tricky.<br class=""><br class="">Dirk<br class=""><br class="">-- <br class=""><a href="http://dirk.eddelbuettel.com" class="">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" class="">edd@debian.org</a><br class=""></blockquote><br class="">_______________________________________________<br class="">Rcpp-devel mailing list<br class=""><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" class="">Rcpp-devel@lists.r-forge.r-project.org</a><br class="">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel<br class=""></div></blockquote></div><br class=""></body></html>