[Mlir-commits] [mlir] 524d6a2 - [mlir] Added documentation for bufferization to memref conversion pass.
Julian Gross
llvmlistbot at llvm.org
Wed Dec 15 01:22:16 PST 2021
Author: Julian Gross
Date: 2021-12-15T10:16:41+01:00
New Revision: 524d6a2d6ae017febac9fc49073b3f2fcec06df8
URL: https://github.com/llvm/llvm-project/commit/524d6a2d6ae017febac9fc49073b3f2fcec06df8
DIFF: https://github.com/llvm/llvm-project/commit/524d6a2d6ae017febac9fc49073b3f2fcec06df8.diff
LOG: [mlir] Added documentation for bufferization to memref conversion pass.
Added documentation to clearify the purpose of the bufferization to memref pass
and added some remarks.
Differential Revision: https://reviews.llvm.org/D115326
Added:
Modified:
mlir/include/mlir/Conversion/Passes.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index 791d4643b7d2c..f6e49cc889d15 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -133,6 +133,30 @@ def ConvertAsyncToLLVM : Pass<"convert-async-to-llvm", "ModuleOp"> {
def ConvertBufferizationToMemRef : Pass<"convert-bufferization-to-memref"> {
let summary = "Convert operations from the Bufferization dialect to the "
"MemRef dialect";
+ let description = [{
+
+ This pass converts bufferization operations into memref operations.
+
+ In the current state, this pass only transforms a `bufferization.clone`
+ operation into `memref.alloc` and `memref.copy` operations. This conversion
+ is needed, since some clone operations could remain after applying several
+ transformation processes. Currently, only `canonicalize` transforms clone
+ operations or even eliminates them. This can lead to errors if any clone op
+ survived after all conversion passes (starting from the bufferization
+ dialect) are performed.
+
+ See:
+ https://llvm.discourse.group/t/bufferization-error-related-to-memref-clone/4665
+
+ To avoid these errors, this pass can be performed as a last clean-up pass to
+ transform remaining operations and to proceed in other dialects (memref
+ e.g.).
+
+ Note that this pass only transforms the operation without any further
+ analyses. This pass does not consider any memory analysis or optimization
+ and hence does not resolve any memory leaks.
+
+ }];
let constructor = "mlir::createBufferizationToMemRefPass()";
let dependentDialects = ["arith::ArithmeticDialect", "memref::MemRefDialect"];
}
More information about the Mlir-commits
mailing list