Why read something on the GPU?

 Why read something on the GPU?

Everyone has long known that video cards can be used not only to play with toys, but also to do things that have nothing to do with games, for example, train a neural network, memorize a cryptocurrency, or perform scientific calculations. You can read how it happened here, but I wanted to touch on the topic of why a GPU can be of any interest to an ordinary programmer (not associated with GameDev), how to start developing on a GPU without spending a lot of time on it, decide whether it is necessary at all look in this direction, and “figure out on your fingers” what profit you can get.

The article was written based on my speech at HighLoad ++. It deals mainly with technologies offered by NVIDIA. I have no goal to advertise any products, I just cite them as an example, and for sure something similar can be found in competing manufacturers.

Why read something on the GPU?

Two processors can be compared according to different criteria, probably the most popular ones are the frequency and number of cores, the size of caches, etc. a common metric is the number of floating point operations per second – flops. And when we want to compare warm with soft, and in our case, GPU with CPU, this metric comes in handy.

The graph below shows the growth of these same flops over time for processors and for video cards.