Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
Latent Space · 2026/8/5 01:21:47
![[AINews] Megakernels are so dead and so back](https://substackcdn.com/image/fetch/$s_!Gpou!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FHNw6xyYaUAA_BVO.jpg)
[AINews] Megakernels are so dead and so back
AI 中文解读
Megakernels——这种让AI工程师又爱又恨的底层技术,最近在业内引发了一场热闹的“认错大会”。一位曾公开唱衰它的工程师如今发文道歉,但道歉的内容却是“抱歉我说对了每一件事”,这种反差十足的戏剧性让整个AI圈都围了过来。
用大白话讲,megakernel就像是给AI模型手工定制的一台精密机器。工程师花几个月时间把多个计算步骤焊在一起,只为了减少AI运行时“开关机”的等待时间。但问题是,这种手工打造的方式费时费力,在复杂的并行计算场景下,反而可能因为一环拖后腿而得不偿失。这位工程师当初就是看衰这种作法,认为在生产环境中没人会用六万多行代码的“手工艺术品”。如今随着新一代GPU硬件(Rubin)的出现,通过更聪明的任务调度,把尾部拖沓的计算单元问题解决了,手工融合的优势又能发挥出来,所以说是“死了又活过来了”。
这场争论背后的实际影响是:AI运行成本正在被精密地压低,速度在提升。对我们普通人来说,未来用AI应用会更流畅、更便宜,比如实时语音对话、高质量视频生成这类“吃性能”的功能也能在手机上跑起来。当然,这也意味着AI底层工程的复杂度在飙升,技术门槛越来越高,行业头部玩家的优势会更加明显。
Part of our Inference Engineering Masterclass pod yesterday involved a spicy discussion about Megakernels:megakernels are deadwhy are megakernels useful? you spend two months writing a kernel to save time on launch overhead and poor inter-kernel overlap. you had PDL but then people said it wasn't perfect, that you could still get some marginal gains due to straggler CTAs and therefore- wait, sorry, I forgot, Rubin fixes that (kernel two needs 10 CTAs and kernel one has seven finished and three straggling, kernel two launches seven of its CTAs). given a long enough timeline, it all evens out. no serious inference provider is using a 67k loc hand-fused forward pass kernel in production, and the teams doing that are doing so out of pure research. dead.@swyx's pod and said some things that i... should not have said. \n\na lot has happened since then, i owe you all an apology.\n\ni'm sorry that i was right about every single thing. \n\na) re megakernels are dead\nwhy are megakernels useful? you spend two months","username":"waterloo_intern","name":"ali","profile_image_url":"https://pbs.substack.com/profile_images/2083657716690759680/zzYf-2oG_normal.jpg","date":"2026-08-03T23:49:24.000Z","photos":[{"img_url":"https://pbs.substack.com/media/HO1VZaKWAAANbcS.jpg","link_url":"https://t.co/L3oxkoWQSG"},{"img_url":"https://pbs.substack.com/media/HO1VcNeWMAAuRvS.jpg","link_url":"https://t.co/L3oxkoWQSG"},{"img_url":"https://pbs.substack.com/media/HO1ZrovXgAAwGgY.jpg","link_url":"https://t.co/L3oxkoWQSG"}],"quoted_tweet":{"full_text":"The Inference Engineering Masterclass: 10x faster models, quantization, speculative decoding, Rubin, & self-optimizing AI https://t.co/uRYIWWDebj\n\n@Baseten @philipkiely and @waterloo_intern explain what actually happens after a model is trained, why turning weights into a fast","username":"latentspacepod","name":"Latent.Space","profile_image_url":"https://pbs.substack.com/profile_images/1888346877428641792/rMxtG84Z_normal.jpg"},"reply_count":53,"retweet_count":67,"like_count":1276,"impression_count":380220,"expanded_url":null,"video_url":null,"video_preview_media_key":null,"belowTheFold":false}" data-component-name="Twitter2ToDOM">The full discussion, for those who care to listen through:Ali: A fused kernel can’t save you. Like here with tensor parallelism, half the matrix is on one GPU and the other half is on another, and if I need the entire matrix in order to do like a nonlinear operation in the next step, which is, for instance, like if I’m doing attention, I need the softmax, or I need to do like exponentiation, I need to have the entire row. So I need to know what the partial result was from GPU 2 and what the partial result was from GPU 1 in order to be able to do the softmax in the next stage. So I have to make them communicate with each other, even if I had a fused kernel, because of the nonlinearities within each one. Also with like mega kernels, like honestly, I’m very bearish. It was a good research direction, and it seems like intuitively, theoretically, it’s nice. You have a lot of launch overhead from launching- Just- one kernel- Yeah, just keep fusing it and moving the data. Just fuse everything together. But the kernel complexity itself is very difficult to write a very optimized mega kernel. It’s very difficult to do so. And not to name any companies, but like even the companies that have worked or people that I’ve spoken to who work at companies that do fused mega kernels, they very often don’t end up running those in production because the TensorRT-LLM and modular kernels that launch are faster because you can optimize each individual component, and you can just have them parallelize with each other. One of the tech leads at NVIDIA launched a Twitter post said like, “We’re pulling the curtain on Rubin, and here’s the specs.” And the third tweet showed, like not to get too technical into it, I and I need to read it much
分享
阅读原文 ↗