It seems that TargetDevice->"GPU" doesn't work for me in Mathematica version 11.1. I get an error message:

trained = 
 NetTrain[lenet, trainingData, ValidationSet -> testData, 
  MaxTrainingRounds -> 3, TargetDevice -> "GPU"]
(* $Failed *)

NetTrain::trgdevos: TargetDevice -> "GPU" is not supported on MacOSX.

However, the same works for me in version 11.0. So why does it break in version 11.1? Is there a way to fix that?

I'm using a NVIDIA GeForce GT 750M on mac os version 10.12.3. My graphics card is cuDNN compatible (=3.0) according to the information here.

  • $\begingroup$ There are some bugs in 11.1. Just report it using Help/Give Feedback, they'll fix it $\endgroup$ Commented Mar 21, 2017 at 1:50
  • $\begingroup$ Do you have the latest drivers for your card? If not, update the drivers and try again. I had a issue previously that was solved by updating to the latest drivers for my card. It too is NVIDIA. $\endgroup$
    – Edmund
    Commented Mar 21, 2017 at 1:53
  • $\begingroup$ @MichaelStern Thanks for the information. $\endgroup$ Commented Mar 21, 2017 at 1:56
  • $\begingroup$ @Edmund I think I do, since there is no problem using version 11.0. Also Mathematics seems to use the cuda library it comes with rather than the one on the system. $\endgroup$ Commented Mar 21, 2017 at 1:59
  • 1
    $\begingroup$ @Edmund Indeed that maybe the reason. I thought Mathematica uses the cuda library it installed with, but as I looked closer it doesn't seem to be ture for version 11.1. Comparing the folder /SystemFiles/Components/MXNetLink/LibraryResources/ we see that cuda library is present in version 11.0 but not in version 11.1. $\endgroup$ Commented Mar 21, 2017 at 2:08

1 Answer 1



The mac support has been brought back in version 11.1.1. And according to my test on MNIST example in the documentation, the GPU training is now 3X faster than version 11.0.

Per info in the thread below, OSX support has been deprecated in 11.1, but will be brought back soon.

NetTrain TargetDevice GPU error

The relevant quotes by Sebastian Bodenstein:

After Apple failed to provide any new Macs with NVIDIA GPU's in its latest update round, we made the decision that it would not be worth the development time for us to continue supporting GPU training for the few older Mac models that have NVIDIA GPU's (I have one myself), when none of the last 3 generations of Mac have any NVIDIA GPU's. So we have unfortunately deprecated GPU support for neural networks on OSX.

we have decided to resume GPU support for OSX. We are working on a paclet update that we are hoping to release soon. Apologies again for the inconvenience caused!

  • $\begingroup$ On my machine (750M like OP) GPU training is now 100 times slower than CPU training. $\endgroup$
    – Szabolcs
    Commented May 7, 2017 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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