Difference between CPU and GPU

Source: Internet
Author: User

This article is a reprinted, I think the introduction of simple and incisive, corresponding to the understanding of CPU and GPU for me, very good, the original address: http://hc.csdn.net/article.html? Arcid = 1, 2810268

The English name of heterogeneous computing is heterogeneous computing. It mainly refers to the calculation method that uses computing units of different types of instruction sets and architecture to form a system. Common Computing Unit categories include CPU, GPU, and other co-processor, DSP, ASIC, and FPGA. Parallel Computing is an important component of Heterogeneous Computing. Heterogeneous Computing has received more attention in recent years, the main reason is that the traditional method that improves computing power by increasing the CPU clock frequency and kernel quantity has encountered bottlenecks in heat dissipation and energy consumption. At the same time, GPU and other dedicated computing units, although working at a low frequency, have more kernel numbers and parallel computing capabilities. The overall performance/chip area ratio and performance/power consumption ratio are high, however, it is far from being fully utilized.

The CPU is designed to be good at processing irregular data structures and unpredictable access modes, as well as recursive algorithms, branch-intensive code, and single-threaded programs. Such program tasks have complex command scheduling, loops, branches, logical judgment, and execution steps. GPU is good at processing rule data structures and predictable access modes. The design concept of APU is to allow the perfect cooperation between the CPU and GPU to combine the strengths of the two, and use heterogeneous computing to optimize the overall performance.

At present, there are already 50 leading applications that can use amd Apu for acceleration, and subsequent applications will also come soon-the popularity of Heterogeneous Computing should be close at hand.

Let's talk about the popular heterogeneous computing CPU + GPU.

Essential differences between CPU and GPU

The CPU aims to quickly execute a single command stream;

The CPU uses it for out-of-order execution, register rename, branch prediction, and huge cache. These designs aim to accelerate the execution speed of a single thread;

CPU uses cache to reduce memory access latency;

The CPU uses a large amount of cache and branch prediction to reduce latency. These mechanisms consume a large amount of transistor power;

Each CPU core supports 1 ~ Two threads;

The cost of the CPU switching thread is several hundred clock cycles;

The CPU processes vector data through SIMD (Multiple Data commands per command;

Intel's CPU does not have an integrated memory controller;

 

The goal of GPU is to quickly execute a large number of Parallel Instruction Streams;

GPU uses transistors for processor arrays, multi-thread management, shared memory, and memory controllers;

These designs do not aim to increase the execution speed of a single thread, but to enable the GPU to execute thousands of threads at the same time;

Implement inter-thread communication and provide extremely high memory bandwidth;

GPU uses cache to enlarge memory bandwidth;

GPU hides Latency by running thousands of threads at the same time. threads waiting for memory access will be switched out, and GPU switching threads will not consume time;

For GPUs supporting cuda, each stream processor can process 1024 threads at the same time;

The cost of GPU switching threads is 0. In fact, GPUs usually switch threads every clock cycle;

GPU uses SIMT (multi-thread single-instruction). The advantage of SIMT is that it does not require developers to compress data into proper vector lengths, and SIMT allows each thread to have different branches;

GPU integration that supports Cuda has eight memory controllers. The GPU memory bandwidth is usually 10 times the CPU bandwidth.

 

The Long Term of the CPU is integer computing, and the advantage of GPU is floating point computing.

For the performance of the entire machine, CPU and GPU are the performance guarantee. Reasonable matching is the top priority, in order to bring the most comprehensive performance to users.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.