[R-SIG-Mac] Can R on a Mac use the GPU

Taras Zakharko t@r@@@z@kh@rko @end|ng |rom uzh@ch
Wed Feb 22 07:46:04 CET 2023


H Bill, 

I am not aware of any packages that do this for you directly. While it is certainly possible to write a Metal shader that will get the job done, it will likely take a substantial amount of non-trivial effort. To further complicate the issue Apple GPUs do not support double-precision computation (used by R). 

Maybe it would be possible for you to accelerate computation used Apple-provided routines from the Acceleration framework (e.g. BLAS and LAPACK)? Many of those routines have access to the hardware matrix accelerators present on Apple hardware and can result in major performance improvements. 

Best, 

Taras 

> On 21 Feb 2023, at 18:12, William R Revelle <revelle using northwestern.edu> wrote:
> 
> Dear R-Mac users.
> 
> In trying to speed up a large correlation problem (600K subjects, 6k variables,)  which I can do using my bigCor function, I decided it was time to learn how to use GPU on my Mac book with its M1 Max gpu.  
> 
> Having spent a day searching the web and trying  various approaches, I give up.
> 
> Are there any packages I can use to do calculations on the GPU part of my Mac using R?
> 
> Thanks.
> 
> Bill
> 
> William Revelle		   personality-project.org/revelle.html
> Professor			          personality-project.org
> Department of Psychology www.wcas.northwestern.edu/psych/
> Northwestern University	   www.northwestern.edu/
> Use R for psychology         personality-project.org/r
> It is 90 seconds to midnight   www.thebulletin.org
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list