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

Charles Determan cdetermanjr at gmail.com
Thu Mar 16 18:48:03 CET 2017


Thanks Duncan,

You say there aren't a lot of people that no how to do that.  Do you know
of anyone who would?  I assume Dirk would be a likely person given the use
of Rtools with Rcpp.  I am happy to try and work at this as I have a vested
interest in getting CUDA packages to become functional on Windows systems
but I need somewhere to begin.  Basically I'm just looking how to switch
out the MinGW g++ with the VS cl compiler.  On a Linux system I can create
a .R/Makevars file to switch the CXX variable but I don't know how on
Windows.

Charles

On Thu, Mar 16, 2017 at 10:41 AM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:

> 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
>
>
>
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list