On 16/03/2017 11:00 AM, Charles Determan wrote:
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.
In principle it should be possible to use cl. In practice, it will
require someone to work out the details of doing it and to maintain it
(by testing R-devel regularly to make sure changes there don't cause
trouble for it). There aren't a lot of people who know how to do that
(e.g. I don't). If you are willing to volunteer to do this (or can
recruit someone to do it), go ahead. Assuming you do a good job, we can
put your patches into the base code.
Duncan Murdoch
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel