• Graphics processor: what is it and why is it used? How does a graphics card work? Its graphics processor is used in

    CPUs and GPUs are very similar; they are both made of hundreds of millions of transistors and can process thousands of operations per second. But what exactly is the difference between these two important components of any home computer?

    In this article we will try to explain in a very simple and accessible way what is the difference between a CPU and a GPU. But first we need to look at these two processors separately.

    The CPU (Central Processing Unit or Central Processing Unit) is often called the “brain” of the computer. Inside the central processor there are about a million transistors, with the help of which various calculations are performed. Home computers typically have processors that have 1 to 4 cores and clock speeds of approximately 1 GHz to 4 GHz.

    The processor is powerful because it can do everything. A computer is capable of performing a task because the processor is capable of performing that task. Programmers have been able to achieve this thanks to the wide instruction sets and huge lists of functions shared in modern central processing units.

    What is GPU?

    A GPU (Graphics Processing Unit or Graphics Processing Unit) is a specialized type of microprocessor optimized for very specific computing and graphics display. A GPU runs at a lower clock speed than a CPU, but has many more processing cores.

    You can also say that a GPU is a specialized CPU made for one specific purpose - video rendering. During rendering, the GPU performs simple mathematical calculations a huge number of times. The GPU has thousands of cores that will run simultaneously. While each GPU core is slower than a CPU core, it is still more efficient at performing simple math calculations needed to display graphics. This massive parallelism is what makes the GPU capable of rendering the complex 3D graphics required by modern games.

    Difference between CPU and GPU

    The GPU can only do a fraction of the things a CPU can do, but it does it at incredible speeds. The GPU will use hundreds of cores to perform urgent calculations on thousands of pixels while rendering complex 3D graphics. But to achieve high speeds, the GPU must perform monotonous operations.

    Take, for example, Nvidia GTX 1080. This video card has 2560 shader cores. Thanks to these cores, the Nvidia GTX 1080 can execute 2,560 instructions or operations in one clock cycle. If you want to make the picture 1% brighter, the GPU can handle it without much difficulty. But the quad-core Intel Core i5 central processor can only execute 4 instructions in one clock cycle.

    However, CPUs are more flexible than GPUs. Central processing units have a larger instruction set so they can perform a wider range of functions. CPUs also operate at higher maximum clock speeds and have the ability to control the input and output of computer components. For example, the central processing unit can be integrated with virtual memory, which is necessary to run a modern operating system. This is exactly what the GPU cannot do.

    GPU Computing

    Even though GPUs are designed for rendering, they are capable of more. Graphics processing is only a type of repetitive parallel computation. Other tasks, such as Bitcoin mining and password cracking, rely on the same kinds of massive data sets and simple mathematical calculations. This is why some users use video cards for non-graphical operations. This phenomenon is called GPU Computation or GPU computing.

    Conclusions

    In this article we compared CPU and GPU. I think it has become clear to everyone that GPUs and CPUs have similar goals, but are optimized for different calculations. Write your opinion in the comments, I will try to answer.

    Modern video cards, due to the enormous computing power they require when working with graphics, are equipped with their own commandcenter, in other words - the graphics processor.

    This was done in order to “unload” the central processor, which, due to its wide “scope of application,” is simply not able to cope with the requirements that moderngaming industry.

    Graphics processing units (GPUs) are absolutely not inferior to central processors in complexity, but due to their narrow specialization, they are able to more effectively cope with the task of processing graphics, constructing an image, and then displaying it on the monitor.

    If we talk about the parameters, they are very similar for GPUs to central processors. These are parameters already known to everyone, such as processor microarchitecture, clock frequency core work, production process. But they also have quite specific characteristics. For example, an important characteristic of a GPU is the number of pixel pipelines. This characteristic determines the number of pixels processed per GPU clock cycle. The number of these pipelines may vary, for example, in the Radeon HD 6000 series graphics chips, their number can reach 96.

    The pixel pipeline is engaged in calculating each subsequent pixel of the next image, taking into account its features. To speed up the rendering process, several parallel running pipelines are used that calculate different pixels of the same image.

    Also, the number of pixel pipelines affects an important parameter - the filling speed of the video card. The fill rate of a video card can be calculated by multiplying the core frequency by the number of pipelines.

    Let's calculate the fill rate, for example, for an AMD Radeon HD 6990 video card (Fig.2) The GPU core frequency of this chip is 830 MHz, and the number of pixel pipelines is 96. With simple mathematical calculations (830x96), we come to the conclusion that the fill rate will be equal to 57.2 Gpixel/s.


    Rice. 2

    In addition to pixel pipelines, there are also so-called texture units in each pipeline. The more texture units, the more textures can be applied in one pass of the pipeline, which also affects the overall performance of the entire video system. In the aforementioned AMD Radeon HD 6990 chip, the number of texture sampling units is 32x2.

    In graphic processors, another type of pipeline can be distinguished - vertex pipelines, they are responsible for calculating the geometric parameters of a three-dimensional image.

    Now, let's look at the step-by-step, somewhat simplified process of pipeline calculation, followed by image formation:

    1 - th stage.Data about texture vertices goes to vertex pipelines, which calculate geometry parameters. At this stage, the “T&L” (Transform & Lightning) block is connected. This block is responsible for lighting and image transformation in three-dimensional scenes. Data processing in the vertex pipeline is carried out by the vertex shader program.

    2 - oh stage.At the second stage of image formation, a special Z-buffer is connected to cut off invisible polygons and faces of three-dimensional objects. Next, the process of filtering textures occurs; for this, pixel shaders enter the “battle”. The OpenGL or Direct3D programming interfaces describe standards for working with three-dimensional images. The application calls a certain standard OpenGL or Direct3D function, and shaders perform this function.

    3rd stage.At the final stage of image construction in pipeline processing, the data is transferred to a special frame buffer.

    So, we have just briefly reviewed the structure and operating principles of GPUs; the information, of course, is not “easy” to understand, but for general computer development, I think it will be very useful :)

    We all know that a video card and a processor have slightly different tasks, but do you know how they differ from each other in the internal structure? Like CPU central processing unit), and GPU (English - graphics processing unit) are processors, and they have a lot in common, but they were designed to perform different tasks. You will learn more about this from this article.

    CPU

    The main task of the CPU, in simple terms, is to execute a chain of instructions in the shortest possible time. The CPU is designed to execute several such chains at the same time, or to split one stream of instructions into several and, after executing them separately, merge them back into one, in the correct order. Each instruction in a thread depends on the ones that follow it, which is why the CPU has so few execution units, and the entire emphasis is on execution speed and reducing downtime, which is achieved using cache memory and a pipeline.

    GPU

    The main function of the GPU is rendering 3D graphics and visual effects, therefore, everything is a little simpler: it needs to receive polygons as input, and after performing the necessary mathematical and logical operations on them, output pixel coordinates. Essentially, the work of a GPU comes down to operating on a huge number of tasks independent of each other; therefore, it contains a large amount of memory, but not as fast as in a CPU, and a huge number of execution units: in modern GPUs there are 2048 or more of them, while like a CPU, their number can reach 48, but most often their number lies in the range of 2-8.

    Main differences

    The CPU differs from the GPU primarily in the way it accesses memory. In the GPU it is coherent and easily predictable - if a texture texel is read from memory, then after a while the turn of neighboring texels will come. The situation is similar with recording - a pixel is written to the framebuffer, and after a few clock cycles the one located next to it will be recorded. Also, the GPU, unlike general-purpose processors, simply does not need a large cache memory, and textures require only 128–256 kilobytes. In addition, video cards use faster memory, and as a result, the GPU has many times more bandwidth available, which is also very important for parallel calculations that operate with huge data streams.

    There are many differences in multithreading support: the CPU executes 1 2 threads of calculations per processor core, and the GPU can support several thousand threads for each multiprocessor, of which there are several on the chip! And if switching from one thread to another costs hundreds of clock cycles for the CPU, then the GPU switches several threads in one clock cycle.

    In a CPU, most of the chip area is occupied by instruction buffers, hardware branch prediction, and huge amounts of cache memory, while in a GPU, most of the area is occupied by execution units. The above described device is shown schematically below:

    Difference in computing speed

    If the CPU is a kind of “boss” that makes decisions in accordance with the instructions of the program, then the GPU is a “worker” that performs a huge number of similar calculations. It turns out that if you feed independent simple mathematical tasks to the GPU, it will cope much faster than the central processor. This difference is successfully used by Bitcoin miners.

    Mining Bitcoin

    The essence of mining is that computers located in different parts of the Earth solve mathematical problems, as a result of which bitcoins are created. All Bitcoin transfers along the chain are transmitted to miners, whose job is to select from millions of combinations a single hash that matches all new transactions and a secret key, which will ensure that the miner receives a reward of 25 bitcoins at a time. Since the calculation speed directly depends on the number of execution units, it turns out that GPUs are much better suited for performing this type of task than CPUs. The greater the number of calculations performed, the higher the chance of receiving bitcoins. It even went so far as to build entire farms out of video cards.

    Many people have seen the abbreviation GPU, but not everyone knows what it is. This component, which is part of video cards. Sometimes it is called a video card, but this is not correct. The GPU is busy processing commands that form a three-dimensional image. This is the main element on whose power depends performance the entire video system.

    Eat several types such chips - discrete And built-in. Of course, it’s worth mentioning right away that the first one is better. It is placed on separate modules. It is powerful and requires good cooling. The second one is installed on almost all computers. It is built into the CPU, making energy consumption several times lower. Of course, it can’t compare with full-fledged discrete chips, but at the moment it shows pretty good results.

    How the processor works

    GPU is engaged processing 2D and 3D graphics. Thanks to the GPU, the computer's CPU is freer and can perform more important tasks. The main feature of the GPU is that it tries as much as possible increase speed calculation of graphic information. The chip architecture allows for greater efficiency process graphic information rather than the central CPU of a PC.

    GPU installs location three-dimensional models in the frame. Engaged in filtering triangles included in them, determines which ones are visible, and cuts off those that are hidden by other objects.

    GPU (Graphics Processing Unit) is a processor designed exclusively for graphics processing and floating point calculations. It primarily exists to ease the workload of the main processor when it comes to demanding games or 3D graphics applications. When you play a game, the GPU is responsible for creating graphics, colors, and textures, while the CPU can handle artificial intelligence or game mechanic calculations.

    What do we look at first when choosing a smartphone? If we ignore the cost for a moment, then first of all we, of course, choose the screen size. Then we are interested in the camera, the amount of RAM, the number of cores and the processor frequency. And here everything is simple: the more, the better, and the less, the worse. However, modern devices also use a graphics processor, also known as GPU. What it is, how it works and why it is important to know about it, we will tell you below.

    The GPU architecture is not very different from the CPU architecture, but it is more optimized for efficient graphics processing. If you force the GPU to do any other calculations, it will show its worst side.

    Video cards that are connected separately and run at high power exist only in laptops and desktop computers. If we are talking about -devices, then we are talking about integrated graphics and what we call SoC (System-on-a-Chip). For example, the processor has an integrated Adreno 430 GPU. The memory it uses for its operation is system memory, while graphics cards in desktop PCs are allocated memory available only to them. True, there are also hybrid chips.

    While a CPU with multiple cores runs at high speeds, a GPU has many processor cores that run at low speeds and do little more than compute vertices and pixels. Vertex processing mainly revolves around the coordinate system. The GPU handles geometry tasks by creating three-dimensional space on the screen and allowing objects to move within it.

    Pixel processing is a more complex process that requires a lot of processing power. At this point, the GPU applies various layers, applies effects, and does everything to create complex textures and realistic graphics. Once both processes are processed, the result is transferred to the screen of your smartphone or tablet. All this happens millions of times per second while you play a game.

    Of course, this story about the operation of the GPU is very superficial, but it is enough to get a good general idea and be able to carry on a conversation with friends or an electronics seller, or understand why your device gets so hot during the game. Later we will definitely discuss the advantages of certain GPUs when working with specific games and tasks.

    Based on materials from AndroidPit