Waht ate GPUs,anyway?

本文深入浅出地解释了GPU(图形处理器)与CPU(中央处理器)的根本区别,强调了GPU在处理大量并行计算任务时的优势,特别是在图形渲染、深度学习等领域的应用。随着摩尔定律的逐渐失效,GPU的并行计算能力对于提升整体性能变得越来越重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

@Text From Pete Warden’s Blog

A good friend of mine just asked me “What are GPUs?”. It came up because she’s a great digital artist who’s getting into VR, and the general advice she gets is “Buy a PC with a video card that costs more than $350”. What makes that one component cost so much, why do we need them, and what do they do? To help answer that, I thought I’d try to give an overview aimed at non-engineers.
我觉得这里的意思表达的有问题,应该是额外花费350美元,毕竟一个电脑350美元已经很便宜了,所以我觉得是costs extra $350.

Graphics Processing Units were created to draw images, text, and geometry onto the screen. This means they’re designed very differently than the CPUs that run applications. CPUs need to be good at following very complex recipes of instructions so they can deal with all sorts of user inputs and switch between tasks rapidly. GPUs are much more specialized. They only need to do a limited range of things, but each job they’re given can involve touching millions of memory locations in one go.
意思是cpu用来执行复杂的指令,不如用户交互,以及各个任务之间的快速转换。Gpu专注于做单一的事情,需要接触大量的内存。

To see the difference between the kind of programs that run on CPUs and GPUs, think about a CPU reading from a text box. The CPU will sit waiting for you to press a key, and as soon as you do it might need to look in a list to figure out if there’s an autocomplete entry, check the spelling, or move to the next box if you hit return. This is a complex set of instructions with a lot of decisions involved.
CPU按指令办事。

By contrast, a typical GPU task would be drawing an image on-screen. A picture that’s 1,000 pixels wide and high has a million elements, and drawing it means moving all of those into the screen buffer. That’s a lot more work than just waiting for a key press, but it also involves a lot fewer decisions since you just need to move a large number of pixels from one place to another.
Gpu就是简单粗暴,做着大量的单一的活动。

The differences in the kinds of tasks that CPUs and GPUs need to do means that they’re designed in very different ways. CPUs are very flexible and able to do a lot of complicated tasks involving decision-making. GPUs are less adaptable but can operate on large numbers of elements at once, so they can perform many operations much faster.
这里是阶段性的总结:
cpu适用于做复杂的任务比如做决策。
gpu可以操作大量的元素,所以它可以在做一些运算时更快。
at once是立刻马上的意思,我觉得作者应该是想说一次可以操作大量的元素。

The way GPUs achieve this flexibility is that they break their tasks into much smaller components that can be shared across a large set of many small processors running at once. Because the jobs they’re being asked to do are simpler than CPUs, it’s easy to automatically split them up like this. As an example you can imagine having hundreds of little processors, each of which is given a tile of an image to draw. By having them work in parallel, the whole picture can be drawn much faster.
因为gpu的任务相对于cpu来说更简单,所以gpu可以把任务分成多个小任务(应该是gpu多核的原因把)
之所以cpu不能随便分,我觉得是因为任务复杂,逻辑不能简单的分开。
这样的话就可以并行计算,就更快了。

The key advantage of GPUs is this scalability. They can’t do every job, but for the ones they can tackle, you essentially can just pack in more processors on the board to get faster performance. This is why video cards that are capable of handling the high resolutions and framerates you need for VR are more expensive, they have more (and individually faster) processors to handle those larger sizes as you go up in price. This scalability is harder to do on CPUs because it’s much trickier to break up the logic needed to run applications into smaller jobs.
Gpu的关键特点就是可伸缩性。
它不能做所有的工作,但只要是它能做的,那么你就可以用更多的gpu来得到更快的速度。
(这句话我认为很重要,因为训练模型的时候听说很多都是多个gpu一起训练)
cpu就不能做到像gpu这样的可伸缩性了,因为要打破这种逻辑,即把应用分为更小的任务的逻辑,会棘手的多。这句话翻译的有问题。确实翻译错了,断点有问题。
将运行应用程序所需的逻辑分解成更小的任务要复杂得多。break up 。。into。。这是组合。

This is a painfully simplified explanation I know, but I’m hoping to get across what makes GPUs fundamentally different from CPUs. If you have a task that involves a lot of computation but few decision points, then GPUs are set up to parallelize that job automatically. This is clearest in graphics, but also comes up as part of deep learning, where there are similar heavy-lifting requirements across millions of artificial neurons. As Moore’s Law continues to fade, leaving CPU speeds to languish, these sort of parallel approaches will become more and more attractive.
get sth across 使被理解的意思。
这里说如果你的任务需要很多的计算而几乎没什么多余的指令,那么GPU就会自动的来并行处理该任务。
不懂为什么是自动的???????????????????????????????
然后说到了深度学习。
说在数百万的人造神经员之间会有相似的heavy-lifting要求,
这翻译过来是举重的意思。
随着摩尔定律的不断消失,让中央处理器的速度变得越来越慢,这种并行方法将变得越来越有吸引力。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值