llvm-project
c90b6414 - [mlgo] Allow passing pre-emitc-ed models (#227941)

Commit
2 days ago
[mlgo] Allow passing pre-emitc-ed models (#227941) Support pre-lowering models and then passing them via the exact same mechanism - i.e. `LLVM_MLGO_MODELS`. The extension for the pre-generated ones needs to be `.inc`. High level, this just skips trying to run the mlir toolchain over those. Mixing `.inc` and `.mlir` is supported. The mlir toolchain isn't required unless `.mlir` are passed in the list. As a result we can test the AOT case in regular builds. We just always append to the `LLVM_MLGO_MODELS`list the test models, with an "ugly" command line flag (a `_test` prefix). Each pass just lists the mlir test model and its corresponding .inc as part of the call to `MLGOLower`. The bulk of the change is changing tests accordingly, and the addition of the same models we use in the mlir case, but EmitC-ed. A subsequent change will remove listing the mlir models in llvm-zorg, since they now get auto-appended to the list when the mlir tools are specified. In the interim (after this change lands but before we change zorg) the ml-rel bot won't get red because we register the models under a dfferent name on zorg. Issue #199007
Author
Parents
Loading