diff --git a/include/tvm/topi/einsum.h b/include/tvm/topi/einsum.h index 9cfa09826f..b5756e1200 100644 --- a/include/tvm/topi/einsum.h +++ b/include/tvm/topi/einsum.h @@ -96,7 +96,7 @@ struct EinsumEquation { // The output subscript of the Einsum equation. Subscript output; // The number of outputs. - int num_outputs = 0; + size_t num_outputs = 0; /*! * \brief Set output subscript of the Einsum equation, and ensure that diff --git a/src/topi/einsum.cc b/src/topi/einsum.cc index 0bf5d4f1a3..1fc1cd8ff6 100644 --- a/src/topi/einsum.cc +++ b/src/topi/einsum.cc @@ -257,7 +257,7 @@ class EinsumBuilder { result = result * operands[i]; } } - for (int i = 0; i < equation_.num_outputs; ++i) { + for (size_t i = 0; i < equation_.num_outputs; ++i) { results.push_back(result); } }