09.05.2023 Views

pdfcoffee

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tensor Processing Unit

This chapter introduces the Tensor Processing Unit (TPU), a special chip

developed at Google for ultra-fast execution of neural network mathematical

operations. Similarly to Graphic Processing Units (GPUs), the idea here is to have

a special processor focusing only on very fast matrix operations with no support

for all the other operations normally supported by Central Processing Units (CPUs).

However, the additional improvement with TPUs is to remove from the chip any

hardware support for graphics operation normally present in GPUs (rasterization,

texture mapping, frame buffer operations, and so on). Think of a TPU as a special

purpose co-processor specialized for deep learning, being focused on matrix or

tensor operations. In this chapter we are going to compare CPUs and GPUs with

the three generations of TPUs and Edge TPUs. All these accelerators are available

as November 2019. The chapter will include code examples of using TPUs. So with

that, let's begin.

C/G/T processing units

In this section we discuss CPUs, GPUs, and TPUs. Before discussing TPUs, it will

be useful for us to review CPUs and GPUs.

CPUs and GPUs

You are probably somewhat familiar with the concept of a CPU, a general-purpose

chip sitting in each computer, tablet, and smartphone. CPUs are in charge of all

of the computations: from logical controls, to arithmetic, to register operations,

to operations with memory, and much more. CPUs are subject to the well-known

Moore's law [1], which states that the number of transistors in a dense integrated

circuit doubles about every two years.

[ 571 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!