Research2026-11-24

Amazon proved layout selection in ML compilers is NP-hard. Its exact solver found the optimum for ResNet-50 took 63.9M cycles. Triton’s heuristic took 20.9M cycles but used a flawed cost model. Tests showed the heuristic overestimated costs by 4x for fp32 and 19x for fp16. Updating the model changed little in practice. Rematerialization often avoids conversions entirely. Performance mismatches traced to instruction ordering in ptxas. A matmul saw 15–26x speedup from reordering. Register use dropped from 255 to 40 in one case. The paper highlights the complexity of layout optimization. Heuristics still work well for most kernels. The real challenge is modeling downstream compiler and hardware behavior.

What changed

Triton used a simple cost model for layout conversions: 0 or 32xbytes.

What it unlocks

Using a more accurate cost model for layout conversions in ML compilers.

  • 63.9M cycles for proven optimum on ResNet-50
  • 20.9M cycles for heuristic on ResNet-50
  • 4x overestimate for fp32
  • 19x overestimate for fp16

What you need to act on it

  • a Triton compiler environment
  • matmul-heavy workloads

Send this to someone who needs it

Shares the story and its sources. Nothing about you.

What does this mean for your job?

This is the story as everyone gets it. Once a week we send you the version written for your role — what changed, why it matters for the work you actually do, and one thing to try. Free while we tune it.