[R-sig-hpc] A few questions on using R and CUDA

Qiang Kou qkou @end|ng |rom |u@edu
Thu Mar 7 18:26:31 CET 2019


Hi, Nafis,

To use NVBLAS with R, please see the page 8 in the slides below:

http://www.parallelr.com/slides/ParallelR-Accelerating%20R%20Applications%20with%20CUDA.pdf

Best wishes,

KK

On Thu, Mar 7, 2019 at 9:15 AM Nafis Sadat <sadatnfs using uw.edu> wrote:

> Hi everyone:
>
> My name is Nafis Sadat, and I am a software engineer at the University of
> Washington. I've been doing some research on the side recently on looking
> at R and GPU capabilities, and after pinging Dr. Dirk Eddelbuettel (after
> finding out his work on the 'gcbd' package), he suggested that I can send
> out my question to the r-sig-hpc mailing list hoping for some answers!
>
> I work in the geospatial sciences team in my institute, where we try to
> model diseases at the pixel level around the world using spatial modeling
> methods. The models that our researchers use are written using the R
> packages INLA (http://www.r-inla.org/) and TMB (
> https://github.com/kaskr/adcomp/wiki); all of the code base is entirely
> in R. One issue that we simply can't avoid is the large dimension of the
> data (so, if we were modeling at a finer mesh for example, we would have
> more parameters to optimize, and that leads to longer model runtimes).
>
> A year ago, there was no work done in the team to try and optimize this
> part of the process, but then I worked with another software engineer to
> compile R from source using the BLAS/LAPACK provided by Intel MKL, and that
> sped up things pretty decently when it came to a lot of matrix algebra. In
> fact, both the INLA and TMB packages are built by linking against BLAS (and
> I have confirmed that the MKL is indeed being used when I run the model by
> doing a verbose trace). Fast forward to now, and I came across this page:
> https://developer.nvidia.com/cublas.
>
> I have a machine lying around at home which has an Nvidia GPU and the line
> where Nvidia claims that "cuBLAS performs up to 35X faster than the latest
> version of the MKL BLAS on common benchmarks". I have not looked into super
> details about the backend of this (and only recently I have been coming
> across the .cu extensions...). In an ideal world, if I could simply build R
> by linking to the CUDA BLAS instead of the MKL BLAS and have everything
> else run as-is, then that would be the dream, but after fudging around
> earlier today where I tried to symlink 'libnvblas.so' to 'libblas.so', that
> build of R was quite a failure.
>
> If anyone here would happen to have any thoughts or suggestions on this, I
> would absolutely love your inputs. I have not found any answers on this on
> Google, and I just posted a question on Stack Overflow, so I'm hoping that
> I can learn more about this!
>
> Thanks everyone for your patience in reading through this!
>
> Nafis
>
>
>
>
> Nafis Sadat
> Software Engineer
> Institute for Health Metrics and Evaluation | University of Washington
> 2301 5th Avenue, Suite 600 | Seattle, WA 98121| USA
> Tel: +1-206-897-3726<tel:+1%20206-897-3726> | Fax:
> +1-206-897-2899<tel:+1%20206-897-2899> | Campus Mailbox: 358210
> sadatnfs using uw.edu<mailto:sadatnfs using uw.edu> | http://www.healthdata.org<
> http://www.healthdata.org/>
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>

	[[alternative HTML version deleted]]



More information about the R-sig-hpc mailing list