Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VPU vs FPU vs GPU vs ALU

Tags:

cpu

gpu

fpu

alu

I want to better understand the difference between Vector Processing Graphics (VPU), Floating Point Unit, Graphics Processing Unit and Arithmetic and Logic Unit.

I understand that inside a CPU there's a FPU and a ALU, but is that also true for GPUs?

And what about VPU vs GPU? Shouldn't they be the same thing? Are there any ALUs/FPUs inside them?

like image 454
testin3r Avatar asked Mar 04 '18 17:03

testin3r


1 Answers

A VPU supports vectors of very large sizes or variable sizes. In particular, a vector instruction takes the number of elements in a vector from a register (sometimes called the vector length register) or a memory location. Moreover, there is typically support for vector masks to selectively process the elements of a vector. A VPU typically has dedicated registers to hold vector lengths and masks. See the Cray vector instructions for example. This is in contrast to SIMD instructions, which support small vectors or fixed-size vectors (and may have limited support for masks).

Although the instruction set of a VPU includes vector instructions, the way these instructions are implemented or executed may not be fully parallelized and may even resemble that of a scalar processor (processing one element at a time in a loop).

A GPU may or may not be a VPU, depending on the instruction set supported by the GPU. Also, a VPU might be implemented as a GPU, but that is really an implementation detail. A GPU is a large collection of cores (each typically containing an ALU and an FPU) and some special units (used for graphics processing) that do not exist in VPUs and general-purpose CPUs. Most if not all real GPUs, however, are not VPUs because they do not support such powerful vector instructions. Mapping kernels to GPU cores is done by the compiler and the GPU device driver.

The definition of a VPU from Wikipedia specifies that vectors must be one-dimensional. Historically, this was always the case. On the other hand, GPUs may appear to have built-in support for multi-dimensional vectors, but this is really handled by the compiler, not the architecture. So I wouldn't consider this to be an essential difference.

FPUs and ALUs are components of VPUs, CPUs, and GPUs.

like image 157
Hadi Brais Avatar answered Sep 21 '22 19:09

Hadi Brais