7

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.

gwr
  • 13,452
  • 2
  • 47
  • 78
xslittlegrass
  • 27,549
  • 9
  • 97
  • 186
  • There are some bugs in 11.1. Just report it using Help/Give Feedback, they'll fix it – Michael Stern Mar 21 '17 at 01:50
  • 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. – Edmund Mar 21 '17 at 01:53
  • @MichaelStern Thanks for the information. – xslittlegrass Mar 21 '17 at 01:56
  • @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. – xslittlegrass Mar 21 '17 at 01:59
  • I didn't have an issue in version 11.0 either but there have been changes in 11.1 and the issue was fixed by updating the graphics driver. Bear in mind that the first thing support is going to recommend is that you update your driver to the latest version. So you could save yourself some time by doing so. – Edmund Mar 21 '17 at 02:00
  • 1
    @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. – xslittlegrass Mar 21 '17 at 02:08
  • No way to fix it, it is by design. – M.R. Mar 21 '17 at 17:50
  • @M.R. By design to drop GPU support on mac? Did you get that from tech support? – xslittlegrass Mar 21 '17 at 18:19
  • Yes, since Macs dropped Nvidia cards in 2014 – M.R. Mar 21 '17 at 19:29
  • They should have left the support in for the remaining older macs that have nvidia cards, but I guess it was easier to not – M.R. Mar 22 '17 at 05:18
  • @Edmund You mentioned that you solve the problem by update the graphics driver, so what graphics card do you use? – xslittlegrass Mar 22 '17 at 18:17
  • @M.R. I'm wondering what's the reason make them drop the support in version 11.1 if they already made it work in version 11.0 – xslittlegrass Mar 22 '17 at 18:18
  • @xslittlegrass Nvidia GeForce GTX 860M (4GB GDDR5 RAM). Will add driver version when I get home. – Edmund Mar 22 '17 at 21:28
  • @xslittlegrass Forgot to add driver version: 376.33 released 13 Dec 2016. – Edmund Mar 28 '17 at 02:45
  • @Edmund Where did you download the driver? I can't find the link for mac driver on nvidia.com – xslittlegrass Mar 28 '17 at 03:10
  • @xslittlegrass It downloaded in the GeForce Experience app. Version 378.92 released 19 Mar 2017 is the latest version but everything is working on my computer so I am not bothering to upgrade. – Edmund Mar 28 '17 at 03:13
  • @Edmund It seems that GeForce Experience app is a Windows only app? – xslittlegrass Mar 28 '17 at 03:16
  • @xslittlegrass I think the driver version numbers are different between OS. Look for a driver realised around the same time or get the latest driver for your card and OS. – Edmund Mar 28 '17 at 03:21
  • @Edmund Are you using windows or mac? It seems that this problem only occurs for mac. – xslittlegrass Mar 28 '17 at 03:23
  • @xslittlegrass Windows 8.1 – Edmund Mar 28 '17 at 03:27
  • Have you tried this in 11.1? It works but it is 100x times slower than CPU training. – Szabolcs May 07 '17 at 07:14
  • @Szabolcs I'm actually experiencing a 3X speedup compared to GPU in 11.0. And both are about an order of magnitude faster than CPU training. If I remembered correctly, we both have a 750M graphics card on mac. Could you post your test code in the room "neural network"? – xslittlegrass May 07 '17 at 15:12

1 Answers1

5

Update

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!

xslittlegrass
  • 27,549
  • 9
  • 97
  • 186
Gregory Klopper
  • 1,370
  • 9
  • 21