forked from OSchip/llvm-project
[mlir] Make linalg-bufferize run on FuncOp
That way, it runs in parallel across functions.
This commit is contained in:
parent
5795a81cba
commit
703ef17e7a
|
@ -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.
|
||||
|
|
|
@ -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"];
|
||||
|
|
|
@ -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>();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue