I use python code on Google Colab. I would like to ask what is the difference between CPUs, GPUs, TPUs and why the last two have so intense acceleration on python code??? I have seen tutorials on google but the nearly touch the question... I am asking from chip/architecture/electronics design perspective what makes them so good???


1 Answer 1


I am asking from chip/architecture/electronics design perspective what makes them so good???

The flaw in your question is that you assume that GPUs and TPUs are good in general. They are not. They are good at very specialized things and they do relatively poorly at other tasks.

A CPU is a general purpose process that is pretty good at a wide range of problems.

A GPU is a graphics processor that is designed specifically for the types of calculations needed to render graphics images. It's good at this because it was designed that way and it would not perform that well at a different sort of problem.

A TPU is another type of specialized processor that is targeted at the types of calculations needed for neural networks. It would fail to perform well at graphics processing as well as general purpose computing.

So you might have all 3 of these types, possibly even others, in a given system for a particular application.

  • 1
    \$\begingroup\$ CPU --> GPU --> TPU also increase the number of "cores" or "threads" from ~16 --> ~1000 --> who knows how many... ~10k? So not only is a TPU more specialized than a GPU or CPU, it can also do many more calculations in parallel (simultaneously) which we perceive as being "faster." \$\endgroup\$
    – rdtsc
    Apr 18, 2023 at 18:26
  • 1
    \$\begingroup\$ However, on the other hand, the per core speed goes down in each jump, because of that specialism. If you have the kind of parallel problem they apply to, you get less overhead per calculation, and much higher overall throughput. If you don't, they are a lot slower, as you effectively only get to use 1-2 of those "threads", which have a lower rate of instruction execution. \$\endgroup\$ Apr 18, 2023 at 19:05
  • 1
    \$\begingroup\$ @rdtsc The specialized nature of a GPU or TPU makes them much smaller than a CPU in general, so it's feasible to put 100s, even 1000s of them on a single chip. \$\endgroup\$
    – jwh20
    Apr 18, 2023 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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