Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
I think this'll need an update for v9. I have CUDA working with v8 but not v9. –  Szabolcs Nov 29 '12 at 3:45
    
@Szabolcs I have not tried it with 9. Will have to do that this weekend ... –  rcollyer Nov 29 '12 at 4: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 2:19
add comment

1 Answer

up vote 12 down vote accepted

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

share|improve this answer
    
You have a Mac with an Nvidia card? How did you get it? I'd buy one if I could. –  Jens Jun 5 '12 at 15:25
1  
@Jens I have a 2010 model. It appears that the current line of macbooks have AMD Radeons. –  rcollyer Jun 5 '12 at 15:31
    
@Jens My 2008 MBP has a CUDA capable Nvidia card. I guess the newer ones don't –  rm -rf Jun 5 '12 at 16:03
    
@R.M But, the Radeon's support OpenCL which is baked into the OS starting v. 10.6. –  rcollyer Jun 5 '12 at 16:10
    
@R.M. yes, but OpenCL is less mature than CUDA, and you have to implement more things by hand (e.g. if you want to use BLAS/LAPACK). Thanks for the info! –  Jens Jun 5 '12 at 17:14
show 10 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.