[Mlir-commits] [mlir] [mlir][vector] Add pattern to rewrite contiguous ExtractStridedSlice into Extract (PR #111541)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Oct 8 08:52:15 PDT 2024
================
@@ -329,12 +329,76 @@ class DecomposeNDExtractStridedSlice
}
};
+static void populateFromInt64AttrArray(ArrayAttr arrayAttr,
+ SmallVectorImpl<int64_t> &results) {
+ for (auto attr : arrayAttr)
+ results.push_back(llvm::cast<IntegerAttr>(attr).getInt());
+}
+
+/// Pattern to rewrite simple cases of N-D extract_strided_slice, where the
+/// slice is contiguous, into extract and shape_cast.
----------------
banach-space wrote:
Nice-to-have - MLIR example with "before" and "after"
https://github.com/llvm/llvm-project/pull/111541
More information about the Mlir-commits
mailing list