[Rcpp-devel] Question on performance and strategy

Dirk Eddelbuettel edd at debian.org
Sat Sep 22 19:35:45 CEST 2018


On 22 September 2018 at 17:52, Jordi Molins wrote:
| In relation to doing "CPU x GPU": what would happen if I have 3 variables
| to be parallelized (independent from each other, no interdependencies) and
| then I create an R function, using RcppArrayFire, to GPU-parallelize two of
| them. Then, I use foreach (or similar) in R to CPU-paralellize the third
| one (and for each variable of the third one, the R function is called, and
| then internally, RcppArrayFire uses GPUs).

Just because you want to access ONE gpu device N times does not make it N gpus.

And as you have only one GPU, if you call it N times "in parallel" (we know:
time sliced) you get contention.

No different from having OpenBLAS or Intel MKL using ALL your cores for
matrix algebra.  If you can that from any of the R process parallel helpers
you get contention.  All this is well documented.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list