I'm not a big fan of GPU computing for many of the reasons Dirk mentions below 
and something else I discovered while taking a Coursera class last winter.



CUDA requires significant effort to keep up your skills unless you do it 
semi-regularly or more often. It's a very hard learning curve. I can't climb 
that curve at this point in my working life. An occasional user may want to 
skip CUDA and investigate OpenACC or something related. Do what works best for 
you. I’ll investigate rCUDA, PyCUDA, OpenACC, etc, and leave the lower-level 
stuff to others.



I’d like to reiterate that by far the most difficult think about working with 
GPU technology is efficiently moving data on and off the card. Do you have a 
rigorously established use case for using GPU technology?



I’m skeptical that tying Rcpp with CUDA is something lots of people should do, 
but give it a try if you have the expertise and can make the use case. Moving 
data on and off the card is a third layer between you and the computations…


Dale Smith, Ph.D.
Data Scientist
​
[http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20logo.png]<http://nexidia.com/>

d. 404.495.7220 x 4008   f. 404.795.7221
Nexidia Corporate | 3565 Piedmont Road, Building Two, Suite 400 | Atlanta, GA 
30305

[http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Blog.jpeg]<http://blog.nexidia.com/>
 [http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20LinkedIn.jpeg] 
<https://www.linkedin.com/company/nexidia>  
[http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Google.jpeg] 
<https://plus.google.com/u/0/107921893643164441840/posts>  
[http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20twitter.jpeg] 
<https://twitter.com/Nexidia>  
[http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Youtube.jpeg] 
<https://www.youtube.com/user/NexidiaTV>

From: rcpp-devel-boun...@lists.r-forge.r-project.org 
[mailto:rcpp-devel-boun...@lists.r-forge.r-project.org] On Behalf Of Colin 
Rundel
Sent: Saturday, May 16, 2015 3:58 PM
To: rcpp-devel@lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] examples of using cula matrix multiplication in Rcpp

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.

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.

If anyone is interested in looking at some code I have the early stages of a 
package up on github: https://github.com/rundel/RcppGP. In particular the 
gpu_mat class has a reasonably mature interface for moving data between 
armadillo and cuBLAS.

-Colin

-----

Colin Rundel
Assistant Professor of the Practice
Duke University, Department of Statistical Science
www.stat.duke.edu/~cr173/<http://www.stat.duke.edu/~cr173/>

On May 16, 2015, at 12:24 PM, Yue Li 
<gorilla...@gmail.com<mailto:gorilla...@gmail.com>> wrote:

Thanks for the quick insightful replies! I will look into the solutions and 
keep the list posted on any progress on this end.

Yue


On May 16, 2015, at 12:10 PM, Dirk Eddelbuettel 
<e...@debian.org<mailto:e...@debian.org>> wrote:


On 16 May 2015 at 17:05, Sean O'Riordain wrote:
| Some students I have been working with managed to get Rcpp to work with Cuda
| for a simple use case - calculating a big log-likelihood for MCMC - and they
| got a bit of a speedup compared with Rcpp - but it needs more work.  They
| promised they would write up a note for the gallery once their exams are over
| in a couple of weeks.

That is splendid news!

I better make sure I can compile with CUDA then or else building the article
may be tricky.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | 
e...@debian.org<mailto:e...@debian.org>

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org<mailto:Rcpp-devel@lists.r-forge.r-project.org>
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to