Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mlir/include/mlir/ExecutionEngine/MemRefUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ inline std::array<int64_t, N> makeStrides(ArrayRef<int64_t> shape) {
std::array<int64_t, N> res;
int64_t running = 1;
for (int64_t idx = N - 1; idx >= 0; --idx) {
assert(shape[idx] && "size must be non-negative for all shape dimensions");
assert(shape[idx] >= 0 &&
"size must be non-negative for all shape dimensions");
res[idx] = running;
running *= shape[idx];
}
Expand Down
Loading