為什麼我們仍然使用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
  • 閱讀 ( 41 )
  • 分類:網際網路

你可能感興趣的文章

你電腦的終極指南:你想知道的一切——等等

...持不變。在本指南中,我們將詳細說明每個元件的作用,為什麼要這樣做,以及為什麼這一點很重要。 ...

  • 發佈於 2021-03-13 07:48
  • 閲讀 ( 50 )

如果英特爾停止生產奔騰g4560,您應該購買哪種處理器?

... 為什麼英特爾奔騰g4560是一顆寶石 ...

  • 發佈於 2021-03-13 13:07
  • 閲讀 ( 60 )

隨著GPU的價格飛漲,你應該買一個圖形卡嗎?

... 那為什麼要花很多錢呢?由於加密貨幣開採的普及,對圖形卡的需求猛增。看看你是否應該買一個圖形卡,以及什麼是最好的替代品! ...

  • 發佈於 2021-03-13 18:29
  • 閲讀 ( 52 )

開採以太坊最好的電腦是什麼?

...特幣開採一樣,以太坊開採也越來越受歡迎。但是你需要什麼樣的電腦呢? ...

  • 發佈於 2021-03-14 07:00
  • 閲讀 ( 57 )

為什麼你現在不應該買桌上型電腦

... 這就是為什麼我們建議你暫時不要買桌上型電腦。 ...

  • 發佈於 2021-03-14 14:45
  • 閲讀 ( 45 )

cpu超頻初學者指南

... 我的技術發燒友想說:“為什麼你還沒有超頻你的電腦呢?”然而,有一種方法來瘋狂超頻和各種因素要考慮。 ...

  • 發佈於 2021-03-16 22:41
  • 閲讀 ( 45 )

為什麼windows會崩潰?故障排除指南

...軟體驅動程式和程式的可能組合也是無法估量的。這就是為什麼在處理電腦問題時,你應該總是考慮尋求幫助。 ...

  • 發佈於 2021-03-17 13:14
  • 閲讀 ( 57 )

什麼是cuda核心,它們如何改進pc遊戲?

... 為什麼cuda核心在遊戲中很重要? ...

  • 發佈於 2021-03-20 21:38
  • 閲讀 ( 48 )

用這些最好的免費應用在linux上挖掘比特幣

...對移動裝置的加密錢包感興趣嗎?看看《勢不可擋》和它為什麼是最好的。 ...

  • 發佈於 2021-03-25 20:11
  • 閲讀 ( 47 )

為什麼我的手機比我的電腦慢?智慧手機vs.桌上型電腦速度

你口袋裡的智慧**功能強大。它的功能比大量現已失效的超級計算機,以及一些現代的超級計算機還要強大。另一個現成的事實是,“你的**比1969年美國宇航局的所有**都有更強的計算機能力,當時它把兩名宇航員送上了月球。...

  • 發佈於 2021-03-26 09:35
  • 閲讀 ( 49 )
oqfqdscohqp
oqfqdscohqp

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