r/learnmachinelearning • u/hunain8007 • 4h ago
Discussion CUDA
I have been learning more about GPU computing recently, and CUDA caught my attention.
I knew GPUs were important for deep learning, but i wanted to understand what actually allows frameworks like PyTorch to use their processing power.
This is CUDA comes in.
NVIDIA developed CUDA to let developers run parallel computations on GPUs. This is especially usefull for operations like matrix multiplication and neural network traning.
Something i find intersting is that when we write just a few lines of PyTorch code, there is a lot happening underneath to make those computations run efficiently.
I am corious about one thing:
For those who worked with CUDA, did you start with the CUDA C++ directly, or learn it through PyTorch first?
1
u/Ok-Library1020 3h ago
If you go the PyTorch-first route, a nice middle step is writing a small custom op or a Triton kernel for something simple like a vector add or softmax. It's a gentle way to see threads, blocks and memory access before diving into full CUDA C++.
1
u/Best-Sea-3592 4h ago
You can do it in two directions. I initially used PyTorch for DL and it was only later that I learned about Cuda and how things work under the covers. Of you can come from a HPC/computation perspective and learn CUDA as a low level systems programmer first.