File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,13 @@ class IteratorCfg {
141141 // Constructor that will compute the number of tiles in each dimension, it will also compute the increment values and sizes.
142142 template <typename buf_T>
143143 IteratorCfg (const Tensor<buf_T, iterRank>& tensor, // full tensor to be iterated
144- const uint32_t tilesize[], // size of the tile
145- const int32_t order[], // iteration order
144+ const uint32_t tilesize[iterRank], // size of the tile
145+ const int32_t order[iterRank], // iteration order
146146 uint32_t skew = 0 ) { // skewing on first iteration dimension (reduction of the first tile size, used in fused processing to avoid triple buffering)
147147 MLI_ASSERT (tilesize[order[0 ]] >= skew);
148148 for (uint32_t i = 0 ; i < iterRank; ++i, skew = 0 ) {
149149 int32_t dim = order[i];
150+ MLI_ASSERT (tilesize[dim] <= tensor.get_dim (dim));
150151 m_order[i] = dim;
151152 m_count[i] = CEIL_DIV (tensor.get_dim (dim) + skew, tilesize[dim]);
152153 m_first_size[i] = m_first_pos_inc[i] = tilesize[dim] - skew;
You can’t perform that action at this time.
0 commit comments