2
$\begingroup$

I'm thinking about getting some new top of the line computer hardware, specifically a MacBook Pro from Apple. These have AMD Radeon Pro 5500M GPUs, which while a bit slower than something like an NVIDIA RTX 3000 is still much faster than the integrated Intel GPU and it seems like Apple highest specced laptop should be a good candidate for a fast Mathematica machine.

However, in reviewing Mathematica's support for the AMD Radeon Pro 5500M GPU, it seems like first, one would need to use OpenCL, but the 5500M is not listed. This question suggests that OpenCL is deprecated, but further following some links I found an initiative announced a few years ago for doing CUDA on AMD GPUs. However, I don't see any indication that this ever went anywhere. I'm interested in both machine learning and other things in Mathematica that could be accelerated by a GPU, but I'm a bit puzzled as to whether I would be making a mistake buying a high end Apple laptop or if technology has really progressed further by this time than my research suggests.

Is there support for the GPUs in the latest MacBook Pros in Mathematica 12 or known to be in the pipe for near release in the future?

Update: I also found this article which suggests that no Apple product across its entire lineup in the future will ever even be able to have CUDA support, which seems pretty dire to me!

$\endgroup$
  • 1
    $\begingroup$ Nope. Support for OpenCL in Mathematica is basically not existent. As far as I know, the machine learning stuff works only with CUDA capable GPUs. Most parts of Mathematica are not programmed so that they can accelerated by any GPU. So for working with Mathematica, one should go for best affordable CPU, a lot of fast memory, and an SSD. $\endgroup$ – Henrik Schumacher Apr 11 at 21:42
  • $\begingroup$ This states that only CUDA would work for training of neural networks: reference.wolfram.com/language/workflow/…. $\endgroup$ – Henrik Schumacher Apr 11 at 21:45
  • $\begingroup$ "Only NVIDIA GPUs with the following compute capabilities are currently supported:" reference.wolfram.com/language/ref/TargetDevice.html $\endgroup$ – Henrik Schumacher Apr 11 at 21:46
  • 1
    $\begingroup$ @HenrikSchumacher sigh sad... considering that Mathematica 1.0 was practically designed for NeXTStep, the practical ancestor of OS X today. $\endgroup$ – Michael Apr 11 at 21:59
4
$\begingroup$

It's possible that MXNet (the underlying NN framework) will eventually support OpenCL (https://github.com/apache/incubator-mxnet/issues/621 is the issue to track) but I would not hold out for this, since OpenCL support in MacOS has been deprecated for two years.

Even an external GPU will not save you here since Apple do not support non-AMD external GPU cards.

Mac users will only be able to support GPU training within Mathematica if:

  • MXet begins to support OpenCL (before MacOS completely removes it)
  • Apple's own low-level graphics API, Metal, has a large amount of NN-specific work poured into it and MXNet begins to support it
  • Apple begins to ship NVIDIA GPUs again
  • Wolfram support training of Neural Networks on cloud GPUs
  • You build a Hackintosh

In my opinion, Wolfram is reasonably likely to begin support cloud training in future. It's also plausible to hack this together yourself.

At the end of the day, don't buy an Apple computer if you wish to do a lot of GPU-related computation in Wolfram Language today. (Personally I have been eyeing up one of System76's offerings to replace my Macbook Pro for this reason)

| improve this answer | |
$\endgroup$
  • $\begingroup$ Linux support for NVIDIA is good then? I know in the past there have been issues... $\endgroup$ – Michael Apr 12 at 18:42
  • $\begingroup$ I suppose one could still run Mathematica under Windows through BootCamp, but that seems a rather weird solution. Maybe Wolfram will implement Metal support someday... $\endgroup$ – Michael Apr 13 at 3:38
  • 3
    $\begingroup$ Honestly, I'm not sure just how good the support is, but most large-scale neural networks are trained on cloud GPUs on servers which run Linux, so it must be less than terrible for this use case. I believe Wolfram already support Metal as a rendering engine for 3D graphics, but it must be said that Metal isn't a drop-in for OpenCL unfortunately. $\endgroup$ – Carl Lange Apr 13 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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