为什么我们仍然使用CPU而不是GPU?

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,它是一个由Q&a网站组成的社区驱动分组。...

为什么我们仍然使用CPU而不是GPU?Increasingly GPUs are being used for non-graphical tasks like risk computati***, fluid dynamics calculati***, and sei**ic ****ysis. What’s to stop us from adopting GPU-driven devices?

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,它是一个由Q&a网站组成的社区驱动分组。

问题

超级用户读者Ell关注科技新闻,很好奇为什么我们不使用更多基于GPU的系统:

在我看来,这些天很多计算都是在GPU上完成的。显然,图形是在那里完成的,但是使用CUDA之类的,AI、散列算法(比如比特币)和其他算法也是在GPU上完成的。为什么我们不能摆脱CPU,自己使用GPU呢?是什么让GPU比CPU快这么多?

为什么呢?CPU的独特之处是什么?

答案

超级用户贡献者DragonLord对GPU和CPU之间的差异提供了一个受支持的概述:

TL;DR answer: GPUs have far more processor cores than CPUs, but because each GPU core runs significantly slower than a CPU core and do not have the features needed for modern operating systems, they are not appropriate for performing most of the processing in everyday computing. They are most suited to compute-intensive operati*** such as video processing and physics simulati***.

The detailed answer: GPGPU is still a relatively new concept. GPUs were initially used for rendering graphics only; as technology advanced, the large number of cores in GPUs relative to CPUs was exploited by developing computational capabilities for GPUs so that they can process many parallel streams of data simultaneously, no matter what that data may be. While GPUs can have hundreds or even thousands of stream processors, they each run slower than a CPU core and have fewer features (even if they areTuring complete and can be programmed to run any program a CPU can run). Features missing from GPUs include interrupts and virtual memory, which are required to implement a modern operating system.

In other words, CPUs and GPUs have significantly different architectures that make them better suited to different tasks. A GPU can handle large amounts of data in many streams, performing relatively simple operati*** on them, but is ill-suited to heavy or complex processing on a single or few streams of data. A CPU is much faster on a per-core basis (in terms of instructi*** per second) and can perform complex operati*** on a single or few streams of data more easily, but cannot efficiently handle many streams simultaneously.

As a result, GPUs are not suited to handle tasks that do not significantly benefit from or cannot be parallelized, including many common c***umer applicati*** such as word processors. Furthermore, GPUs use a fundamentally different architecture; one would have to program an application specifically for a GPU for it to work, and significantly different techniques are required to program GPUs. These different techniques include new programming languages, modificati*** to existing languages, and new programming paradigms that are better suited to expressing a computation as a parallel operation to be performed by many stream processors. For more information on the techniques needed to program GPUs, see the Wikipedia articles on stream processing and parallel computing.

Modern GPUs are capable of performing vector operati*** and floating-point arithmetic, with the latest cards capable of manipulating double-precision floating-point numbers. Frameworks such as CUDA and OpenCL enable programs to be written for GPUs, and the nature of GPUs make them most suited to highly parallelizable operati***, such as in scientific computing, where a series of specialized GPU compute cards can be a viable replacement for a **all compute cluster as in NVIDIA Tesla Personal Supercomputers. C***umers with modern GPUs who are experienced with Folding@home can use them to contribute with GPU clients, which can perform protein folding simulati*** at very high speeds and contribute more work to the project (be sure to read the FAQs first, especially those related to GPUs). GPUs can also enable better physics simulation in video games using PhysX, accelerate video encoding and decoding, and perform other compute-intensive tasks. It is these types of tasks that GPUs are most suited to performing.

AMD is pioneering a processor design called the Accelerated Processing Unit (APU) which combines conventional x86 CPU cores with GPUs. This could allow the CPU and GPU components to work together and improve performance on systems with limited space for separate components. As technology continues to advance, we will see an increasing degree of convergence of these once-separate parts. However, many tasks performed by PC operating systems and applicati*** are still better suited to CPUs, and much work is needed to accelerate a program using a GPU. Since so much existing software use the x86 architecture, and because GPUs require different programming techniques and are missing several important features needed for operating systems, a general transition from CPU to GPU for everyday computing is extremely difficult.


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-12 04:42
  • 阅读 ( 185 )
  • 分类:互联网

你可能感兴趣的文章

windows10下如何增加专用视频ram

... 在我们谈论具体的数字之前,我们应该先提到游戏和其他图形密集型应用程序中使用VRAM最多的方面。 ...

  • 发布于 2021-03-11 01:28
  • 阅读 ( 434 )

你电脑的终极指南:你想知道的一切——等等

...持不变。在本指南中,我们将详细说明每个组件的作用,为什么要这样做,以及为什么这一点很重要。 ...

  • 发布于 2021-03-13 07:48
  • 阅读 ( 196 )

如果英特尔停止生产奔腾g4560,您应该购买哪种处理器?

... 为什么英特尔奔腾g4560是一颗宝石 ...

  • 发布于 2021-03-13 13:07
  • 阅读 ( 376 )

随着GPU的价格飞涨,你应该买一个图形卡吗?

... 那为什么要花很多钱呢?由于加密货币开采的普及,对图形卡的需求猛增。看看你是否应该买一个图形卡,以及什么是最好的替代品! ...

  • 发布于 2021-03-13 18:29
  • 阅读 ( 205 )

开采以太坊最好的电脑是什么?

...一台非游戏PC并添加一个功能强大的GPU或从头开始构建。我们将关注后者。 ...

  • 发布于 2021-03-14 07:00
  • 阅读 ( 251 )

为什么你现在不应该买台式机

... 这就是为什么我们建议你暂时不要买台式机。 ...

  • 发布于 2021-03-14 14:45
  • 阅读 ( 222 )

什么是cuda核心,它们如何改进pc游戏?

... 为什么cuda核心在游戏中很重要? ...

  • 发布于 2021-03-20 21:38
  • 阅读 ( 496 )

什么是amd智能存取存储器,它能让游戏变得更好吗?

... 我们来看看。 ...

  • 发布于 2021-03-27 03:51
  • 阅读 ( 258 )

“统一内存”如何加速苹果m1 arm Mac

...,因为软件优化可以在很大程度上提高这种性能,这就是为什么人们如此关注能够真正推动硬件的基准测试。然而,最后,我们猜想大多数人只是想看看新mac如何处理“真实世界”的使用。 Stephen Hall在9to5Mac上看到了一个8GB内存...

  • 发布于 2021-04-01 01:26
  • 阅读 ( 370 )

如何监测游戏中的个人电脑性能与微星加力

...力器后,您将看到上面的界面。你可以改变这个样子,但我们这里不谈这个。在默认界面中,有两个表盘显示图形卡的当前状态,包括GPU和内存时钟的频率、电压和当前温度。 在两个刻度盘之间,有一个滑块可以让你调整所有...

  • 发布于 2021-04-01 11:18
  • 阅读 ( 174 )
oqfqdscohqp
oqfqdscohqp

0 篇文章

相关推荐