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
|
/// Create a pass to convert Linalg operations which work on tensors to use
|
||||||
/// buffers instead.
|
/// buffers instead.
|
||||||
std::unique_ptr<OperationPass<ModuleOp>> createLinalgBufferizePass();
|
std::unique_ptr<OperationPass<FuncOp>> createLinalgBufferizePass();
|
||||||
|
|
||||||
/// Populate patterns that convert `ElementwiseMappable` ops to linalg
|
/// Populate patterns that convert `ElementwiseMappable` ops to linalg
|
||||||
/// parallel loops.
|
/// parallel loops.
|
||||||
|
|
|
@ -61,7 +61,7 @@ def LinalgLowerToLoops : FunctionPass<"convert-linalg-to-loops"> {
|
||||||
let dependentDialects = ["linalg::LinalgDialect", "scf::SCFDialect", "AffineDialect"];
|
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 summary = "Bufferize the linalg dialect";
|
||||||
let constructor = "mlir::createLinalgBufferizePass()";
|
let constructor = "mlir::createLinalgBufferizePass()";
|
||||||
let dependentDialects = ["linalg::LinalgDialect"];
|
let dependentDialects = ["linalg::LinalgDialect"];
|
||||||
|
|
|
@ -356,7 +356,7 @@ struct LinalgBufferizePass : public LinalgBufferizeBase<LinalgBufferizePass> {
|
||||||
};
|
};
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
||||||
std::unique_ptr<OperationPass<ModuleOp>> mlir::createLinalgBufferizePass() {
|
std::unique_ptr<OperationPass<FuncOp>> mlir::createLinalgBufferizePass() {
|
||||||
return std::make_unique<LinalgBufferizePass>();
|
return std::make_unique<LinalgBufferizePass>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue