Computer Fundamentals 简明教程
Computer - Graphics Processing Unit (GPU)
What is Graphics Processing Unit (GPU?)
图形处理是一项专门为计算而发展的先进技术。图形处理器 (GPU) 是一种先进且专门的处理器,它使机器学习、深度学习、游戏、内容创作和许多更多相关技术成为可能。
Graphics processing is an advanced technology that has evolved specifically for computing. The graphics processing unit (GPU) is an advanced and specialised processor which makes computing possibilities for machine learning, deep learning, gaming, content creation, and many more related technologies.
图形处理器 (GPU) 是一种专用的电气电路,可以加速计算机图形和图像处理。GPU 对于神经网络和加密货币等非图形计算很有用。
A graphics processing unit (GPU) is a specialised electrical circuit that accelerates computer graphics and image processing. GPUs are useful for non-graphic computations such as neural networks and cryptocurrency.
GPU 最初是开发用于加速 3D 视觉的渲染。它们逐渐变得更具适应性和可编程性,并扩展了它们的能力。这使图形程序员能够使用先进的光照和阴影方法生成更迷人的视觉效果和逼真的场景。在其他应用程序中,GPU 最广泛地用于高性能计算 (HPC)、深度学习和其他领域的强大计算。
GPUs were originally developed to speed up the rendering of 3D visuals. They gradually became more adaptable and programmable and expanded their capabilities. This enabled graphics programmers to generate more fascinating visual effects and realistic scenes using advanced lighting and shadowing methods. In other applications, GPUs are most widely used to significantly work with high-performance computing (HPC), deep learning, and other domains.
Significances of GPUs
GPU 主要用于加速实时 3D 图形应用程序(如游戏)。然而,随着二十一世纪的到来,计算机专家们认识到 GPU 可以解决世界上一些最复杂的计算问题。
GPUs are mostly used to speed up real-time 3D graphics applications like gaming. However, as the twenty-first century began, computer experts recognised that GPUs could address some of the world’s most complex computing problems.
这一认识开启了通用 GPU 的时代。显卡技术现在正被用于解决更广泛的挑战。当今的 GPU 比以往任何时候都更具可编程性,这使它们能够为超出标准图形渲染的广泛应用程序提供支持。
This realisation ushered in the era of general-purpose GPUs. Graphics technology is now being used to solve a broader range of challenges. Today’s GPUs are more programmable than ever before, allowing them to power a wide range of applications beyond standard graphics rendering.
GPU 具有以下重要意义 −
GPUs are significant for the following reasons −
GPUs for Gaming
由于采用了超真实的图形和庞大复杂的内置游戏世界,视频游戏变得更加依赖计算。随着 4K 屏幕和高刷新率等先进显示技术的出现,以及虚拟现实游戏的兴起,对图形处理的需求正在快速增长。GPU 能够渲染 2D 和 3D 图形。通过更好的图形性能,可以在更高的分辨率、更快的帧率或两者兼而有之的情况下玩游戏。
Video games have become more computationally intensive, with hyperrealistic graphics and vast, complicated in-game worlds. With advanced display technologies, such as 4K screens and high refresh rates, along with the rise of virtual reality gaming, demands on graphics processing are growing fast. GPUs are capable of rendering graphics in both 2D and 3D. With better graphics performance, games can be played at higher resolution, at faster frame rates, or both.
GPUs for Video Editing and Content Creation
GPU 提供了并行处理的计算解决方案,内置了 AI 功能和精密的加速,可实现更快的执行和更高定义格式的视频和图形的更轻松渲染。
GPUs provide a computational solution for parallel processing, with built-in AI features and sophisticated acceleration for faster execution and easier rendering of video and graphics in higher-defined formats.
GPU for Machine Learning
人工智能和机器学习是 GPU 技术最有趣的应用之一。由于 GPU 具有巨大的计算能力,因此它们可以为充分利用 GPU 高并行特性的工作负载提供显著的加速,例如图像识别。当今许多深度学习解决方案都依赖 GPU 与 CPU 协同工作。
Artificial intelligence and machine learning are among the most interesting applications for GPU technology. Because GPUs have an enormous amount of computational power, they can provide remarkable acceleration in workloads that make use of GPUs' highly parallel nature, such as image recognition. Many of today’s deep learning solutions rely on GPUs to work alongside CPUs.
How do GPUs work?
GPU 非常适合需要大量数据和重复计算的任务或程序。GPU 具有类似的提取-解码-执行周期,它的设计可以同时处理数千个线程,使其非常适合并行处理任务 −
A GPU is ideally suited for tasks or programs that require large volumes of data and repetitive computation. GPUs have a similar fetch-decode-execute cycle, it has designed in such a way that they can handle thousands of threads at once, making them well-suited for parallel processing tasks −

-
Fetching − The GPU fetches instructions for the execution from its internal memory. (VRAM).
-
Decoding − The control units of streaming multiprocessors (SMs) decode instructions. Each SM can process multiple instructions at once and assign them to available cores.
-
Executing − The decoded instructions are executed by multiple small cores in the SM. These cores perform operations like matrix multiplication and vector operations for graphics rendering and machine learning.
-
Writing back − The findings are either returned to GPU memory or transmitted to the display output.
总体而言,GPU 工作包括 −
Overall, GPU working includes −
-
Parallel Processing − GPUs, unlike CPUs, have thousands of small cores which are integrated with the system to do parallel processing. This makes it extremely efficient for larger and more complex tasks that can be divided into smaller ones and apply parallel processing to them.
-
CUDA cores (NVIDIA) or stream processors (AMD) − These are the basic processing units of a GPU, which can execute the processes on their own. Modern GPUs exist with thousands of these cores.
-
Memory − A GPU has its memory which is known as Graphics Memory or VRAM (Video RAM). A VRAM is capable enough to do multiple tasks at once. This allows them to rapidly process and render images.
-
Shader − Shaders are specialised processing units within a GPU. They are specifically designed to perform vertex shading, geometry shading, pixel shading, and computation. These units support rendering graphics and computations.
-
APIs − To optimise GPUs, software applications use programming interfaces such as CUDA or OpenCL to manage and perform parallel activities. These APIs give support to developers with tools, frameworks and libraries to help them design programmes that make the best use of GPU capabilities.
-
Data and task parallelism − GPUs are capable enough to perform data parallelism and task parallelism on different sets of data simultaneously.
-
SIMD (Single Instruction, Multiple Data) − This paradigm enables GPUs to perform the same action on multiple data points at once making them useful for image processing and scientific computations.
-
Task distribution − Workloads for graphics rendering or scientific simulations are divided into different smaller jobs; each of them is assigned to a separate thread that the GPU then runs concurrently. This strategy considerably reduces total processing time.
-
Thread execution − Threads are smaller units of work that allow concurrent processing; this process shows how GPUs function. A GPU can support thousands of threads at a time.
Characteristics of GPU
GPU 的一些主要特征如下 −
Some of the key characteristics of GPU are as follows −
-
Parallel processing − GPUs contain thousands of specialized to perform multiple tasks simultaneously. GPUs include SIMD, this feature allows the GPU to apply the same operation on multiple data points in parallel.
-
Memory − GPUs have their memory. GPUs Video RAM enables rapid access to data and faster data transfer.
-
High Throughput − The parallel processing feature of GPUs provides high throughput.
-
Shaders − Shaders allow for transformations and lighting, texturing, shading and computational tasks beyond graphics rendering
-
Scalability − GPUs can scale up that system from a few cores to thousands.
-
Software Ecosystem − The GPU ecosystem supports APIs like as OpenGL, DirectX, and Vulkan, as well as frameworks like CUDA (NVIDIA) and OpenCL, allowing developers to use GPU capability for both graphics and general-purpose computing.
Applications of GPU
GPU 被最广泛用于的一些常见应用领域如下 −
Some of the common application areas where GPUs are most widely used are as follows −
-
Gaming − Gaming is most widely used for real-time rendering of high-resolution and complex graphics.
-
Visual effects − It is used in films and television shows to produce realistic simulations, 3D animations, and intricate special effects,
-
3D Modelling − CAD and 3D rendering applications fully rely on GPUs for 3D models.
-
AI and Machine Learning − GPUs can process complex computations due to this; GPUs are used in AI and machine learning for training and inference of neural networks.
-
Scientific Computing − GPUs are extremely useful in the domain of physics, chemistry, biology, simulations and data analysis.
-
Cryptocurrency Mining − GPUs are used to validate transactions on blockchain networks, solving cryptographic puzzles.
-
Scientific Computing − Scientific computing includes simulations and data analysis.
Advantages of GPUs
GPU 的一些主要优势如下 −
Some of the key advantages of GPUs are as follows −
-
Quicker execution − GPU computing does fast execution and gives quicker results.
-
High processing power − GPUs are made with thousands of small processing cores which perform tasks in parallel mode. This parallel processing enables a GPU to do multiple complex processing at a time.
-
Scalability − GPUs are highly scalable.
-
Cost-effective solutions − Graphics processing units are a cost-effective solution for a wide range of computing tasks, as they eliminate the need for specialised processors or hardware.
-
Graphics rendering − High-quality 3D visuals and visual effects in animation, video games and simulations are rendered using GPU computing.
Disadvantages of GPUs
GPU 的主要缺点如下 −
Some of the main disadvantages of GPUs are as follows −
-
Complexity − Developing applications that properly utilise GPU capabilities is difficult and requires skills in specialised programming languages and frameworks.
-
Limited single-thread performance − A small core of GPUs is less powerful than CPU cores for single-threaded tasks.
-
Memory constraints − GPU memory is limited which can hamper tasks that require extensive memory access.
-
Compatibility and driver issues − Updating GPU drivers is essential to optimise GPU performance.