[Mlir-commits] [mlir] [mlir][MemRef][~NFC] Move getStridesAndOffset() onto layouts (PR #138011)

Matthias Springer llvmlistbot at llvm.org
Mon May 5 01:45:36 PDT 2025


================
@@ -509,6 +509,23 @@ def MemRefLayoutAttrInterface : AttrInterface<"MemRefLayoutAttrInterface"> {
         return ::mlir::detail::verifyAffineMapAsLayout($_attr.getAffineMap(),
                                                        shape, emitError);
       }]
+    >,
+
+    InterfaceMethod<
+      [{Return the strides (using ShapedType::kDynamic for the dynamic case)
+      that this layout corresponds to into `strides` and `offset` if such exist
+      and can be detirmined from a combination of the layout and the given
----------------
matthias-springer wrote:

`determined`

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


More information about the Mlir-commits mailing list