02 Automatic kernel creation
Every model × accelerator pair gets its own kernels.
Most engines ship one set of kernels and hope it fits. FastLLM treats tuning as a search
problem. Give it a model and a GPU, and the optimizer explores tile shapes, split strategies, thread counts and
fusion boundaries, discards any candidate that disagrees with the reference output, measures the survivors
under the profiler and writes the fastest into the engine's kernel table.
- Describemodel shapes, dtype, KV layout, target device
- Searcha space of kernel templates and knobs
- Gatebit-for-bit and tolerance checks against a reference
- Measureprofiler timings, not wall-clock guesses
- Installa per-device kernel table, loaded at startup
Next: a learned model of the accelerator that predicts which kernel wins before it is
measured, and then writes new kernels outright.