[Mlir-commits] [mlir] d2391bc - [MLIR][Bufferization] Enable strict property assembly format (#217270)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 19 03:50:34 PDT 2026
Author: Mehdi Amini
Date: 2026-08-19T10:50:29Z
New Revision: d2391bcc2e3c54680e78ce915017504a112d2dc2
URL: https://github.com/llvm/llvm-project/commit/d2391bcc2e3c54680e78ce915017504a112d2dc2
DIFF: https://github.com/llvm/llvm-project/commit/d2391bcc2e3c54680e78ce915017504a112d2dc2.diff
LOG: [MLIR][Bufferization] Enable strict property assembly format (#217270)
Enable strict properties-in-assembly-format mode for Bufferization.
Update the remaining test case that spelled the read_only inherent
attribute through attr-dict so it uses the declarative keyword form.
Assisted-by: Codex
Added:
Modified:
mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
index ac19f878656b5..2ef0c93be8bf2 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
@@ -31,6 +31,7 @@ def Bufferization_Dialect : Dialect {
"affine::AffineDialect", "memref::MemRefDialect", "tensor::TensorDialect",
"arith::ArithDialect"
];
+ let useStrictPropertiesInAssemblyFormat = 1;
let extraClassDeclaration = [{
/// Verify an attribute from this dialect on the argument at 'argIndex' for
diff --git a/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir
index 4bbe75e1fe8ac..7d7b1c8eb9bee 100644
--- a/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir
+++ b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-analysis.mlir
@@ -112,7 +112,7 @@ func.func @to_buffer_read_only(%idx : index, %f: f32) -> f32 {
// Some op may write into the result of to_buffer later.
// CHECK: bufferization.to_buffer
// CHECK-SAME: {__inplace_operands_attr__ = ["true"]}
- %m = bufferization.to_buffer %t {read_only} : tensor<5xf32> to memref<5xf32>
+ %m = bufferization.to_buffer %t read_only : tensor<5xf32> to memref<5xf32>
%2 = tensor.extract %t[%idx] : tensor<5xf32>
return %2 : f32
}
More information about the Mlir-commits
mailing list