10

On my MacBook Pro, I have a CUDA enabled video card, yet Mathematica does not seem to recognize this. For example, following the CUDALink Setup, I get

Needs["CUDALink`"]
CUDAQ[]
(* False *)
CUDADriverVersion[] 
(* CUDADriverVersion::nodriv message raised. *)

Additionally, according to the documentation, my card is not listed, despite NVidia saying otherwise.

How do I convince Mathematica that my card supports CUDA?

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
rcollyer
  • 33,976
  • 7
  • 92
  • 191
  • I think this'll need an update for v9. I have CUDA working with v8 but not v9. – Szabolcs Nov 29 '12 at 03:45
  • @Szabolcs I have not tried it with 9. Will have to do that this weekend ... – rcollyer Nov 29 '12 at 04:40
  • 1
    It turns out that the problem was that v9 tried to use the resources downloaded for v8, but the binaries are incompatible. I couldn't figure out how to remove the resource packet, so I removed the Library/Mathematica directory entirely, let Mathematica 9 re-download the CUDA resources, and now everything is working fine. – Szabolcs Nov 30 '12 at 02:19

1 Answers1

12

The answer, in this case, is updating the CUDA driver manually. Finding the driver, though, is non-trivial. For instance, this page says that there are no drivers available for the mac. To find the CUDA drivers, you need to find the Developer Zone, and go to the CUDA downloads page. Interestingly enough, the Getting Started Documentation (pdf) is Windows specific and does not include the 300 series in its list of supported cards. However, downloading the CUDA for MAC drivers works just fine on my machine. Note: you only need to download the drivers (currently the middle of the three links) to get it working.

Needs["CUDALink`"]
CUDAQ[] (* True *)
CUDADriverVersion[] (* 4.2.9 *)

alongside the rest of the tests. But, the proof is in the graphics:

data = CUDAVolumetricDataRead[
        FileNameJoin[{$CUDALinkExampleDataPath, "Bucky.raw"}], 
        32, 32
       ];
CUDAVolumetricRender[data, "Width" -> 400, "Height" -> 400]

output from CUDAVolumetricRender

rcollyer
  • 33,976
  • 7
  • 92
  • 191