Group Abstract Group Abstract

Message Boards Message Boards

NetTrain TargetDevice GPU error

Posted 9 years ago

When I add the option TargetDevice->"GPU" to NetTrain in Mathematica 11.0.0.0 I get the error 'First argument to NetTrain should be a fully specified net'. Is this broken in 11.0.0.0?

47 Replies
Posted 5 years ago

Given the Mac Pro and the latest powerful MacBook pros, etc. Wolfram should implement Metal support so that we can get GPU acceleration even on modern hardware without NVIDIA GPUs... Any words on this from Wolfram? They also advertise OpenCL compatibility, that framework was an open source effort from Apple to abstract away CUDA so that it would also work on non-NVIDIA gpus.. I guess it's Metal now. The documentation at https://reference.wolfram.com/language/OpenCLLink/tutorial/Setup.html#10897850 looks outdated. Given that Apple will likely add/switch to ARM processors even for Macs in a year or two, I hope Wolfram gets up to speed on adopting Metal asap. On top of that the processor in the iPad Pro is already more powerful than some mac notebooks (GPUs included).

POSTED BY: maxscience n

Hi everyone,

I have just posted a CUDA how-to for Mac users. When training neural network I see a speed increase of more than 300 wrt to CPU computation.

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 9 years ago

Just having updated to MM 11.1 and finding out that GPU training on Mac OS X fails without any announcement or description in the Documentation of Nettrain[]. As for other users in the forum also for our organization this makes it difficult for us to use Mathematica as training platform for MachineLearning. In our algorithm development department, we have mainly 15" MacBook Pro Mid/Late 2013 notebooks deployed, all with GPUs, also for CUDA/OpenCL Programming within Mathematica (still have to check that CUDALink and OpenCLLink both function in MM 11.1). A consistent GPU support across all platforms, including CUDA where available and OpenCL (works fine with many core CPUs or AMD GPUs) is a great plus for Mathematica.

POSTED BY: Tobias Kramer

Recently the moderators have had to remove posts or parts thereof. These actions involve posts that strayed, either outside the scope of this forum, or actual propriety. We ask that posters refrain from comments that fall outside such bounds. Please make sure you are familiar with the forum rules: http://wolfr.am/READ-1ST

POSTED BY: EDITORIAL BOARD

Another cloud option everyone can use is this.

Running Mathematica on the Cloud with Rescale.

Video: https://support.rescale.com/customer/en/portal/articles/2651932-running-mathematica-on-the-cloud-with-rescale

POSTED BY: Manjunath Babu

It is not available on my Macbook Pro because it doesn't have a GPU graphics card. My Nvidia 1080 card on my PC works well.

POSTED BY: David Johnston

I suppose you are running a custom Linux machine rather than a normal out of the box Mac. I guess that is one way to get a GPU on Mac OS but it won't solve your CUDA SDK problem. Probably something you should disclose rather than making it seem like anyone who thinks GPU support wouldn't normally be available on Mac's is an idiot.

That is very cool that you had it working on 11.0. Congrats on that. Last summer, I was not able to use GPU on either my iMac nor my Macbook Pro. Wolfram Support told me that most Mac's don't generally have GPU's so I figured it was a general truth. I found a couple external GPU options but none were really more cost effective over just buying a new Alienware with 1080 GPU, which I did.

POSTED BY: David Johnston
Posted 9 years ago

Seems that the GPU ability of NeuralNetwork is not supported in 11.1, this works fine on 11.0 on OS X MMA 11.1 GPU support no on OS X

POSTED BY: David Proffer

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.

Apologies for the inconvenience this has caused.

Posted 9 years ago

Understand the challenges, but a rather unfortunate way to announce this. Strung people on in the betas, no official statement before or at 11.1 release, your premier support portal was down yesterday after 11.1 release so no way to ask as paid customer and Apple and NVIDIA still fully support a set of NVIDIA GPU's on OS X.

POSTED BY: David Proffer

Does this mean that OSX users who previously used nVidia cards with an eGPU over Thunderbolt (e.g. Akitio Node or BizonBox) will no longer be able to do so in v11.1? I was planning on purchasing such a set-up myself (c. $550 for Akitio Node and a used GeForce 980Ti 6GB). Update: Nevermind, I see now from the context that the answer is likely 'yes' – this won't work anymore.

POSTED BY: Arno Bosse
Posted 9 years ago
Attachments:
POSTED BY: David Proffer

Oh, what an unfortunate choice! I just bought 4 BizonBoxes at the beginning of this year only because of the Neural Network framework of Mathematica. It worked really nicely for MMA 11.0.1 on OSX and opened up the large and powerful new expansion of the Wolfram Language. This decisions cuts all OSX users off a large chunk of the new development in the Wolfram Language.

I also do not think that it is just the few old OSX legacy devices with GPUs that you stop supporting, but it is cutting off OSX users from using other techniques to access the neural network framework. It appears that much of the development of the Wolfram Language goes in the direction of machine learning. GPUs are crucial for that. Training times on my networks went down from a day to a couple of minutes.

