[mlir][MemRef] NFC - Improve assertion error message

This commit is contained in:
Nicolas Vasilache 2022-01-09 14:17:28 -05:00
parent 4e8a02e7f4
commit 8871d8236a
1 changed files with 3 additions and 3 deletions

View File

@ -1497,9 +1497,9 @@ Type SubViewOp::inferResultType(MemRefType sourceMemRefType,
ArrayRef<int64_t> staticStrides) {
unsigned rank = sourceMemRefType.getRank();
(void)rank;
assert(staticOffsets.size() == rank && "unexpected staticOffsets overflow");
assert(staticSizes.size() == rank && "unexpected staticSizes overflow");
assert(staticStrides.size() == rank && "unexpected staticStrides overflow");
assert(staticOffsets.size() == rank && "staticOffsets length mismatch");
assert(staticSizes.size() == rank && "staticSizes length mismatch");
assert(staticStrides.size() == rank && "staticStrides length mismatch");
// Extract source offset and strides.
int64_t sourceOffset;