[mlir] Make linalg-bufferize run on FuncOp

That way, it runs in parallel across functions.
This commit is contained in:
Sean Silva 2020-11-13 15:27:29 -08:00
parent 5795a81cba
commit 703ef17e7a
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ std::unique_ptr<OperationPass<FuncOp>> createConvertLinalgToAffineLoopsPass();
/// Create a pass to convert Linalg operations which work on tensors to use
/// buffers instead.
std::unique_ptr<OperationPass<ModuleOp>> createLinalgBufferizePass();
std::unique_ptr<OperationPass<FuncOp>> createLinalgBufferizePass();
/// Populate patterns that convert `ElementwiseMappable` ops to linalg
/// parallel loops.

View File

@ -61,7 +61,7 @@ def LinalgLowerToLoops : FunctionPass<"convert-linalg-to-loops"> {
let dependentDialects = ["linalg::LinalgDialect", "scf::SCFDialect", "AffineDialect"];
}
def LinalgBufferize : Pass<"linalg-bufferize", "ModuleOp"> {
def LinalgBufferize : Pass<"linalg-bufferize", "FuncOp"> {
let summary = "Bufferize the linalg dialect";
let constructor = "mlir::createLinalgBufferizePass()";
let dependentDialects = ["linalg::LinalgDialect"];

View File

@ -356,7 +356,7 @@ struct LinalgBufferizePass : public LinalgBufferizeBase<LinalgBufferizePass> {
};
} // end anonymous namespace
std::unique_ptr<OperationPass<ModuleOp>> mlir::createLinalgBufferizePass() {
std::unique_ptr<OperationPass<FuncOp>> mlir::createLinalgBufferizePass() {
return std::make_unique<LinalgBufferizePass>();
}