An Amazon paper, Tensor Seeks Layout, formally proves that tensor layout selection is NP-hard even when each operator has a constant number of inputs and each tensor admits only a small number of layouts, with hardness persisting in restricted settings resembling common matmul-heavy graphs. The authors build an exact solver for Trainium workloads and find that the proven optimum on ResNet-50 costs 63.9M cycles under their cost model, versus 20.9M for awkward heuristic rules, a gap they attribute to a flawed cost model. The piece argues the real difficulty is that compiler decisions such as Triton's RemoveLayoutConversions pass rely on inaccurate estimates of op costs across a closed-source software stack and the hardware itself.
Termsslug: layout-selection
Layout Selection
布局选择
Compiler optimization problem of choosing tensor memory layouts and conversions.
Curated Intelligence
Hacker News AIT2·Infra
58 pts