levi (@levidiamode) header
levi (@levidiamode) profile picture

365 days of GPU programming ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░ 327/365

out of memory
Joined June 2025
Photo by levi (@levidiamode)Photo by levi (@levidiamode)Photo by levi (@levidiamode)Photo by levi (@levidiamode)Photo by levi (@levidiamode)Photo by levi (@levidiamode)Photo by levi (@levidiamode)
Day 83/365 of GPU Programming Looking at DeepSeek's Multi-Head Latent Attention today. The last part of the AMD challenge series is to optimize an MLA decode kernel for MI355X where the absorbed Q and compressed KV cache are given and your task is to do the attention computation. A resource that really helped internalize what MLA does was @rasbt's incredible visual guide to attention variants in LLMs (luckily he posted that last week!), which covers everything from MHA to GQA to MLA to SWA, et cetera. If there's one place to get a visual intuition for recent attention mechanisms, it's this blog post. @jbhuang0604's video on MQA, GQA,MLA and DSA was the best conceptual intro I found on the topic and progressively builds up the ideas from first principles. The Welch Labs analysis of MLA is a great watch as well. Beautiful visualization of the changes DeepSeek made for MLA. Tried out a few kernels once I had a basic understanding of MLA and I think I'm slowly getting more comfortable with at least analyzing kernels.
Day 82/365 of GPU Programming Taking a closer look at Mixture of Experts today, so I can write better MoE kernels. Specifically, to optimize an MXFP4 MoE fused kernel for the GPU Mode challenge. I haven't had much prior exposure to MoEs, so lots of new concepts I learned today. Luckily I found the best intro to MoEs thanks to @MaartenGr visual overview of the topic. I then watched @tatsu_hashimoto's amazing Stanford CS336 lecture on MoEs, which added deeper context around why MoEs are gaining popularity, FLOPs, OLMoE, infra complexity, routing functions (mindblown this works so well...), expert sizes, training objectives, top k routing and DeepSeek variations. Once I had a basic understanding I started playing around with the some AITER kernels but progress there is tbd. Also had a nice chat with @juscallmevyom (who was kind enough to reach out!) about the AMD kernels and the challenge of materialization overhead.
23
146
2
1,471
133,296
Day 331/365 of GPU Programming Learning more about Helion from the PyTorch team today. Looks like an interesting higher level layer for automatically tuned GPU kernels. They describe the programming model as "PyTorch with tiles". Not easy keeping track of all the DSLs out there these days though...
Day 330/365 of GPU Programming Really enjoying Stanford's Deep Learning Alchemy course so far. Alchemy is great name for the class given how much emphasis is given to the experimental nature of deep learning today and building skills that translate to conducting and predicting experiments effectively. Think this is not just increasingly important for ML research but also kernels, inference engineering, etc.
4
3
52
1,369
Day 330/365 of GPU Programming Really enjoying Stanford's Deep Learning Alchemy course so far. Alchemy is great name for the class given how much emphasis is given to the experimental nature of deep learning today and building skills that translate to conducting and predicting experiments effectively. Think this is not just increasingly important for ML research but also kernels, inference engineering, etc.
Day 329/365 of GPU Programming Finally got around to properly reading this seminal paper today: In-Datacenter Performance Analysis of a Tensor Processing Unit from the 44th International Symposium on Computer Architecture (ISCA) in 2017 which was a first detailed look at Google's TPUv1 in the context of real datacenter workloads.
2
6
1
66
2,775
Day 329/365 of GPU Programming Finally got around to properly reading this seminal paper today: In-Datacenter Performance Analysis of a Tensor Processing Unit from the 44th International Symposium on Computer Architecture (ISCA) in 2017 which was a first detailed look at Google's TPUv1 in the context of real datacenter workloads.
Day 328/365 of GPU Programming One thing I really appreciate is when courses don't just post their lectures but also everything around the course that made the learning experience valuable to the students (i.e. guest talks, assignments, quizzes, etc). Really nice to see Stanford's new Deep Learning Alchemy Course (CS312) release the quiz reviews/discussions alongside their lectures. Think this CS312 + CS336 will directionally be what CS231n and Andrew Ng's coursera course were for many people a few years ago (as in, their first deeper entry/look into the field).
4
1
66
2,950
Day 328/365 of GPU Programming One thing I really appreciate is when courses don't just post their lectures but also everything around the course that made the learning experience valuable to the students (i.e. guest talks, assignments, quizzes, etc). Really nice to see Stanford's new Deep Learning Alchemy Course (CS312) release the quiz reviews/discussions alongside their lectures. Think this CS312 + CS336 will directionally be what CS231n and Andrew Ng's coursera course were for many people a few years ago (as in, their first deeper entry/look into the field).
Day 327/365 of GPU Programming Starting to see more information come out around performance optimizations on Nvidia's Vera Rubin (albeit mostly high level). Will be interesting to see broader availability of these in 2027, expecting lots of interesting work to explore once access is more widespread.
1
6
1
67
3,084
Day 327/365 of GPU Programming Starting to see more information come out around performance optimizations on Nvidia's Vera Rubin (albeit mostly high level). Will be interesting to see broader availability of these in 2027, expecting lots of interesting work to explore once access is more widespread.
Day 326/365 of GPU Programming I am unreasonably excited that Stanford finally released the first few lectures for their CS312 Deep Learning Alchemy course. It's probably the most interesting Machine Learning resource I've seen out there trying to get students to build an intuition for this very strange field of deep learning by running a ton of experiments and trying to make predictions about the outcome of these. I think this will be super useful for getting a better sense of ML architectures and systems at large.
2
4
2
97
4,387
Day 326/365 of GPU Programming I am unreasonably excited that Stanford finally released the first few lectures for their CS312 Deep Learning Alchemy course. It's probably the most interesting Machine Learning resource I've seen out there trying to get students to build an intuition for this very strange field of deep learning by running a ton of experiments and trying to make predictions about the outcome of these. I think this will be super useful for getting a better sense of ML architectures and systems at large.
Day 325/365 of GPU Programming Another really interesting Google paper from MLSys 2021 (oral presentation) is Exploring the Limits of Concurrency in ML Training on Google TPUs. Covers scaling challenges, different forms of parallelism across thousands of TPUs, multipods, communication optimizations, register spilling, et cetera.
3
9
1
171
7,255
🗝️ Introducing Plato's Key. A single rotation lets independently trained LLMs use each other’s representations as their own. No gradients required ✨ With @jerrywliu, @MorrisYau, and @HazyResearch. 🧵 hazyresearch.stanford.edu/bl…
357
1,294
447
10,191
1,279,254
Day 325/365 of GPU Programming Another really interesting Google paper from MLSys 2021 (oral presentation) is Exploring the Limits of Concurrency in ML Training on Google TPUs. Covers scaling challenges, different forms of parallelism across thousands of TPUs, multipods, communication optimizations, register spilling, et cetera.
Day 324/365 of GPU Programming Going through David Patterson's arxiv history has been quite informative. His recent publications are a mix of research papers and more informal opinion pieces. Some interesting examples I came across: Google's Training Supercomputers from TPU v2 to Ironwood: Architectural Stability, Scale, Resilience, Power Efficiency, and Sustainability Across Five Generations, TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning with Hardware Support for Embeddings, Challenges and Research Directions for Large Language Model Inference Hardware.
5
6
1
72
6,291
Wanted to share my thoughts on the inference hardware challenges + opportunities paper from Xiaoyu Ma and David Patterson from Google (also sent in the Modal research slack channel 😅) "really great read about the hardware-level inefficiencies of inference and research opportunities to make inference way more efficient. david patterson is probably the most famous computer architect alive and has usually been right when predicting important things into the future (RISC ISAs, hardware specialization, end of moores law/dennard scaling, etc) challenges tldr - > memory wall - HBM bandwidth is scaling way slower than FLOPs. this means that are chips are becoming more compute bound, which is bad for low batch decode > expensive memory - DRAM is becoming more expensive and density is decelerating, which is bad for big model inference. SRAM chips are mentioned, but growing model sizes make them infeasible at scale > e2e latency - realtime serving requires lower latency. in these regimes, we are super memory bound on GPUs and interconnect latency outweighs bandwidth opportunities tldr - > high-bandwidth flash - stacking flash dies like traditional HBM stacks gives order-of-magnitude win in capacity. drawback is write endurance (writing too much eventually breaks the flash), but this is fine for inference when we just serve 1 model’s weights and keep activations in DRAM (?) > processing-in-memory - this has been a hot topic in comparch for the last few years, and tries to do most computation close to memory so we limit data movement (which is the main energy cost in chips). table 4 in the paper is a nice breakdown of tradeoffs. > 3d memory stacking - self-explanatory name. this has real power implications (chips get hotter = cooling stacked chips is harder), but this gives us better bw and capacity. all AI chips are moving towards this in the coming years > low latency interconnect - goes hand in hand with disaggregation over more specialized chip. in my time working on Rubin+LPU disagg, i found that interconnect latency was always the bottleneck. if this problem is solved, expect much more heterogenous disaggregation always cool to see where things are going on the hardware/comparch side!"
23
34
1
438
15,789
Day 324/365 of GPU Programming Going through David Patterson's arxiv history has been quite informative. His recent publications are a mix of research papers and more informal opinion pieces. Some interesting examples I came across: Google's Training Supercomputers from TPU v2 to Ironwood: Architectural Stability, Scale, Resilience, Power Efficiency, and Sustainability Across Five Generations, TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning with Hardware Support for Embeddings, Challenges and Research Directions for Large Language Model Inference Hardware.
Day 323/365 of GPU Programming Have been mainly looking at TPU resources recently, so going to spend today to review some of the materials from the past few days and study related topics that I'm unsure about like XLA or inter chip interconnects.
1
5
1
75
3,542
Day 323/365 of GPU Programming Have been mainly looking at TPU resources recently, so going to spend today to review some of the materials from the past few days and study related topics that I'm unsure about like XLA or inter chip interconnects.
Day 322/365 of GPU Programming I find seminars are usually some of the highest density places to look for interesting talks. Like this one on "A Domain-Specific TPU Supercomputer for Training Deep Neural Networks" from WISC's Virtual Computer Architecture Seminar in 2020 is such a useful look into how the early TPU team thought TPU chips across generations in a comprehensive way that goes beyond architecture and into codesign (e.g. XLA).
2
8
1
78
3,551
Day 322/365 of GPU Programming I find seminars are usually some of the highest density places to look for interesting talks. Like this one on "A Domain-Specific TPU Supercomputer for Training Deep Neural Networks" from WISC's Virtual Computer Architecture Seminar in 2020 is such a useful look into how the early TPU team thought TPU chips across generations in a comprehensive way that goes beyond architecture and into codesign (e.g. XLA).
Day 321/365 of GPU Programming Another interesting TPU resource is this talk on "10 lessons from three generations of TPUs and how they shaped TPU v4i" (based on the corresponding Google paper) from ETH Zurich's Seminar in Computer Architecture in 2022. I thought it was a really insightful look into what goes on behind the scenes of the design process of a new TPU architecture.
1
4
1
51
3,166