hughleat
For the auto-tuning, we suggest the best passes to use in LLVM. We take some effort to weed out bad passes, but LLVM has bugs. This is in common with any auto-tuner.
We train it to emulate the compiler. The compiler does that better already. We do it because it helps the LLM understand the compiler better and it auto-tunes better as a result.
We hope people will use this model to fine-tune for other heuristics. E.g. an inliner which accepts the IR or the caller and callee to decide profitability. We think things like that will be vastly cheaper for people if they can start from LLM Compiler. Training LLMs from scratch is expensive :-)
IMO, right now, AI should be used to decide profitability not correctness.
> What would be more interesting is training a large model on pure (code, assembly) pairs like a normal translation task.
It is that.
> Presumably a very generalized model would be good at even doing the inverse: given some assembly, write code that will produce the given assembly.
Is has been trained to disassemble. It is much, much better than other models at that.
- foundation model is pretrained on asm and ir. Then it is trained to emulate the compiler (ir + passes -> ir or asm)
- ftd model is fine tuned for solving phase ordering and disassembling
FTD is there to demo capabilities. We hope people will fine tune for other optimisations. It will be much, much cheaper than starting from scratch.
Yep, correctness in compilers is a pain. Auto-tuning is a very easy way to break a compiler.