Guide to GPU Programming

Nowadays, many AI models or machine learning models rely on GPUs for training. This is because GPUs have more cores compared to CPUs, allowing them to distribute tasks across multiple cores for parallel processing. Thus, GPUs play an increasingly important role in the AI era (should have invested in Nvidia earlier 😭).

p.s. CPUs can perform a wider variety of tasks than GPUs, so they are still necessary and valuable.

However, in general work or school courses, people don’t often deal with GPU programming, so most are more familiar with CPU programming. Fortunately, someone has kindly compiled a guide to GPU programming, along with some exercises to try out. This guide also teaches how to use Google Colab for learning, eliminating the need to set up an environment.

Note, though, that this guide is suitable for those with a foundation in C/C++/Fortran/Julia. It’s best to have a good understanding of these languages and basic programming knowledge before diving into this document:

https://enccs.github.io/gpu-programming/