Live data from Hacker News

Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

wandb.ai

31–40 of 94 posts

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#31

>We can see better performance gains with the m1 when there are fewer weights to train likely due to the superior memory architecture of the M1. Wasn't this whole "M1 memory" thing decided to be a myth now some more technical people have dissected it?

Myth or not, it's memory bandwidth is amazing, so I guess that helps.

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#32
post #21

Earlier quoted context omitted.

You would instead buy a used 1080 (no ti) for similar performance. The special thing about the V100 is that it's driver EULA allows data center usage. If you don't need that, there are other much cheaper options.

"Similar performance" still means 30%-50% slower [1] and half the RAM, not really that comparable. For much closer performance you should get a 2080ti, which should be roughly comparable in speed and have 11GB [edit: wrongly wrote 14GB before] of memory (against the 16GB for the V100). Price-wise you still save a lot of money, after quickly googling around, roughly $1200 vs. $15k-$20k. But you still lose something, e…

For my workload (optical flow) I was honestly surprised to see that the Google Cloud V100 was not faster than my local GTX 1080. So I guess that varies a lot by how you're training, too.

For many of my AI training workloads, already the 1080 is "fast enough" and the CPU or SSDs are the bottleneck. In that case, GPU doesn't really matter that much.

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#33

"trainable_params 12,810" laughs (for comparison, GPT3: 175,000,000,000 parameters) Can Apple's M1 help you train tiny toy examples with no real-world relevance? You bet it can! Plus it looks like they are comparing Apples to Oranges ;) This seems to be 16 bit precision on the M1 and 32 bit on the V100. So the M1-trained model will most likely yield worse or unusable results, due to lack of precision. And lastly, the…

> The V100 only gets 14 TFLOPS because it lacks the dedicated TensorRT accelerator hardware.

V100 has both vec2 hfma (i.e. fp16 multiply-add is twice the rate of fp32), getting ~30 TFLOPS, and tensor cores which can achieve up to 4x that for matrix multiplications.

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#34

>We can see better performance gains with the m1 when there are fewer weights to train likely due to the superior memory architecture of the M1. Wasn't this whole "M1 memory" thing decided to be a myth now some more technical people have dissected it?

Could you please provide some resources on how the unified memory model supposedly works? Why is it a "myth"?

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#35
I categorize this as an exploration of how to benchmark desktop/workstation NPUs [1] similar to the exploration Daniel Lemire started with SIMD. Mobile SoC NPUs are used to deploy inference models on smartphones and IoT devices while discreet NPUs like Nvidia A100/V100 target cloud clusters.

We don’t have apples-to-apples benchmarks like SPECint/SPECfp for the SoC accelerators in the M1 (GPU, NPU, etc.) so these early attempts are both facile and critical as we try to categorize and compare the trade-offs between the SoC/discreet and performance/perf-per-watt options available.

Power efficient SoC for desktops is new and we are learning as we go.

[1] https://en.m.wikipedia.org/wiki/AI_accelerator

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#36

no reading if it is forced to use js. your ideas does not even matter if you wish me to use js to just learn what your ideas are.

This is OT, but since this comment is already here: I usually browse HN on WP8.1 with IE11. Now I don't expect people to care for that platform anymore in 2021, but in this case it was especially ridiculous since the page actually loaded the full article, but then about 5 seconds later it was replaced by a "oops something went wrong..." message.

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#38

Earlier quoted context omitted.

Yes and you'll see parameters tuned for V100, not parameters tuned for m1 somehow limping along on a V100 in emulation mode. I wouldn't complain about a benchmark executing any real world SOTA model on m1 and V100, but those will most likely not even run on the M1 due to memory constraints. So this article is like using an ios game to evaluate a Mac pro. You can do it, but it's not really useful.

You can count the number of GPUs having more than M1 memory(16 GB) in a single hand.

Isn't the M1 GPU memory shared with everything else? Can the GPU realistically used that much? Won't the OS and base apps use up at least 2-3GB?

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#39
post #21

Earlier quoted context omitted.

"Similar performance" still means 30%-50% slower [1] and half the RAM, not really that comparable. For much closer performance you should get a 2080ti, which should be roughly comparable in speed and have 11GB [edit: wrongly wrote 14GB before] of memory (against the 16GB for the V100). Price-wise you still save a lot of money, after quickly googling around, roughly $1200 vs. $15k-$20k. But you still lose something, e…

For my workload (optical flow) I was honestly surprised to see that the Google Cloud V100 was not faster than my local GTX 1080. So I guess that varies a lot by how you're training, too. For many of my AI training workloads, already the 1080 is "fast enough" and the CPU or SSDs are the bottleneck. In that case, GPU doesn't really matter that much.

Yes that might be the case. In my case I mostly trained big (tens to hundreds of millions of parameters) networks mostly made of 3x3 convolutions, and I think the V100 has dedicated hardware for that. Then as I mentioned you can get a further 2x speedup by using half precision.

If you train smaller models, or RNN, you probably lose most of the gains of dedicated hardware. But I guess that for this same reason the experiments in the article are little more than a provocation, I don't know if you could train a big network in finite time on M1 chips...

That said, of course, if the budget was mine, I wouldn't buy a V100 :-)

Re: Analyzing the performance of Tensorflow training on M1 Mac Mini and Nvidia V100

#40

>We can see better performance gains with the m1 when there are fewer weights to train likely due to the superior memory architecture of the M1. Wasn't this whole "M1 memory" thing decided to be a myth now some more technical people have dissected it?

No. Some technical people just gave their non-definitive two cents.
Post reply on HN