I believe that there were several solutions available so that OSX users could make use of this exciting new development in the Wolfram Language, but this decision seems to cut all of us off, which is unfortunate I think.

Best wishes,

Marco

POSTED BY: Marco Thiel

@Marco Thiel, @David Proffer, @Arno Bosse: We are looking into a solution to this. I will have an update for you within a week.

POSTED BY: Arno Bosse

Dear Sebastian,

thank you very much for that helpful reply. I will try to find some time to post some easy instructions of how to make the BizonBox work with Mathematica and show some benchmarks.

Thanks a lot,

Marco

EDIT: Sorry for that. I have fixed the thing. Actually, it works better now than in 10.4. I did not need to perform one step and that caused trouble now. The thing works out of the box.

POSTED BY: Marco Thiel
Posted 9 years ago
POSTED BY: David Proffer
Posted 9 years ago
POSTED BY: David Proffer

Dear Sebastian,

it is great to see that the GPU framework is enabled for Mac users again. I was just wondering one thing. As I was preparing a post with instructions of how to use the Bizon Box with Mathematica I tried to run some old code. It appears that the option "CompilerInstallation" is not valid anymore. Is that by design?

Best wishes,

Marco

POSTED BY: Marco Thiel

It's working great for NetChain on my Nvidia 1080. However, doesn't look like they built GPU support for Classify and Predict with

Classify[trainingData, {Method -> "NeuralNetwork", 
  PerformanceGoal -> "Quality", TargetDevice -> "GPU"}]

Wish it did though! Put that on the list.

POSTED BY: David Johnston

This issue seems to be resolved in version 11.1 (at least for my GTX 1050)!

Gijsbert

Hello,

I'm training a Neural Network and its taking a lot of time. So, in my NetTrain[] function, I set an additional parameter TargetDevice->"GPU". I got this error message.

enter image description here

I'm using a MacBook Pro with "Intel Iris Graphics 6100 1536 MB" Graphics card.

Is it possible to set this as my GPU and train my Neural Network? Is there any alternate way to connect to a cloud to train my Neural Network?

POSTED BY: Manjunath Babu

We only support NVIDIA GPU's at the moment. So your Intel GPU won't work.

Wolfram Cloud also doesn't have any GPU's at the moment. You would need to use EC2 or Google Cloud yourself to make use of their GPU's.

@Sabastian, Is there a way to use Google Cloud GPU's for training NetChain other than having an extremely expensive Enterprise Network license?

POSTED BY: David Johnston

I have upgraded to a GTX 1050 with compute capability 6.1 and my error is gone. The training results are wrong however. Without TargetDevice->"GPU" the results are OK, but with TargetDevice->"GPU" I am seeing this while training:

TargetDevice GPU

and the resulting recognition is also very poor. I am running Mathematica 11.0.1.0 on 64-bit Ubuntu 4.4.0-51-generic, the Nvidia driver version is 875.20 and the CUDA version is 8.0.

How can I troubleshoot this?

GW

POSTED BY: David Johnston

Here is the error I am getting:

Classify::optx: Unknown option TargetDevice in Classify[{1->One,2->Two,3->Three,4->Four},{Method->NeuralNetwork,PerformanceGoal->Quality,TargetDevice->GPU}].
POSTED BY: David Johnston

No, Classify has no support for GPU (as you can see from docs).

POSTED BY: David Johnston

Should this code work in Mathematica 11 on a Dell Alienware with Nvidia GPU 660?

data = {1 -> "One", 2 -> "Two", 3 -> "Three", 4 -> "Four"};
Classify[data, {Method -> "NeuralNetwork", 
  PerformanceGoal -> "Quality", TargetDevice -> "GPU"}]
POSTED BY: David Johnston
Posted 9 years ago
POSTED BY: Gregory K

I am running Mathematica on Ubuntu 16.04. Here is the same info for my system:

enter image description here

Perhaps it is related to the CUDA Compute Capabilities of my Geforce GTX 460.

Gijsbert

POSTED BY: Shenghui Yang
POSTED BY: Sean Clarke
Attachments:
POSTED BY: Sean Clarke
POSTED BY: Sean Clarke

I have attached the second example as a Notebook. It works as designed without TargetDevice->"GPU", but fails if you specify that option.

GW

Attachments:

Hi,

I first tried the following example available on the Wolfram website:

http://www.wolfram.com/language/11/neural-networks/accelerate-training-using-a-gpu.html?product=mathematica

That failed, so I then tried to modify the following example that is also available on the Wolfram website:

http://www.wolfram.com/language/11/neural-networks/digit-classification.html?product=mathematica

It works until you modify the NetTrain command and add TargetDevice->"GPU". That results in the same error.

GW

Can you post your full example that you think should be working? Its impossible to debug this without more information.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard