We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f07777 commit d690012Copy full SHA for d690012
src/gpu/generic/direct_copy.hpp
@@ -121,7 +121,8 @@ struct direct_copy_t : public primitive_t {
121
|| (l_stride == r_stride && l.first > r.first);
122
};
123
std::sort(blocks.begin() + offset, blocks.end(), cmp);
124
- if (offset > 0 && blocks[offset].first == blocks[offset - 1].first
+ if (offset > 0 && blocks.size() > offset
125
+ && blocks[offset].first == blocks[offset - 1].first
126
&& blocking.strides[blocks[offset].first] == stride) {
127
blocks[offset - 1].second *= blocks[offset].second;
128
stride *= blocks[offset].second;
0 commit comments