Add missing lowering to CFG in mlir-cpu-runner + related cleanup
- the list of passes run by mlir-cpu-runner included -lower-affine and -lower-to-llvm but was missing -lower-to-cfg (because -lower-affine at some point used to lower straight to CFG); add -lower-to-cfg in between. IR with affine ops can now be run by mlir-cpu-runner. - update -lower-to-cfg to be consistent with other passes (create*Pass methods were changed to return unique ptrs, but -lower-to-cfg appears to have been missed). - mlir-cpu-runner was unable to parse custom form of affine op's - fix link options - drop unnecessary run options from test/mlir-cpu-runner/simple.mlir (none of the test cases had loops) - -convert-to-llvmir was changed to -lower-to-llvm at some point, but the create pass method name wasn't updated (this pass converts/lowers to LLVM dialect as opposed to LLVM IR). Fix this. (If we prefer "convert", the cmd-line options could be changed to "-convert-to-llvm/cfg" then.) Signed-off-by: Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#115 PiperOrigin-RevId: 266666909
This commit is contained in:
committed by
A. Unique TensorFlower
parent
2634273c59
commit
765d60fd4d
@@ -197,7 +197,7 @@ struct PythonMLIRModule {
|
||||
manager.addPass(mlir::createCanonicalizerPass());
|
||||
manager.addPass(mlir::createCSEPass());
|
||||
manager.addPass(mlir::createLowerAffinePass());
|
||||
manager.addPass(mlir::createConvertToLLVMIRPass());
|
||||
manager.addPass(mlir::createLowerToLLVMPass());
|
||||
if (failed(manager.run(*module))) {
|
||||
llvm::errs() << "conversion to the LLVM IR dialect failed\n";
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user