[R-pkg-devel] Windows specific compiler for CUDA builds

Charles Determan cdetermanjr at gmail.com
Thu Mar 16 16:00:40 CET 2017


Greetings,

Not sure if this should be on the Rcpp list but it isn't strictly related
to Rcpp but to package building involving Rcpp so I am posting it here.

I am often working on GPU packages that use either OpenCL or CUDA.  OpenCL
is nice because it doesn't require a special additional compiler and I can
build it across platforms with relative ease.  With CUDA, it requires the
'nvcc' compiler.  This is where my problem comes in.  On Windows the 'nvcc'
requires the use of the 'cl' compiler within Visual Studio and the
resulting object files, AFAIK, cannot be linked to object files created by
g++ (via Rtools).  Everything works great on Linux (where the same compiler
is used for everything) but on a Windows system this is causing a lot of
headaches.

So, at the moment, my conclusion is that it is simply not possible to build
a CUDA package that can be installed on a Windows system.  To my knowledge,
no CUDA based R package has a Windows installation functional (please state
otherwise if I am wrong).

My only thought would be if it would be possible to have the Windows build
use 'cl' for the entire build process.  Perhaps that would allow all the
files to be linked together and create the necessary shared object at the
end?  Obviously the preference is to use Rtools but until NVIDIA updates
their special compiler to support MinGW tools I don't think that is
possible.

Any insight would be appreciated,

Charles

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list