MLGO without TensorFlow dependency
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
This is an umbrella ticket to track the effort to remove the dependency of **MLGO** logic in LLVM on **TensorFlow** (see .e.g https://llvm.org/docs/MLGO.html and [CMakeLists.txt](https://github.com/llvm/llvm-project/blob/e4f1530edcc95a41e8fd8d13dca295aad814f75d/llvm/CMakeLists.txt#L1230-L1234)). Instead, we are working towards a fully in-tree solution based on MLIR, specifically:
* **TOSA → EmitC → C++**
### Blockers
- [x] Lower functions that return 1-element Tensor(s)/MemRef(s). (PR(s): https://github.com/llvm/llvm-project/pull/199686)
- [x] Lower `memref.dealloc` to EmitC. PR(s): https://github.com/llvm/llvm-project/pull/194591
- [ ] Handle "dummy" `cast`s that appear in the MLGO models and have no good representation at the C level. PR(s):
- [x] #186118
- [x] #188459
- [x] #203873
- [x] #202683
- [ ] Add a class wrapper to provide the expected interface for the MLGO logic in LLVM.
- [ ] #209829
### Non-blockers (workarounds are in place)
- [ ] Reflection map support: https://github.com/llvm/llvm-project/pull/150572
- [ ] Support cast to/from int64 in TOSA: https://github.com/arm/tosa-specification/issues/36
### Integration
- [ ] Add e2e test inside LLVM (TOSA model -> C++)
- [ ] Update the MLGO buildbots to use the new path: [ml-opt-dev-x86-64](https://lab.llvm.org/buildbot/#/builders/137) + [ml-opt-devrel-x86-64](https://lab.llvm.org/buildbot/#/builders/175) + [ml-opt-rel-x86-64](https://lab.llvm.org/buildbot/#/builders/185).Please let me know if I missed anything!
CC @mtrofin
Contributor guide
Assessment
This issue has not been assessed yet.