D
D
Daniel2021-03-25 07:26:12
Programming
Daniel, 2021-03-25 07:26:12

And where are the calculations performed when working with images?

I must say right away that I have never thought about the device of video cards in my life. No matter how he faced, and did not worry.
And recently I found out that texture types are not stored in RAM, but somewhere in video memory (it seems to be simple logic, but I didn’t think about it). Now I study in detail the device of processors, architecture. And then I jumped to video cards, and I can’t understand the fundamental difference, except for the most superficial ones. Type what data where is stored and where it is processed. Or why 10,000 addition operations on the GPU are 800 times faster. (More precisely, not why, but why Then the Compiler does not optimize and does not transfer these calculations to the video card). Or why I haven't seen such examples in textbooks.
For example, I wrote to Neuronk a year ago, by identifying numbers, by drawing. Using c# Windows Forms, the question is, where were comparisons, additions, multiplications made? On GPU or CPU? If in cpu, then it is more logical to parallelize them in a video card, all these simple operations of the same type of multiplication addition. And then it is more logical to hang a TABOO, and use CUDA and others in all examples. Or what am I doing wrong.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2021-03-25
@daniil14056

You can’t just take and transfer calculations to the GPU - for this (for 2021), the program must be developed separately, taking into account the capabilities and structure of this very GPU.
The main advantage of the GPU is a high degree of parallelism on independent data. The GPU can simultaneously perform thousands of mathematical operations, provided that the result of each of them does not depend on the result of others - which is often found in image processing - hence the high speed of calculations.
However, the GPU can only work with the data that is loaded into the video memory, and the result is also written only to the video memory, which, as a rule, is less than conventional RAM.
It follows from this that you can win, counting on the GPU, only when the data is independent, fits well into the memory of the video card and has time to be pumped.

A
AntHTML, 2021-03-25
@anthtml

The difference is in the sharpness of the GPU specifically for a certain type of operation, which is why, with seemingly the same power, some data on the GPU is processed much faster than on the CPU. It's like now in Bitcoins - you can mine on the GPU, but Asic chips make it much faster. sharpened specifically for crypto-operations.
Compilers by default make a project that should work on everything, CUDA is far from being everywhere. Therefore, if you want to use CUDA, then read how to program it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question