Tensor language model enables generative scheduling for efficient tensor compilation - Nature
Nature
In mitigation of this gap, this paper proposes the Tensor Language Model (TLM) Framework, a New tensor program generation system that can turn the problem of tensor program exploration into language generation. The principle behind it is to maintain a large, free decision space that is essential to do well but to take out inefficient sampling in favour of generating decisions based on language models16."). In that direction we propose a language-model-friendly tensor representation, the tensor language, where the structure of tensor programs (their operator graphs, hardware specifications, and scheduling decisions) is embedded in the form of compact sequences (tensor sentences). Compared to a typical representation of source code, these sentences are much shorter and they are optimised to [...] More recently, huge language models have also been added to the compilation workflow. Compilation aided 27. arXiv:2408.03408 .") Shows that GPT-4 can compile code at the accelerator level by prompting with structured pipelines, which can cut manual engineering work. AutoComp 28. arXiv:2505.18574 .") uses LLMs to optimise GEMM and convolutions, achieving huge speedups compared to vendor baselines. These works also demonstrate the generative ability of LLMs but are mostly concerned with instruction-level code generation and not systemic scheduling of tensors and frequently need prompt engineering or structural constraints to be accurate. [...] This paper presents a compilation framework based on generative tensors that redesigns schedule optimisation as an organised sequence generation, based on several intentional architectural and methodological decisions that allow a compilation to be efficient and scalable. The problem of scheduling is modelled as autoregressive sequence prediction since scheduling decisions inherently create ordered transformation paths where one s
阅读原文