diff --git a/include/tvm/topi/transform.h b/include/tvm/topi/transform.h index c9ee63390c8f..781c1cbeb311 100644 --- a/include/tvm/topi/transform.h +++ b/include/tvm/topi/transform.h @@ -1268,7 +1268,7 @@ inline Tensor gather_nd(const Tensor& data, const Tensor& indices, int batch_dim indices_position.push_back(out_index[i]); } Array real_indices; - for (size_t i = 0; i < batch_dims; ++i) { + for (size_t i = 0; i < static_cast(batch_dims); ++i) { real_indices.push_back(out_index[i]); } for (size_t i = 0; i < indices_dim0; ++i) {