News for hackers. Stuff that matters.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by codelord on Tuesday June 08, 2021 @08:22PM (#27442785)
M1 and AMD GPU support. I'm personally more interested in the latter as I haven't yet upgraded my MacBook Pro and I expect that my Vega 20 to be faster than M1 at ML training.

The raw compute power of M1's GPU seems to be 2.6 TFLOPS (single precision) vs 3.2 TFLOPS for Vega 20. This can give you an estimate of how fast it would be for training.

Just for reference Nvidia's flagship desktop GPU(3090)'s FP32 performance is 35.5 TFLOPS.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by ksec on Wednesday June 09, 2021 @12:20AM (#27444186)
So Apple would need 16x its GPU Core, or 128 GPU Core to reach Nvidia 3090 Desktop Performance. Or roughly 480mm2 Die Size, 192W TDP excluding memory controller and interconnect.

Doesn't look too bad for Nvidia, especially when you consider 3090 is still on Samsung 8nm, which is equivalent to TSMC 10nm, compared to 5nm on Apple M1.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by defaultname on Wednesday June 09, 2021 @09:26AM (#27447598)
If Apple could just scale up their GPU and trounce a 430B market cap competitor's premiere product at 1/2 the power, 60% of the die size, that actually looks pretty bad for nvidia, doesn't it? Scaling is more difficult than that, and who knows if they could so easily, but who thought Apple would render both Intel and nvidia irrelevant?

Regardless, Apple's threat to vendors like that is their complete vertical integration. Ran some of the new object capture code (photogrammetry) on my M1 Mac yesterday and in no time at all the 11 trillion op neural engine blasted through and generated a remarkable model. We've seen Apple respond to discovered performance needs by plugging in a matrix engine, a neural engine, and scaling appropriately, dedicating cores and silicon to the greatest needs. They are in a very unique position relative to someone like nvidia who effectively throws something over a fence.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by smoldesu on Wednesday June 09, 2021 @10:46AM (#27448491)
That's besides the point though. You can't pick and choose which workloads you're going to run on Apple Silicon, because the ultimate goal is that it will be able to compete with with the rest of the industry in raw performance metrics, which is simply not the case right now. My M1 Mac's GPU still loses in several benchmarks against my 7-year-old 1060. If Apple wants to lure people like me into their pro segment, they're going to need to scale aggressively: something that ARM has notoriously had trouble with in the past.

Also, Apple desperately needs to support a real graphics API. Metal is a joke, and even the translation tools like MoltenVK, while impressive, still end up beholden to Apple's arbitrary limitations. If they don't end up supporting Vulkan on the M1, it's a moot point for me. You could have the most powerful GPU in the world, but I won't use it if it's bottlenecked by the shittiest modern graphics API.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by defaultname on Wednesday June 09, 2021 @11:14AM (#27448869)
"My M1 Mac's GPU still loses in several benchmarks against my 7-year-old 1060."

The GPU in the AS M1 is the fastest integrated graphics available in the mainstream computing market [1]. That is the competition, not a standalone, 120W GPU. Apple is purportedly now working on separating their GPU designs into a much larger heat and power profile (which contrary to some of the comments on here clearly isn't going to be for laptops, beyond an external TB4 enclosure) and it might just change things a bit.

Scaling a GPU is easier than scaling a CPU, by design. Apple's GPU has nothing to do with ARM.

And to your original point, yes, Apple does largely choose which workloads run on Apple Silicon and how. By controlling the APIs along with the silicon, Apple abstracts it to a degree that gives them enormous flexibility. The Accelerate and CoreML APIs are abstract vehicles that might use one or a thousand matrix engines, neural nets, or an array of GPUs. Apple has built a world where they have more hardware flexibility than anyone. And while close to no one is doing model training on Apple hardware right now, Apple has laid the foundation so a competitive piece of hardware could change that overnight.

[1] The SoC graphics of the chips in the PS5 and Xbox Series X have more powerful graphics, but the GPU chiplet alone on those systems uses a magnitude more power and more die than the entire M1 SoC. In another comment you mentioned that Zen 2 integrated graphics come close. They aren't within a ballfield, literally with 1/4 or worse the performance. In discussions like this unfortunately the boring "n years old / n process" trope is used to excess, yet again there are zero competitive integrated graphics on the market. None. Apple isn't a GPU company, yet here we are.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by smoldesu on Wednesday June 09, 2021 @01:53PM (#27450941)
> They aren't within a ballfield, literally with 1/4 or worse the performance.

Bzzzzt

We aren't comparing performance-per-watt, we're comparing raw compute for the price.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by defaultname on Wednesday June 09, 2021 @02:12PM (#27451155)
Oh, are we? Seems like we're kind of all over the map in here. Whatever particular teased angle apparently wins the argument or something.

All while Apple keeps executing superbly. Eh.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by komuher on Wednesday June 09, 2021 @02:24AM (#27444841)
This won't scale like this, also for deep learning CUDA and CUDNN will be still probably 2-5x faster then AMD/Metal drivers as was proven before (in case of AMD shitty deep learning drivers)
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by smoldesu on Wednesday June 09, 2021 @10:49AM (#27448535)
This. Nvidia's CUDA is a genuine technical marvel, and Metal really has nothing that can compete with it. I also get the feeling that unless Apple bites the bullet and supports Vulkan, they won't actually get any good GPU libs.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by Joeri on Wednesday June 09, 2021 @01:08AM (#27444423)
The rumors say they’re going to have a high end of 128 gpu cores by using 4 32 gpu core chiplets.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by dharma1 on Wednesday June 09, 2021 @08:00AM (#27446906)
wouldn't that require pretty hefty active cooling, which doesn't fit so well with Apple devices?

It would be great if they did it the eGPU route with TB4, in a slick package

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by Tagbert on Wednesday June 09, 2021 @12:48PM (#27450129)
This is more for the Mac Pro line. Not so much the laptops.

We’ve only see the Apple equivalent of the i3 with integrated graphics. It’s going to get interesting over the next several months as Apple unveils their middle and upper performance solutions.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by dahfizz on Wednesday June 09, 2021 @08:52AM (#27447305)
Does that mean they will actually produce a laptop with adequate cooling? Might be worth looking at.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by buffington on Thursday June 10, 2021 @05:54PM (#27466313)
I own an M1 Macbook Air. At its hottest, it's a fraction of the "normal" heat that my year old Intel based Macbook Pro runs at.

To get the M1 warm, I need to be charging it while also playing an Intel based game like the latest Subnautica, with the machine on my lap. Even then, it's not as hot as my Macbook Pro gets while unplugged and browsing the internet.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by ababaiem on Wednesday June 09, 2021 @10:23AM (#27448209)
No. According to rumours: the high-end 64-128 GPUs will be exclusively for the Mac Pro and the MacBook Pro will have 16-32 cores GPUs instead. It think it's fair to assume that we won't see much changes with the cooling for their laptops.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by mjlee on Wednesday June 09, 2021 @07:27AM (#27446658)
https://www.bloomberg.com/news/articles/2021-05-18/apple-rea...

That is exactly what the rumours suggest Apple is working on.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by mtgx on Wednesday June 09, 2021 @01:44AM (#27444612)
Doesn't 3090 use well north of 400W of power?
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by 0-_-0 on Wednesday June 09, 2021 @05:09AM (#27445832)
The 3090 has a 350W TDP
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by jra101 on Tuesday June 08, 2021 @09:21PM (#27443152)
Vega 20 should be ~13.8 TFLOPs (single precision): https://www.anandtech.com/show/13923/the-amd-radeon-vii-revi...
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by codelord on Tuesday June 08, 2021 @09:51PM (#27443334)
Seems like AMD has been using Vega 20 to refer to two different things.

I was talking about the mobile GPU on MacBook Pros which is based on a 14nm chip. The full name is Radeon Pro Vega 20:

https://www.amd.com/en/graphics/radeon-pro-vega-20-pro-vega-...

https://www.techpowerup.com/gpu-specs/radeon-pro-vega-20.c32...

Vega 20 seems to also refer to a discrete GPU. This has been later rebranded to Radeon VII (maybe because of this confusion). The number you are quoting is for the discrete GPU.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by jra101 on Wednesday June 09, 2021 @12:17AM (#27444173)
Huh, I had no idea they used Vega 20 both as a codename and a product name. Confusing.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by floatboth on Wednesday June 09, 2021 @07:35AM (#27446717)
Same with 10 LOL. VEGA10 codename is for the original Vega Frontier Edition/RX Vega 56/RX Vega 64. But now there's also "Vega 10" used as a description for the 10 Vega compute units on Ryzen APUs.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by andy_ppp on Wednesday June 09, 2021 @07:22AM (#27446636)
Interesting that AMD is supported, could this mean Apple Silicon 16inch MBP with an AMD GPU?
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by defaultname on Wednesday June 09, 2021 @09:10AM (#27447453)
A large number of Apple devices in the field, and even still for sale by Apple, have AMD GPUs. It's most likely legacy support driving its inclusion -- if Apple abstracted the pluggable device, appropriately branching it for their existing AMD and new chips seems a given.

It's extremely doubtful any new Apple Silicon device will come out with AMD GPUs.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by orik on Tuesday June 08, 2021 @10:06PM (#27443428)
I wanted this for a long time, but eventually gave up on my MacPro5,1 that I had a Radeon VII in (before that, Vega Frontier, before that R9-280X).

Would like to see some benchmarks with that sort of hardware or with a 6900XT, driver support which came to MacOS only recently. Now I just have an M1 Mac Mini & a PC with Nvidia.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by truth_ on Wednesday June 09, 2021 @05:56AM (#27446142)
PyTorch currently provides RoCM support. Has anyone tried that?
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by yza on Wednesday June 09, 2021 @06:17AM (#27446251)
I tried it on a Radeon VII. It is little hard to get running as it does not work with latest kernel, but otherwise it kind of works with some quirks. One of the quirks is the first epoch of your training is very slow to start compared to Nvidia cards. Also, the speed of training is slow.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by 6gvONxR4sf7o on Tuesday June 08, 2021 @10:00PM (#27443398)
> Just for reference Nvidia's flagship GPU(3090)'s FP32 performance is 35.5 TFLOPS.

In context of ML, nvidia’s flagship is the A100, which has 312 TFLOPS. You can also compare with a TPU device which has 180 TFLOPS (v2) or 420 TFLOPS (v3). You can use at least the TPU v2 reliably on colab for free.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by codelord on Tuesday June 08, 2021 @10:12PM (#27443480)
It's not really fair to compare a discrete GPU to a mobile GPU, I only provided this as a comparison for someone who maybe has one of these at home. And btw, you are talking about TF32 performance not FP32. TF32 actually uses 16 bits. A100's FP32 performance is actually lower than 3090, it's 19.5 TFLOPS: https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Cent...

FP16 performance is also relevant as a lot of people now train in FP16. The default for pytorch/TF is still FP32.

Re:Apple M1 support for TensorFlow 2.5 pluggable device API by rubatuga on Wednesday June 09, 2021 @12:00AM (#27444085)
TF32 is 19 bits! Default for pytorch and TF is TF32!
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by codelord on Wednesday June 09, 2021 @12:51PM (#27450182)
Oops. You are right.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by 6gvONxR4sf7o on Tuesday June 08, 2021 @10:24PM (#27443553)
I’ve been mostly using TPUs lately and non-TF32 GPUs at work, so I don’t have any practical experience with TF32, but the sales pitch seems pretty good. Do you have any personal experience on whether it’s as much of a drop in replacement for fp32 as they suggest?
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by codelord on Tuesday June 08, 2021 @10:30PM (#27443591)
I haven't used TF32 personally, but I think the sales pitch is not too far off. Most of the time I use mixed-precision training which should be similar to FP16/TF32 in terms of performance. It does tremendously speed up training.
Re:Apple M1 support for TensorFlow 2.5 pluggable device API by fartcannon on Tuesday June 08, 2021 @10:07PM (#27443434)
The free part is limited to a set number of hours per month.