Torch Compile 被低估:默认 kernel 加 CUDA Graphs 与 PDL 达 megakernel 98%

simran_s_arora · x · 2026-11-17

Dylan Lim thread 的另一段结论:Torch Compile 的通用性和性能被低估了——用默认 Inductor kernel、CUDA Graphs 加细粒度 PDL 摆放,就能达到此前 Llama 1B megakernel 98% 的性能。

配图给出 Llama 1B / H100 / batch size 1 的阶梯数据:PyTorch eager 26 TPS → torch.compile 669 → 加 CUDA graphs 864 → 加 PDL 953 → 细粒度 PDL 975 TPS(megakernel 为 990 TPS)。但 Torch Compile 也有根本短板:编译器启发式无法稳定选中最优实现、孤立 kernel 测速不反映端到端速度、严格规则浪费性能。

原文链接 →

「编程与Agent」频道最新

更多「编程与Agent」频道 AI 资讯 →