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

Maksim Levental llvmlistbot at llvm.org
Mon Jan 29 10:56:09 PST 2024


================
@@ -426,6 +428,18 @@ MlirAttribute mlirMemRefTypeGetMemorySpace(MlirType type) {
   return wrap(llvm::cast<MemRefType>(unwrap(type)).getMemorySpace());
 }
 
+void mlirMemRefTypeGetStridesAndOffset(MlirType type, int64_t *strides,
+                                       int64_t *offset) {
+  MemRefType memrefType = llvm::cast<MemRefType>(unwrap(type));
+  std::pair<SmallVector<int64_t>, int64_t> stridesOffsets =
+      getStridesAndOffset(memrefType);
----------------
makslevental wrote:

Ah I forgot we have `MlirLogicalResult`

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


More information about the Mlir-commits mailing list