Current location - Plastic Surgery and Aesthetics Network - Clothing company - The difference between gpu acceleration and gpu operation
The difference between gpu acceleration and gpu operation
GPU is becoming more and more powerful. In addition to optimizing the display image, GPU has surpassed the general CPU in calculation. It would be a waste if such a powerful chip is only used as a graphics card, so NVIDIA introduced CUDA, which allows graphics cards to be used for purposes other than image computing, that is, games, so that GPU can exert its powerful computing power.

1, although we see the huge gap between CPU and GPU in computing power, we still have to look at the work he was responsible for at the beginning of the design. At the beginning of CPU design, it is responsible for how to process data one by one. The internal structure of CPU can be divided into three parts: control unit, logic unit and storage unit. If these three parts coordinate with each other, it can analyze, judge, calculate and control the coordination of all parts of the computer. The arithmetic unit mainly completes various arithmetic operations (such as addition, subtraction, multiplication and division) and logical operations (such as logical addition, logical multiplication and logical inversion); The controller has no arithmetic function, but only reads various instructions, analyzes them and makes corresponding control.

2. Usually there are several registers in the CPU, which can directly participate in the operation and store the intermediate results of the operation. The working principle of CPU is like the product processing process of a factory: raw materials (program instructions) entering the factory are dispatched by the material distribution department (control unit), sent to the production line (logical operation unit), produced finished products (processed data), stored in the warehouse (storage unit), and finally waited to be sold in the market (handed over to the application program). In this process, from the control unit, the CPU begins to work formally, and the intermediate process is to carry out operation processing through the logical operation unit and hand it over to the storage unit, which means the work is over. Data flows from the input device through the memory, waiting for CPU processing.

3. However, GPU can execute parallel instructions from the initial design, and it can be completely independent from receiving a set of polygon data from a GPU core to completing all processing and outputting images. Because GPU uses a large number of execution units at first, these execution units can easily load parallel processing instead of single-threaded processing like CPU. In addition, modern GPU can execute more single instructions per instruction cycle. For example, in some specific environments, Tesla architecture can simultaneously execute MAD+MULorMAD+SFU.