How about bringing GPU to TinyTorch #1958
Replies: 2 comments 1 reply
|
Hi @aadityansha06 ! I really think this can be a natural extension to the tinytorch project or we can build a separate project like a GPU-TinyTorch to make this possible. GPU Engineering is the core of Infra, inference and ML Systems and really needs students to know how the code works. However, TinyTorch was built as a learning methodology of the under-the-hood components of PyTorch, Hence, this can be separate entity than that.
@profvjreddi sir, happy to hear your advice on this, and I'll be happy to work on this too. |
|
Hey @Shashank-Tripathi-07, thanks a lot man, glad you're into this too. Would love to collaborate on it. One more thing I want to bake into the simulator: modeling the CPU to GPU data transfer cost itself, not just kernel execution. Like when moving data actually helps vs when the transfer overhead eats the gain, and roughly how much bandwidth is available/used at that point. A lot of real bottlenecks in ML systems come from this exact decision (when NOT to move data), and its usually invisible to students since they just see final runtime numbers. So the tool could show something like: this kernel is fast, but you're paying more in transfer time than compute time, here's why. That ties in well with your CuBLAS/CuPy idea too since those libraries make these exact tradeoffs under the hood (same reason NumPy style libs offload to GPU only when it's worth it). @profvjreddi would love your input on this before starting working with the prototype. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm Aadityansha verma, c and inference developer, mostly self-taught and still learning
My work:
I recently started learning CUDA, and while working through basic kernels (vector/matrix addition, etc.) I ran into a gap I think a lot of students hit: it's very hard to build real intuition about GPU execution without a GPU, and even with one, the "why is this fast/slow" reasoning (memory coalescing, warp divergence, launch overhead, occupancy) isn't something you get from just running code and reading a number.
What I'm proposing
An educational tool with two connected pieces:
Anyone can run and debug kernel logic without owning a GPU
The simulator can visualize what real hardware does that's normally invisible: memory access patterns, coalescing vs. scatter, warp-level divergence from branching
Common math/ML kernels (sigmoid, softmax, matmul, reductions) as guided exercises, since that's where most students' interest actually is
I'd like feedback before I sink real time into this:
All reactions