[Mlir-commits] [mlir] [mlir][python] enable memref.subview (PR #79393)

Jacques Pienaar llvmlistbot at llvm.org
Wed Jan 24 17:01:53 PST 2024


================
@@ -618,6 +618,15 @@ class PyMemRefType : public PyConcreteType<PyMemRefType, PyShapedType> {
               return mlirMemRefTypeGetLayout(self);
             },
             "The layout of the MemRef type.")
+        .def_property_readonly(
+            "strides_and_offset",
+            [](PyMemRefType &self) -> std::pair<std::vector<int64_t>, int64_t> {
+              std::vector<int64_t> strides(mlirShapedTypeGetRank(self));
----------------
jpienaar wrote:

What happens here if type is not ranked shaped?

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


More information about the Mlir-commits mailing list