4

I've run

Needs["CUDALink`"]
CUDAResourcesInstall[]

which, after a long download, returns

{
PacletManager`Paclet[
 "Name" -> "CUDAResources", "Version" -> "10.2.0.3", 
  "MathematicaVersion" -> "10.*", 
  "Description" -> "{ToolkitVersion -> 7.0, MinimumDriver -> 300.0}", 
  "SystemID" -> {"Windows-x86-64"}, "Qualifier" -> "Win64", 
  "Extensions" -> {{
    "Resource", 
     "Resources" -> {
      "CUDAToolkit", "ExampleData", "LibraryResources"}}}, 
  "Location" -> "C:\\Users\\Diego\\AppData\\Roaming\\Mathematica\\\
Paclets\\Repository\\CUDAResources-Win64-10.2.0.3"]}

Now

CUDADriverVersion[]

returns

358.87

But then I try

CUDAQ[]
CUDAInformation[]

and I get

False
During evaluation of In[44]:= CUDAInformation::nodev: CUDALink failed to detect a usable device. >>
CUDAInformation[]

So, when I try to use any CUDA function, such as the matrix product

A = RandomInteger[1, {10, 10}];
B = RandomInteger[1, {10, 10}];
CUDADot[A, B];

I get

CUDADot::invdev: CUDALink device is invalid. >>

I have a GeForce GTX Titan X (with NVIDIA drivers recently installed), which should totally be CUDA-ready. So, what am I doing wrong?

EDIT

The following functions return the following outputs:

In[30]:= CUDACCompilers[]
Out[30]= {}

In[31]:= CUDAResourcesInformation[]
Out[31]= {{"Name" -> "CUDAResources", "Version" -> "10.2.0.3", 
  "BuildNumber" -> "", "Qualifier" -> "Win64", 
  "WolframVersion" -> "10.*", "SystemID" -> {"Windows-x86-64"}, 
  "Description" -> "{ToolkitVersion -> 7.0, MinimumDriver -> 300.0}", 
  "Category" -> "", "Creator" -> "", "Publisher" -> "", 
  "Support" -> "", "Internal" -> False, 
  "Location" -> 
   "C:\\Users\\Diego\\AppData\\Roaming\\Mathematica\\Paclets\\\
Repository\\CUDAResources-Win64-10.2.0.3", "Context" -> {}, 
  "Enabled" -> True, "Loading" -> Manual, 
  "Hash" -> "7326e294f5e53407e2ce826e5b3ce301"}}

In[32]:= GPUTools`Internal`$NVIDIADriverLibraryPath
Out[32]= "C:\\Windows\\System32\\nvapi64.dll"

In[33]:= GPUTools`Internal`$CUDALibraryPath
Out[33]= "C:\\Windows\\System32\\nvcuda.dll"

In[34]:= $CUDALinkPath
Out[34]= "C:\\Program Files\\Wolfram
Research\\Mathematica\\10.1\\SystemFiles\\Links\\CUDALink\\"

In[35]:= SystemInformation["Devices", "GraphicsDevices"][[1]]
Out[35]= "DirectX" -> {"Version" -> "9", "Driver" -> "nvd3dumx.dll", 
  "Description" -> "NVIDIA GeForce GTX TITAN X", 
  "DeviceName" -> "\\.\\DISPLAY6", "VendorId" -> "4318", 
  "DeviceId" -> "6082", "SubSysId" -> "429471810", 
  "Revision" -> "161", 
  "DeviceIdentifier" -> {"D7B71E3E-5482-11CF-F14C-94391CC2C735"}, 
  "DriverVersion" -> "10.18.13.5891", 
  "Optimized 3D Transparency" -> True}

I've installed Visual Studio 2015 to serve as C compiler, but apparently CUDA only supports Visual Studio at most 2010... Is this true? (My installation of the CUDA Toolkit doesn't detect any Visual Studio installation!)

  • I suspect that you might have checked these already, but just in case, take a look at the setup and testing section of the CUDALink docs: http://reference.wolfram.com/language/CUDALink/tutorial/Setup.html . There are some limited troubleshooting tips mainly regarding the location of required files / drivers / compilers. – MarcoB Nov 10 '15 at 05:33
  • 1
    What do CUDACCompilers[], CUDAResourcesInformation[], GPUTools`Internal`$NVIDIADriverLibraryPath, GPUTools`Internal`$CUDALibraryPath, and $CUDALinkPath return? – Karsten7 Nov 10 '15 at 05:34
  • 1
    Also SystemInformation["Devices", "GraphicsDevices"][[1]] would be important. – Karsten7 Nov 10 '15 at 05:39
  • @Karsten7. I added the relevant information to the original post. Thanks! – étale-cohomology Nov 10 '15 at 06:30
  • @MarcoB I've tried most of the things in that list but so far nothing has worked. I've got nothing under CCompilers[] or CUDACCompilers[] (but I've got Visual Studio 2015 installed), so perhaps I'm missing an old(er) version of Visual Studio? – étale-cohomology Nov 10 '15 at 06:38
  • 3
    CUDACCompilers[] is the only thing that doesn't look O.K. http://mathematica.stackexchange.com/a/91845 should help to solve the issue. – Karsten7 Nov 10 '15 at 06:51
  • 2
    @DiegoAlonsoCortez: There might be a way to get the MSVC compiler from visual studio to work with Mathematica (I imagine I read about that somewhere), but out of the box Mathematica only supports VS 2013 or older versions. – Wizard Nov 10 '15 at 10:01
  • The CUDA Toolkit v7.5 supports the Visual C++ 12.0 compiler (Visual Studio 2013) as specified in its system requirements. – Karsten7 Nov 11 '15 at 12:05
  • Did you solve this? I'm having problems getting CUDALink to work with a GTX Titan X – Simon Woods Jul 20 '16 at 10:59
  • I didn't solve it and I'm using CUDA directly through the C API, on Linux. It may be possible to do this with Mathematica (instead of C), but I don't know how. – étale-cohomology Jul 20 '16 at 17:40

0 Answers0