DLCB: Ahead-of-Time Compilation for Dynamic Deep Learning
Alexander Collins, Bin Fan, Evghenii Gaburov, William Brandon, Sean Lee, Hanfeng Chen, Vinod Grover
Key points
From the paper's conclusion- We present DLCB (Deep Learning Compiler Backend), a deep learning compiler that resolves this tension through a unified three-tier compilation strategy.
Abstract
Deep learning workloads are increasingly deployed in settings where tensor shapes are not fully known at compile time. Batch sizes vary across requests, sequence lengths differ between inputs, and model architectures admit a range of spatial resolutions. This dynamism creates a fundamental tension: ahead-of-time compiled GPU kernels deliver peak performance but traditionally require fully static tensor shapes, while just-in-time compilation supports dynamic shapes at the cost of runtime compilation overhead. We present DLCB (Deep Learning Compiler Backend), a deep learning compiler that resolves this tension through a unified three-tier compilation strategy. For programs with fully static tensor shapes, DLCB generates static CUDA C++ kernels ahead of time. For programs whose tensor rank is statically known but whose dimension sizes are dynamic, DLCB generates AOT kernels parameterized by those dimensions, compiling once and executing across a range of shapes. For programs with tensors of unknown rank, DLCB falls back to JIT compilation at runtime. For AOT compilation with dynamic shape tensors, our approach builds a system of shape constraints from the input program, and uses a solver to reduce these to either a) fixed constraints that produce hard-coded constants in the generated kernel; b) unresolved constraints which become kernel parameters passed at launch time, along with interpreted host code to check that the constraint holds for a given set of inputs and to compute the values to pass. Our compiler and runtime are embedded in PyTorch, and use an automatic shape generalization pass to enable AOT compilation with dynamic shapes for supported subsets of PyTorch programs
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Deep Learning Compilers: Architecture, Optimization, and Empirical CharacterizationarXiv · 2026
- Cleave: Scaling Tensor Program Optimization via Decoupled Algebraic Search and Operator SchedulingarXiv · 2026
- Stateful Testing for Deep Learning CompilersarXiv · 2026
- DataHelix: A CPU-GPU Co-Scheduling Data Plane for Multimodal Model TrainingarXiv · 2026
- KernelOPT: Dispatch-Aware Agentic Search for GPU Kernel OptimizationarXiv · 2026
- Critical Compilation Strictness for Certified Selective Hardening Against Compiler-Conditioned DNN BackdoorsElectronics · 2026