Skip to content

Commit 12ba5a3

Browse files
committed
Add assert message
1 parent cbcdb33 commit 12ba5a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ OpFoldResult IndexOp::fold(FoldAdaptor adaptor) {
22892289
// Index of unit dims is always 0.
22902290
SmallVector<int64_t, 4> loopBounds = linalgOp.getStaticLoopRanges();
22912291
uint64_t dim = getDim();
2292-
assert(dim < loopBounds.size());
2292+
assert(dim < loopBounds.size() && "Dim is out of bounds");
22932293
if (loopBounds[dim] == 1)
22942294
return IntegerAttr::get(IndexType::get(getContext()), 0);
22952295

0 commit comments

Comments
 (0)