[Mlir-commits] [mlir] [mlir][bufferization] Add XFAIL test for bufferize-function-boundaries returning unranked memref (PR #176746)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 19 04:37:58 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-bufferization
Author: None (tridhapuku)
<details>
<summary>Changes</summary>
Issue: #<!-- -->176739
Add an XFAIL regression test for one-shot-bufferize with bufferize-function-boundaries dropping a ranked return type and returning memref<*xf32> even though a ranked memref.cast is produced.
I’m working on the fix and will remove XFAIL once the behavior is corrected.
---
Full diff: https://github.com/llvm/llvm-project/pull/176746.diff
1 Files Affected:
- (added) mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir (+19)
``````````diff
diff --git a/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir
new file mode 100644
index 0000000000000..2b07b0bbe6aa2
--- /dev/null
+++ b/mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-func-boundary-ranked-from-unranked.mlir
@@ -0,0 +1,19 @@
+// RUN: mlir-opt %s -one-shot-bufferize="bufferize-function-boundaries" -verify-each | FileCheck %s
+// XFAIL: *
+
+module {
+ func.func @foo(%arg0: tensor<64x20x40xf32>) -> tensor<64x20x40xf32> {
+ %u = tensor.cast %arg0 : tensor<64x20x40xf32> to tensor<*xf32>
+ %r = call @relu(%u) : (tensor<*xf32>) -> tensor<*xf32>
+ %b = tensor.cast %r : tensor<*xf32> to tensor<64x20x40xf32>
+ return %b : tensor<64x20x40xf32>
+ }
+ func.func private @relu(tensor<*xf32>) -> tensor<*xf32>
+}
+
+// CHECK-LABEL: func.func @foo
+// CHECK-SAME: -> memref<64x20x40xf32
+// CHECK: %[[R:.*]] = call @relu
+// CHECK: %[[C:.*]] = memref.cast %[[R]] : memref<*xf32> to memref<64x20x40xf32
+// CHECK: return %[[C]] : memref<64x20x40xf32
+
``````````
</details>
https://github.com/llvm/llvm-project/pull/176746
More information about the Mlir-commits
mailing list