Pinned Tweet
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.
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.
- Link to course: deep-learning-alchemy.github…
- Link to first lecture: youtube.com/watch?v=JLcCYvUa…
4
211
levi retweeted
🗝️ 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…
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.
- Link to paper: proceedings.mlsys.org/paper_…
- Link to oral: slideslive.com/38952755/oral…
5
217
levi retweeted
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!"
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.
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 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.
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.
Day 320/365 of GPU Programming
Another really good talk on TPUs six years later with a focus on TPU v4 (this was around the time v5 was announced but not available yet). The talk goes through rack architecture, optical circuit switches, reliability, slice availability, SparseCore, boards, pods, and more topics.
Day 320/365 of GPU Programming
Another really good talk on TPUs six years later with a focus on TPU v4 (this was around the time v5 was announced but not available yet). The talk goes through rack architecture, optical circuit switches, reliability, slice availability, SparseCore, boards, pods, and more topics.
Day 319/365 of GPU Programming
There's this wonderful talk from 9 years ago (a year after the TPU was introduced) where legendary computer scientist and former Google fellow Dave Patterson talks about the motivation behind Tensor Processing Units. Super fascinating to hear about inference workloads from back then and the start of what he calls a "new architecture renaissance".
Day 319/365 of GPU Programming
There's this wonderful talk from 9 years ago (a year after the TPU was introduced) where legendary computer scientist and former Google fellow Dave Patterson talks about the motivation behind Tensor Processing Units. Super fascinating to hear about inference workloads from back then and the start of what he calls a "new architecture renaissance".
Day 318/365 of GPU Programming
Going through the final lectures of the efficient ML course. Today's lecture being about distributed training. It's a nice review of topics that were also covered in CS336, e.g. ZeRO, FSDP and various forms of parallelisms across the stack. I really liked the reference list at the end which has a bunch of older papers I wasn't aware of.
Day 318/365 of GPU Programming
Going through the final lectures of the efficient ML course. Today's lecture being about distributed training. It's a nice review of topics that were also covered in CS336, e.g. ZeRO, FSDP and various forms of parallelisms across the stack. I really liked the reference list at the end which has a bunch of older papers I wasn't aware of.
Day 317/365 of GPU Programming
Just found out today the vLLM/inferact folks released a collection of megakernels for TPUs back in September which is a really interesting repo to scroll through. Also one fascinating thing about TPUs is how topologies affect kernel implementation (e.g. in this case, a 2×2×4 TPU chip topology)
Day 317/365 of GPU Programming
Just found out today the vLLM/inferact folks released a collection of megakernels for TPUs back in September which is a really interesting repo to scroll through. Also one fascinating thing about TPUs is how topologies affect kernel implementation (e.g. in this case, a 2×2×4 TPU chip topology)
Day 316/365 of GPU Programming
Learning more about Pallas kernels on TPU SparseCore today. As someone not super familiar with the JAX ecosystem and only vaguely familiar with TPU architecture, it's interesting to learn about the differences between ecosystems. Especially now as we're seeing greater acceleration in "time to onboard new silicon" as Anthropic put it, we'll probably see a much larger heterogeneity in chips/programming models.














































