[R-pkg-devel] GPU Package Building in CRAN

quirin stier Qu|r|n_St|er @end|ng |rom gmx@de
Mon Aug 18 10:29:58 CEST 2025


Hi everyone,

which approach should I try to use for official CRAN submissions of R 
packages using OpenCL and GPUs, if none of the available solutions would 
pass the CRAN checks.

Currently I see two possibilities of building an R package deploying 
OpenCL with a GPU, however neither of them would pass the CRAN checks 
directly. The first solution would be to use the approach of the 
"OpenCL" package from CRAN 
(https://cran.r-project.org/web/packages/OpenCL/index.html) relying on 
the user to set local variables (OCL = ".../SDK/...", and so forth). The 
second approach would be to use something like cmake, to circumvent the 
need for the user to take care of certain requirements prior to 
installation, as is done in 
https://github.com/jmaerte/cmake-rcpp-template. The cmake approach poses 
the problem, that the paths generated are too long and thus fails the 
CRAN check and a building of the package is not possible.

Best regards

Quirin



More information about the R-package-devel mailing list