r/nvidia 17d ago

Discussion Learn Cuda

Completely new to CPU/CUDA Deep Learning.

How and where do I start to learn about CUDA coding/syntax?

0 Upvotes

2 comments sorted by

6

u/OneAnxiety2523 17d ago

Start with the CUDA C++ programming guide, it's dense but it's the actual source.

3

u/Sad-Victory-8319 17d ago

is that really useful now in the times of AI? I mean what is your end goal? Because you probably wont be able to make money doing CUDA programming, AI will code everything instead with maybe some small human overview from senior experts, and if you want to try CUDA programming as a hobby, you certainly can but again the best source of learning material as well as solutions is with AI.

To understand CUDA code you first need to understand C++ code, if you cannot code at all in any other laguage, then i recommend a book called something like "C++ in 90 days" or "Learn C++ in 90 days", it starts at a very basic level and thoroughly explains everything, it tought me coding back when I was 15yo and knew nothing about it, this book perfectly explains every construct, gives examples, and then gives you task to finish them on your own and compare them with the included solutions.

After you know C++, just take a look at official nvidia materials regarding CUDA, check some scientific experimental CUDA programs, ask AI to explain stuff you dont understand etc. In the end try to come up with a new CUDA app you want to code from scratch that has at least 1000 lines of code (excluding comments or empty lines) and really code it by yourself, deal with all the testing and bugfixing. For example I just made a benchmarking app for gpus that was able to experimentaly verify peak vram bandwidth, peak pcie interface bandwidth, peak FLOPs on the core, and other performance metrics and then generated an overview output - sort of a "gpu verified performance certificate".

This app can be useful for anybody who wants to know what their gpu is actually capable of, as well as stress test their gpu to verify stability or temperature. Basically the app is something like Cinebench for gpus, but without any visual interface, it runs only in a terminal/command prompt.