Multithreading – deep analysis of the differences between CPUs and GPUs

I've been looking for the main difference between CPU and GPU, more accurately, separating the subtle differences between CPU and GPU For example, why not use multiple CPUs instead of GPUs, and vice versa Why is GPU faster than CPU in processing computation What can one of them do, and the other can't, or does well, why Please don't answer "central processing unit" and "graphics processing unit". I'm looking for an in-depth technical answer

Solution

GPU is basically a massively parallel computer They work well on problems that can be decomposed using large-scale data, and provide an order of magnitude acceleration for these problems

However, each processing unit in the GPU does not match the general performance CPU They are simpler and do not have optimizations such as long pipelines, out of order execution, and instruction level parallelism

They also have other shortcomings First, you must have a user. Unless you control the hardware, you cannot rely on such devices In addition, there is overhead in transferring data from main memory to GPU memory and returning

So it depends on your requirements: in some cases, a GPU or dedicated processing unit like Tesla is a clear winner, but in other cases, your work cannot be decomposed to make full use of GPU, and the overhead makes CPU a better choice

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>