4
$\begingroup$

I am trying to follow instructions for "Compiling for CUDA", so that I can write my own functions to run on the GPU. However, CUDAFunctionLoad gives me errors.

CUDAFunctionLoad::target: Target system specification "TargetSystemID" -> Windows-x86-64 is not available for NVIDIA CUDA Compiler installation C:\Users\Stefan\AppData\Roaming\Mathematica\Paclets\Repository\CUDAResources-Win64-10.5.0\CUDAToolkit\bin.

The system definitely sees my device, as it shows up in both SystemInformation under Links>CUDA as well as CUDAInformation, as the only device listed (as expected).

In[4]:= CUDAInformation[]
Out[4]= {1->{Name->GeForce GTX 1080,Clock Rate->1860000,Compute Capabilities->6.1,GPU Overlap->1,Maximum Block Dimensions->{1024,1024,64},Maximum Grid Dimensions->{2147483647,65535,65535},Maximum Threads Per Block->1024,Maximum Shared Memory Per Block->49152,Total Constant Memory->65536,Warp Size->32,Maximum Pitch->2147483647,Maximum Registers Per Block->65536,Texture Alignment->512,Multiprocessor Count->20,Core Count->640,Execution Timeout->1,Integrated->False,Can Map Host Memory->True,Compute Mode->Default,Texture1D Width->131072,Texture2D Width->131072,Texture2D Height->65536,Texture3D Width->16384,Texture3D Height->16384,Texture3D Depth->16384,Texture2D Array Width->32768,Texture2D Array Height->32768,Texture2D Array Slices->2048,Surface Alignment->512,Concurrent Kernels->True,ECC Enabled->False,TCC Enabled->False,Total Memory->8589934592}}

(side note, that's not the correct Core Count)

While looking into this, I found that only the Visual Studio compiler shows up, even after running Needs["CUDALINK`"].

In[5]:= CCompilers[]
Out[5]= {{"Name" -> "Visual Studio", "Compiler" ->> CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,  "CompilerInstallation" -> "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0", "CompilerName" -> Automatic}}

The tutorial page shows a new compiler that should be showing up named "NVIDIA CUDA Compiler", filling the role of the NVCCCompiler. The path in the documentation example is "C:\Users\abduld.WRI\AppData\Roaming\Mathematica\Paclets\Repository\CUDAResources-Win64-8.0.0.6\CUDAToolkit\bin64\", and my PC has an analogous path for the CUDAToolkit binaries, so I'm not sure what the issue is.

In[6]:= CUDAResourcesInformation[]
Out[6]= {{Name->CUDAResources,Version->10.5.0,BuildNumber->,Qualifier->Win64,WolframVersion->10.5+,SystemID->{Windows-x86-64},Description->{ToolkitVersion -> 7.0, MinimumDriver -> 300.0},Category->,Creator->,Publisher->,Support->,Internal->False,Location->C:\Users\Stefan\AppData\Roaming\Mathematica\Paclets\Repository\CUDAResources-Win64-10.5.0,Context->{},Enabled->True,Loading->Manual,Hash->79fa747a52a45bf2d78e2c3516c80061}}

I have the NVIDIA CUDA Toolkit installed, and am able to compile and run all the cuda code from the CUDA Samples provided by NVIDIA. Mathematica also has no trouble using builtin functions like CUDAErosion, etc. So my question is just, How do I get Mathematica to recognize the CUDA compilers on my system?

Running windows 7, 64 bit. Mathematica 11.0.1.0, CUDAResources paclet version 10.5.0

$\endgroup$
  • $\begingroup$ Looks like you need to download and install the CUDA 10.5 paclet from Wolfram. But the 1080 gtx requires CUDA version 8.0, and the latest CUDA paclet 10.5 is not there yet. $\endgroup$ – Bill Watts Nov 26 '17 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.