llvm / llvm/llvm-project

MLGO without TensorFlow dependency

Open
#199,007 3 comments 1 reaction 1 assignee Claimed by @banach-space View on GitHub
metaissue mlgo
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.