Skip to content

Commit

Permalink
Add TosaToMLProgram to the tosa input conversion pass pipeline (#16281)
Browse files Browse the repository at this point in the history
Fixes [16251](#16251)
  • Loading branch information
NatashaKnk authored Feb 1, 2024
1 parent dda1647 commit 8e1eca9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ iree_compiler_cc_library(
"@llvm-project//mlir:TosaDialect",
"@llvm-project//mlir:TosaToArith",
"@llvm-project//mlir:TosaToLinalg",
"@llvm-project//mlir:TosaToMLProgram",
"@llvm-project//mlir:TosaToSCF",
"@llvm-project//mlir:TosaToTensor",
"@llvm-project//mlir:Transforms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ iree_cc_library(
MLIRTosaDialect
MLIRTosaToArith
MLIRTosaToLinalg
MLIRTosaToMLProgram
MLIRTosaToSCF
MLIRTosaToTensor
MLIRTransforms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "iree/compiler/InputConversion/Common/Passes.h"
#include "mlir/Conversion/TosaToArith/TosaToArith.h"
#include "mlir/Conversion/TosaToLinalg/TosaToLinalg.h"
#include "mlir/Conversion/TosaToMLProgram/TosaToMLProgram.h"
#include "mlir/Conversion/TosaToSCF/TosaToSCF.h"
#include "mlir/Conversion/TosaToTensor/TosaToTensor.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
Expand All @@ -31,6 +32,7 @@ void registerTOSAConversionPassPipeline() {

// Prepare TOSA for use as an input to the Flow dialect.
void buildTOSAInputConversionPassPipeline(OpPassManager &passManager) {
passManager.addPass(mlir::createTosaToMLProgram());
// Currently we don't handle SCF ops well and have to convert them all to CFG.
// In the future it would be nice if we could have all of flow be both scf
// and cfg compatible.
Expand Down

0 comments on commit 8e1eca9

Please sign in to comment.