[PATCH] D145647: [mlir] Relaxing validity of dimensions of slices
Murali Vijayaraghavan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 20:51:40 PST 2023
vmurali updated this revision to Diff 503609.
Herald added subscribers: Moerafaat, zero9178, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, mehdi_amini, thopre.
Herald added a reviewer: rriddle.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145647/new/
https://reviews.llvm.org/D145647
Files:
mlir/lib/IR/BuiltinTypes.cpp
Index: mlir/lib/IR/BuiltinTypes.cpp
===================================================================
--- mlir/lib/IR/BuiltinTypes.cpp
+++ mlir/lib/IR/BuiltinTypes.cpp
@@ -401,7 +401,9 @@
for (unsigned originalIdx = 0; originalIdx < originalRank; ++originalIdx) {
// Greedily insert `originalIdx` if match.
if (reducedIdx < reducedRank &&
- originalShape[originalIdx] == reducedShape[reducedIdx]) {
+ (originalShape[originalIdx] == reducedShape[reducedIdx] ||
+ originalShape[originalIdx] == ShapedType::kDynamic ||
+ reducedShape[reducedIdx] == ShapedType::kDynamic)) {
reducedIdx++;
continue;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145647.503609.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230309/ec46c91e/attachment.bin>
More information about the llvm-commits
mailing list