[Mlir-commits] [mlir] [MLIR] Determine contiguousness of memrefs with dynamic dimensions (PR #142421)

James Newling llvmlistbot at llvm.org
Tue Jun 3 10:01:30 PDT 2025


================
@@ -838,6 +838,20 @@ def Builtin_MemRef : Builtin_Type<"MemRef", "memref", [
     ///
     bool areTrailingDimsContiguous(int64_t n);
 
+    /// Return the maximum number of trailing dimensions that can be
+    /// collapsed.
+    ///
+    /// Examples:
+    ///   - memref<2x3x2xi8, strided<[24, 12, 2]>, the number of collapsable
+    ///     trailing dimensions is 0
+    ///   - memref<2x3x2xi8, strided<[12, 6, 1]>, the number of collapsable
----------------
newling wrote:

```suggestion
    ///   - memref<2x3x2xi8, strided<[6, 2, 1]>, the number of collapsable
```
?

https://github.com/llvm/llvm-project/pull/142421


More information about the Mlir-commits mailing list