News for hackers. Stuff that matters.
Re:Which GPUs to get for deep learning by tbenst on Monday September 07, 2020 @07:36PM (#24403825)
I appreciate the time and care that went into this post, and there’s a nice discussion of various features.

Unfortunately the performance charts are completely devoid from reality, and in particular the discussion on tensorcores may be true from an instruction count perspective but does not reflect any third-party benchmark I’ve seen. For example: https://lambdalabs.com/blog/2080-ti-deep-learning-benchmarks.... Nvidia has a history of straight-up-lying about tensorcore and other benchmarks (for example, see this thread from right after Nvidia announced an 8x improvement in speed on imagenet in tensorflow for V100: https://github.com/tensorflow/benchmarks/issues/77)

In general, fp16 is only 30-40% faster than fp32, and occasionally 2x in really optimal conditions.

Re:Which GPUs to get for deep learning by nl on Monday September 07, 2020 @07:49PM (#24403895)
> Unfortunately the performance charts are completely devoid from reality, and in particular the discussion on tensorcores may be true from an instruction count perspective but does not reflect any third-party benchmark I’ve seen. For example: https://lambdalabs.com/blog/2080-ti-deep-learning-benchmarks...

The performance numbers posted here appear to almost exactly reflect the LambdaLabs numbers.

Lambda Labs: the RTX 2080 Ti is 96% as fast as Titan V, 73% as fast as Tesla V100 (32 GB)

timdettmers: RTX 2080 Ti normalized to 1, Titan V looks about 1.1 to 1.2, V100 is just below 1.5

> for example, see this thread from right after Nvidia announced an 8x improvement in speed on imagenet in tensorflow for V100

Well a non-NVidia person managed to get it up to just above 4x improvement without "using unreleased libraries from NVIDIA". From the same thread: https://github.com/tensorflow/benchmarks/issues/77#issuecomm...

In my experience NVidia benchmark numbers in deep learning are rarely lies - they are highly optimised, in optimal conditions and rarely achievable in the real world. About what you'd expect from a vendor benchmark.

Re:Which GPUs to get for deep learning by tbenst on Monday September 07, 2020 @11:58PM (#24405071)
Thank you for cross-referencing that, the data does look accurate and my statement now seems exaggerated. I do think we need skepticism on the A100 charts though until third party benchmarks.

> In my experience NVidia benchmark numbers in deep learning are rarely lies - they are highly optimised, in optimal conditions and rarely achievable in the real world.

Right, but Nvidia claimed 1360 images/sec for resnet-50 on imagenet. To my knowledge this still hasn’t been realized by a third party. It also isn’t a 4x improvement for fp32 vs fp16, that’s comparing to previous generation. Improvement is more like 1.5x: https://lambdalabs.com/blog/best-gpu-tensorflow-2080-ti-vs-v...

Even in very simple synthetic benchmarks the speed up is only 2x: https://github.com/tensorflow/benchmarks/issues/77#issuecomm...

I have not seen any benchmarks showing an 8x speedup. Have you? If not -> Nvidia lied.

Re:Which GPUs to get for deep learning by nl on Tuesday September 08, 2020 @01:32AM (#24405472)
> Right, but Nvidia claimed 1360 images/sec for resnet-50 on imagenet.

On https://images.nvidia.com/content/technologies/volta/pdf/vol... they claim 1,525 images/sec (!)

Dell hit 5,243 images/sec with one of their 4 V100s servers, which comes to 1,310 images/sec per V100. I find it very believable that NVidia would get ~200 images/sec more, since Dell jumped 50% with a change in their CPU/GPU connection topology.

See https://www.dell.com/support/article/en-au/sln317397/deep-le...

Re:Which GPUs to get for deep learning by nl on Tuesday September 08, 2020 @10:11AM (#24408527)
Also I just noticed that Google's XLA gets 1278 images/second on a single V100 in FP16 mode.

https://www.tensorflow.org/xla

Re:Which GPUs to get for deep learning by tbenst on Tuesday September 08, 2020 @03:48PM (#24412273)
Thank you for finding that! I’m glad to see the situation has improved since I last looked. 3x improvement over fp32 is impressive for sure. Their marketing claims of 8x still bother me though.
Re:Which GPUs to get for deep learning by nl on Tuesday September 08, 2020 @09:55PM (#24415942)
What exactly is the 8x claim?

The thing I've seen is very limited (NVIDIA GPUs offer up to 8x more half precision arithmetic throughput when compared to single-precision, thus speeding up math-limited layers.[1]) which is probably true.

The problem with performance improvements is the diminishing returns part of Amdahl Law: an 8x improvement in math performance will just mean the math part becomes less important in terms of absolute performance.

In any case, I've found NVidia's claims in the machine learning area to be pretty good. Like most claims you have to read carefully to see exactly what the claim is, but that's not uncommon with performance claims.

[1] https://docs.nvidia.com/deeplearning/performance/mixed-preci...

[2] https://en.wikipedia.org/wiki/Amdahl%27s_law#Relation_to_the...

Re:Which GPUs to get for deep learning by tbenst on Wednesday September 09, 2020 @02:20AM (#24417834)
> NVIDIA GPUs offer up to 8x more half precision arithmetic throughput when compared to single-precision, thus speeding up math-limited layers

Right but I’ve benchmarked the best case scenario, ie a large GEMM call in C++, and still not seen anywhere close to 8x. I’ve never seen a code example, no matter how limited, showing a 8x speed up.

Re:Which GPUs to get for deep learning by llukas on Wednesday September 09, 2020 @03:14AM (#24418204)
Re:Which GPUs to get for deep learning by timdettmers on Monday September 07, 2020 @10:23PM (#24404697)
I should have been a bit clearer what went into the charts. I do not use theoretical marketing numbers but real-life benchmark data from NVIDIA and 4 other sources of benchmark between Titan V, V100, RTX 2080, RTX 2080 Ti and Titan RTX. Since I calibrate a model that needs to satisfy all sources as best as it can I think the numbers are pretty accurate.
Re:Which GPUs to get for deep learning by tbenst on Monday September 07, 2020 @11:38PM (#24404998)
Thank you for clarifying! I’m still skeptical of the chart’s A100 values but appreciated your reasonable attempt to de-bias. It’s always easier to critique then create so I also want to make sure I complement you on an excellent article :).
Re:Which GPUs to get for deep learning by timdettmers on Tuesday September 08, 2020 @12:20AM (#24405171)
Thank you, I just updated the blog post with more detailed clarification of where the data comes from.

One thing that I am quite sure of for the A100 is its transformer performance. It turns out, large transformers are so strongly bottlenecked by memory bandwidth that you can just use memory bandwidth alone to measure performance — even across GPU architectures. The error between Volta and Turning with a pure bandwidth model is less than 5%. The NVIDIA transformer A100 benchmark data shows similar scaling. So I am pretty confident on the transformer numbers.

The computer vision numbers are more dependent on the network and it is difficult to generalize across all CNNs. For example, group convolution or depth-wise separable convolution based CNNs do not scale well with better GPUs and speedups will be small (1.2 - 1.5x) whereas some other networks like ResNet get pretty straightforward improvements (1.6x-1.7x). So CNN values are less straightforward because there is more diversity between CNNs compared to transformers.

Re:Which GPUs to get for deep learning by llukas on Monday September 07, 2020 @07:44PM (#24403858)
Cannot really lie here: https://mlperf.org/
Re:Which GPUs to get for deep learning by YetAnotherNick on Monday September 07, 2020 @08:53PM (#24404218)
I don't see the timing comparison between FP16 and FP32. Can you point me at it if it is there.
Re:Which GPUs to get for deep learning by sytelus on Monday September 07, 2020 @10:21PM (#24404692)
> fp16 is only 30-40% faster than fp32

It really depends on workload. For ImageNet and resnet type architecture its not unusual to get 3X speed up. It also depends on if you do full fp16, leave BNs alone etc. This is a lot because instead of training for 6 days, you now training for 2 days.

Re:Which GPUs to get for deep learning by solidasparagus on Tuesday September 08, 2020 @12:15AM (#24405143)
> ImageNet and resnet type architecture its not unusual to get 3X speed up

Source on this? I've done a good bit of CV benchmarking work and I don't recall anything like a 3x boost. 30-40% improvement is much more in line with what I remember.