All publications

Enhance Performance Tuning via LLM-guided Search Templates

2026·ICS 2026
LLMproposes templatestile(i,j)unroll(k)fuse(l1,l2)searchinstantiate · benchmarkkernelspeedup-O34.4× – 14.7× over gcc -O3(a) template proposal(b) measured speedups

Figure 1: LLM-guided templates constrain the tuning search. The model proposes transformation templates (a); the harness instantiates and benchmarks candidates against the -O3 baseline (b), keeping only measured winners.

Compilers stop where their heuristics end: gcc -O3 applies a fixed pipeline of transformations and calls it done, leaving performance on the table that only a search over transformation choices can recover. This paper asks a language model not to write fast code directly, but to propose search templates — structured spaces of loop tilings, unrollings, and fusions worth exploring for a given kernel.

The search then does what search does best: instantiate candidates from each template, benchmark them on real hardware, and keep the winners. The LLM contributes judgment about where to look; the harness contributes the proof. This division of labor is the same one Artemis productises — generators propose, the benchmark decides.

Key results

  • 4.4× to 14.7× speedups over gcc -O3 across PolyBench/C kernels
  • Templates prune the search space before any build is spent
  • Every reported gain measured on target hardware, not estimated