News for hackers. Stuff that matters.
Re:Cloud TPUs in Beta by minimaxir on Monday February 12, 2018 @09:49AM (#16358875)
That $6.50/hr rate might be the big deal here. Amazon does offer instances with a V100 GPU (https://aws.amazon.com/ec2/pricing/on-demand/, the P3 instances), but if you're training something like ImageNet, you'll want the biggest image (p3.16xlarge) at $24.48/hr.

Attaching a VM of similar power to a TPU on Google Compute Engine is much cheaper (https://cloud.google.com/compute/pricing, n1-highmem-64, +$3.78/hr to the TPU cost for $10.28/hr total).

Per recent benchmarks for training ImageNet (https://dawn.cs.stanford.edu/benchmark/), training ImageNet on a p3.16xlarge cost $358, when this post claims it'll cost less than $200. (EDIT: never mind; the benchmark uses ImageNet-152, and Google compares TPU performance against ImageNet-50) Interesting.

Re:Cloud TPUs in Beta by borramakot on Monday February 12, 2018 @11:09AM (#16359531)
Back of the envelope, a TPU costs a little more than 2x as much as a Volta on AWS P3, and delivers a little less than 2x the performance (180 TOPs for the TPU, 100 for Volta). On a raw performance/$ metric, I'm not sure the TPU is that interesting.

It might be worth it if I were willing to pay a huge amount to get back results from an experiment faster, by using lots of TPUs- distributed learning on GPUs doesn't seem easy yet.

Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @12:26PM (#16360160)
Disclosure: I work on Google Cloud.

Peak ops/second isn’t the only thing that matters though. You have to be able to feed the units. The V100 does lots of finer-grained matrix multiplies which can make it harder to keep up.

Don’t get me wrong, the V100 is a great chip. And we’re all looking forward to more (preferably third-party) benchmark results, to tease out when one is the better choice for a workload. But don’t just compare ops/second or any other architectural number.

Re:Cloud TPUs in Beta by deepnotderp on Monday February 12, 2018 @01:10PM (#16360511)
This makes no sense, the V100 has more memory bandwidth than both the TPU and TPUv2
Re:Cloud TPUs in Beta by jlebar on Monday February 12, 2018 @04:11PM (#16362194)
V100 has 900gb/s memory bandwidth [0].

TPUv2 has 600gb/s per chip x 4 chips, so 2400gb/s [1].

As we've discussed elsewhere [2], comparing TPUv2 to V100 on a per chip basis doesn't make much sense. Who cares how many chips are on the board? If Google announced tomorrow that TPUv3 is coming out, which is identical to TPUv2 but the four chips are glued together, nobody would care.

The questions that we should instead be asking are, how fast can I train my model and how much does it cost?

Per elsewhere in thread [3], on Volta you have 900gb/s per 100Tops/s = 0.9 bytes/s per op/s, whereas on TPUv2 you have 2400gb/s memory bandwidth over 180Tops/s = 1.33 bytes/s per op/s. This means that TPUv2's memory-bandwidth-to-compute ratio is 1.33/9 = 1.5x higher than Volta's.

We can do a similar comparison for memory available. V100 has 16gb per 100Tops, TPUv2 has 64gb per 180Tops. So the memory-to-compute ratio for Volta is 16g/100T = .16 milli while for TPUv2 it's 64g/180T = .36 milli, for a ratio of .36/.16 = 2.25x higher on TPUv2.

Does any of this matter? Does it translate into faster and/or cheaper training? Do models actually need and benefit from this additional memory and memory bandwidth? My guess from working on GPUs is yes, at least insofar as bandwidth is concerned, but it's just a guess. I'm excited to find out for real.

(Disclaimer: I work at Google on XLA, and used to work on TPUs.)

[0] https://images.nvidia.com/content/technologies/volta/pdf/437... [1] https://supercomputersfordl2017.github.io/Presentations/Imag... [2] https://news.ycombinator.com/item?id=16360212 [3] https://news.ycombinator.com/item?id=16359531

Re:Cloud TPUs in Beta by twtw on Monday February 12, 2018 @04:35PM (#16362466)
I responded to your other comment to disagree, and I'll do so again here.

Nobody is comparing DGX1-V to a single TPUv2 chip, because it doesn't make any sense to do so. they are totally different kinds of machines. But for some reason everyone is comparing a cluster of 4 TPUv2 chips to a single V100 chip.

It only makes sense to compare 4xTPUv2 to 1xV100 if they are equivalent in some meaningful metric, like total die size, power, etc.

In lieu of any available data, I'm going to continue to assume that each TPUv2 chip is roughly comparable in terms of power & die size to each V100 chip. If this was grossly wrong, I would expect that all four would be condensed into a single chip, which would dramatically increase the performance of the interconnects.

We could resolve this rapidly if there were any data available about die size, TDP, anything of TPUv2.

Re:Cloud TPUs in Beta by jlebar on Monday February 12, 2018 @04:46PM (#16362585)
> But for some reason everyone is comparing a cluster of 4 TPUv2 chips to a single V100 chip.

I agree that some people are doing that. Marketing, I suppose. But that comparison is explicitly not the point of my parent post. I'm comparing the "shapes" of the chips -- specifically, the compute/memory and compute/memory-bandwidth ratios. These ratios stay the same regardless of whether you multiply the chips by 4 or by 400.

The point I was trying to make is that V100 has a higher peak-compute-to-memory(-bandwidth) ratio than TPUv2. This much seems clear from the arithmetic. Whether this matters in practice, I don't know, but I think it is relevant if one believes (as I do, based on the evidence I have as an author of an ML compiler targeting the V100) that the V100 is starved for memory bandwidth.

> In lieu of any available data, I'm going to continue to assume that each TPUv2 chip is roughly comparable in terms of power & die size to each V100 chip. If this was grossly wrong, I would expect that all four would be condensed into a single chip, which would dramatically increase the performance of the interconnects.

I'm sure Google's hardware engineers operate under a lot of constraints that I'm not aware of; I'm not about to make assumptions. But more to the point, as we've said, things like die size and TDP don't directly affect consumers. The questions we have to ask are, how fast can you train your model, and at what cost?

Just as you don't like it when people (incorrectly, I agree) insist on comparing one V100 to four TPUs, because that's totally arbitrary (why not compare one V100 to 128 TPUs?), I don't like it when people insist on comparing TPUv2 to V100 on arbitrary metrics like die size, or peak flops/chip, or whatever. So I disagree that we could resolve anything if we had more info about the TPUv2 chip itself. None of that matters.

Re:Cloud TPUs in Beta by deepnotderp on Monday February 12, 2018 @06:28PM (#16363364)
Well, if you ignore power consumptiom because ",it doesn't matter to the end user", you're talking about economic comparisons, not technical comparisons.

BTW, I absolutely agree that memory bandwidth is the bottleneck, I've built my company around that assertion and the data for that exists (Mitra's publications come to mind)

Re:Cloud TPUs in Beta by twtw on Monday February 12, 2018 @04:59PM (#16362713)
Alright, I understand better now what you are saying. I'm eager to see some benchmarks that can answer those meaningful questions.

Thank you for your courteous reply.

Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @02:05PM (#16361043)
We mostly focus on the “whole board” numbers. So it’s not only units <=> “local” HBM, but NVLINK versus TPU to TPU. Sorry for the confusion.

Edit for this part of the thread: the best public numbers are in the linked presentation [1].

[1] https://supercomputersfordl2017.github.io/Presentations/Imag...

Re:Cloud TPUs in Beta by deepnotderp on Monday February 12, 2018 @02:14PM (#16361128)
That's... a skewed ... comparison, NVLINK is a board to board connection whereas you're talking about TPU to TPU on board communication if I understand correctly?
Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @02:31PM (#16361292)
That's sort of the point though! We're actually selling these as the "board". So the right way to compare things is sort of DGX-1 style "deep learning rig" versus a board of four TPU units (or several connected). The on-chip network is a big part of its overall efficiency.

I don't recall what (if anything) we've said about how we link up the boards across racks, but the folks at Next Platform looked pretty carefully at the pictures: https://www.nextplatform.com/2017/05/22/hood-googles-tpu2-ma...

Re:Cloud TPUs in Beta by deepnotderp on Monday February 12, 2018 @04:31PM (#16362435)
It's not the point though. You're comparing whole board tpu FLOPs (4x 45) but then comparing tpu single chip chip2chip communication with nVidia board2board communication.

You can't have your cake and eat it too.

Re:Cloud TPUs in Beta by jamesblonde on Monday February 12, 2018 @01:33PM (#16360732)
Yes, when training DNNs memory bandwidth is the only figure you need to look at. That's why the 1080Ti is by far and away the best bang for buck right now (ignore the EULA nonsense). It has about 55% of the memory b/w of the V100 for 10% of the price.
Re:Cloud TPUs in Beta by jlebar on Monday February 12, 2018 @12:26PM (#16360156)
I know people don't know what to expect from tpu performance, but does anyone actually get 100tops out of Volta? I thought you'd have to spin the tensorcores and never touch memory, which is...not realistic.

I know you hedged by saying "back of the envelope", but I'd much rather compare on real benchmarks than based on cited peak performance numbers, which are kind of meaningless.

Re:Cloud TPUs in Beta by deepnotderp on Monday February 12, 2018 @01:14PM (#16360556)
This is true of the TPU as well, check out their paper's utilization numbers. If you ignore one outlier at ~90% utilization, their utilization plummets. I'm glad people are finally looking past the b.s. "peak" numbers for once though.
Re:Cloud TPUs in Beta by jlebar on Monday February 12, 2018 @01:48PM (#16360871)
Has Google published data on the memory bandwidth of TPU v2 (aka "cloud TPU")? I'm having trouble finding it.

In any case I agree, we shouldn't be looking at the stated peak compute of either of the chips.

(Disclaimer: I work at Google on XLA, and have in the past worked on TPUs.)

Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @02:09PM (#16361075)
From the blog post is the link to the fairly recent NIPS presentation: https://supercomputersfordl2017.github.io/Presentations/Imag...

which claims 2400 GB/s for the board and 600 GB/s per “chip”.

Re:Cloud TPUs in Beta by jlebar on Monday February 12, 2018 @02:31PM (#16361297)
This is in comparison to 900gb/s for V100.
Re:Cloud TPUs in Beta by surajrmal on Monday February 12, 2018 @11:44AM (#16359825)
It'll make a lot more sense when the TPU pods they alluded to come out.
Re:Cloud TPUs in Beta by twtw on Monday February 12, 2018 @09:56AM (#16358936)
Why does it make any sense to compare the price/hour for a single TPU (4 ASICs) to the price/hour for p3.16xlarge, which has 8x V100?

Also, that benchmark cost of $358 is for Resnet-152, not Resnet-50.

Re:Cloud TPUs in Beta by minimaxir on Monday February 12, 2018 @10:01AM (#16358974)
Whoops, I misread, added edit.
Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @01:17PM (#16360593)
Disclosure: I work on Google Cloud.

Note that the post says “less than $200” not $200. There are lots of values between 0 and 200. What we’d love is for third-party folks like yourself to do the comparison (which I know you can, Max!)

Re:Cloud TPUs in Beta by douglasfshearer on Monday February 12, 2018 @10:00AM (#16358964)
P3.16x benchmark is ResNet-152, TPU cost of $200 was for ResNet-50.

Tensorflow benchmarks show ResNet-152 resulting in 2.4x lower throughput than ResNet-50. [0]

[0] https://www.tensorflow.org/performance/benchmarks

Re:Cloud TPUs in Beta by staticfloat on Monday February 12, 2018 @01:15PM (#16360572)
Just a minor nitpick that ResNet is the model you are referring to, ImageNet is the dataset that ResNet is trained on.
Re:Cloud TPUs in Beta by Cyph0n on Monday February 12, 2018 @10:01AM (#16358972)
A better comparison would be the f1.16xlarge[1] instance @ ~$4/hr. It comes with 8 FPGAs (12 Gbps link) and 64 vCPUs.

[1]: https://aws.amazon.com/ec2/instance-types/f1/

Edit: I'm genuinely curious about why this comment is getting downvotes.

Re:Cloud TPUs in Beta by boulos on Monday February 12, 2018 @01:52PM (#16360910)
Disclosure: I work on Google Cloud.

I didn’t downvote you, but presumably people disagree with “Here’s an FPGA” as comparable to being given a working piece of hardware. That is, would you have said that the best comparison to a V100 is this same FPGA box?

I (and others) get what you were trying to say: TPUs are ASICs that aren’t general purpose at all, so an FPGA is a better comparison than a more general purpose GPU. As an end user, that just isn’t true though. If someone hands you an f1.16xlarge, you have to build your own psuedo-chip for machine learning. While with this offering, TensorFlow handles the acceleration / offload for you.

Re:Cloud TPUs in Beta by Cyph0n on Monday February 12, 2018 @04:39PM (#16362515)
Fair enough. I wonder if there are any model compilers targeting FPGA training backends...
Re:Cloud TPUs in Beta by dharma1 on Monday February 12, 2018 @10:09AM (#16359041)
Do much deep learning training with the FPGAs?
Re:Cloud TPUs in Beta by Cyph0n on Monday February 12, 2018 @10:24AM (#16359158)
Nope, but I'm sure others do.
Re:Cloud TPUs in Beta by jongomez on Monday February 12, 2018 @12:27PM (#16360172)
Microsoft uses FPGAs for Deep Learning. Source:

https://techcrunch.com/2017/08/22/microsoft-brainwave-aims-t...

Re:Cloud TPUs in Beta by twtw on Monday February 12, 2018 @01:08PM (#16360498)
... for inference. I don't know of anyone who takes training on FPGAs seriously. They tend to get crushed by GPU/TPU/other ASIC in throughput, perf/watt, and perf/$.
Re:Cloud TPUs in Beta by p1esk on Monday February 12, 2018 @03:24PM (#16361730)
Training on FPGAs starts to make a lot of sense when you consider low bit precision computation (e.g. DoReFa-Net).