Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What's the difference between cpu and gpu?
What's the difference between cpu and gpu?
1.The concept of GPU and cpu

1.CPU (Central Processing Unit-Central Processing Unit) is a very large scale integrated circuit, which is the computing core and control unit of a computer. Its function is mainly to interpret computer instructions and process data in computer software.

2.GPU (Graphics Processing Unit) is a kind of microprocessor that specializes in image operation on personal computers, workstations, game machines and some mobile devices (such as tablet computers and smart phones). ).

Second, the difference between gpu and cpu

1. Hidden object

The CPU has a large number of cache structures. At present, mainstream CPU chips have four levels of cache. These cache structures consume a lot of transistors and require a lot of power when running.

The cache of GPU is simple. At present, the mainstream GPU chip has at most two layers of cache, and GPU can use the space and energy consumption of transistors to make ALU units, so GPU is more efficient than CPU.

2. Response mode

CPU requires real-time response and high speed for a single task, so it needs to use multi-layer cache to ensure the speed of a single task.

GPU arranges all tasks and then processes them in batches, which has relatively low cache requirements.

3. Floating point operation

In addition to floating-point shaping, CPU also loads other instruction sets, such as multimedia decoding and hardware decoding, so CPU is universal. CPU pays attention to the performance of single thread. To ensure uninterrupted instruction flow, the control part needs to consume more transistors and energy, so the power consumption allocated by CPU in floating-point calculation will be reduced.

GPU basically only does floating-point operations, so the design structure is simple, so it can be done faster. GPU focuses on throughput, and one instruction can drive more calculations. Compared with GPU, it consumes less energy in the control part, so the resources saved by electricity can be used for floating-point calculation.

4. Application direction

Applications such as the operating system that CPU is good at need to respond to real-time information quickly and optimize the delay, so it is necessary to use the number of transistors and energy consumption in the control parts such as branch prediction, out-of-order execution and low-delay cache.

GPU is suitable for architecture operations with high predictability, large number of similar operations, high latency and high throughput.