<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">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.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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…<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#464847;background:white"><br>
<b>Dale Smith, Ph.D.</b><br>
</span><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#7F7F7F;background:white">Data Scientist<br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#7F7F7F;background:white">​</span><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#7F7F7F;background:white"><br>
</span><a href="http://nexidia.com/" title=""Nexidia website" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="150" height="33" id="Picture_x0020_1" src="cid:image001.png@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20logo.png"></span></a><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#464847;background:white"><br>
</span><b><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#7F7F7F;background:white"><br>
d.</span></b><span style="font-size:8.5pt;font-family:"Arial","sans-serif";color:#7F7F7F;background:white"> 404.495.7220 x 4008   <b>f.</b> 404.795.7221<br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#A5A5A5;background:white">Nexidia Corporate | 3565 Piedmont Road, Building Two, Suite 400 | Atlanta, GA 30305<br>
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#464847;background:white"><br>
</span><a href="http://blog.nexidia.com/" title=""Nexidia Blog" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="20" height="20" id="Picture_x0020_2" src="cid:image002.jpg@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Blog.jpeg"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><a href="https://www.linkedin.com/company/nexidia" title=""LinkedIn" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="20" height="20" id="Picture_x0020_3" src="cid:image003.jpg@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20LinkedIn.jpeg"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><a href="https://plus.google.com/u/0/107921893643164441840/posts" title=""Google+" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="20" height="20" id="Picture_x0020_4" src="cid:image004.jpg@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Google.jpeg"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><a href="https://twitter.com/Nexidia" title=""Twitter" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="20" height="20" id="Picture_x0020_5" src="cid:image005.jpg@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20twitter.jpeg"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><a href="https://www.youtube.com/user/NexidiaTV" title=""Youtube" t "><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="20" height="20" id="Picture_x0020_6" src="cid:image006.jpg@01D09148.FC6AB9B0" alt="http://host.msgapp.com/Extranet/96621/Signature%20Images/sig%20Youtube.jpeg"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rcpp-devel-bounces@lists.r-forge.r-project.org [mailto:rcpp-devel-bounces@lists.r-forge.r-project.org]
<b>On Behalf Of </b>Colin Rundel<br>
<b>Sent:</b> Saturday, May 16, 2015 3:58 PM<br>
<b>To:</b> rcpp-devel@lists.r-forge.r-project.org<br>
<b>Subject:</b> Re: [Rcpp-devel] examples of using cula matrix multiplication in Rcpp<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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">https://github.com/rundel/RcppGP</a>. In particular the gpu_mat class has a reasonably mature
 interface for moving data between armadillo and cuBLAS.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-Colin<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">-----<br>
<br>
Colin Rundel<br>
Assistant Professor of the Practice<br>
Duke University, Department of Statistical Science<br>
<a href="http://www.stat.duke.edu/~cr173/">www.stat.duke.edu/~cr173/</a><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On May 16, 2015, at 12:24 PM, Yue Li <<a href="mailto:gorillayue@gmail.com">gorillayue@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks for the quick insightful replies! I will look into the solutions and keep the list posted on any progress on this end.<br>
<br>
Yue<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">On May 16, 2015, at 12:10 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
<br>
<br>
On 16 May 2015 at 17:05, Sean O'Riordain wrote:<br>
| Some students I have been working with managed to get Rcpp to work with Cuda<br>
| for a simple use case - calculating a big log-likelihood for MCMC - and they<br>
| got a bit of a speedup compared with Rcpp - but it needs more work.  They<br>
| promised they would write up a note for the gallery once their exams are over<br>
| in a couple of weeks.<br>
<br>
That is splendid news!<br>
<br>
I better make sure I can compile with CUDA then or else building the article<br>
may be tricky.<br>
<br>
Dirk<br>
<br>
-- <br>
<a href="http://dirk.eddelbuettel.com">http://dirk.eddelbuettel.com</a> | @eddelbuettel |
<a href="mailto:edd@debian.org">edd@debian.org</a><o:p></o:p></p>
<p class="MsoNormal"><br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>