diff --git a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp --- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp +++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp @@ -756,7 +756,7 @@ // Verify that perm is a permutation of 0..(rank-1). std::vector order(perm, perm + rank); std::sort(order.begin(), order.end()); - for (int i = 0; i < rank; ++i) { + for (uint64_t i = 0; i < rank; ++i) { if (i != order[i]) { fprintf(stderr, "Permutation is not a permutation of 0..%lu\n", rank); exit(1); @@ -764,7 +764,7 @@ } // Verify that the sparsity values are supported. - for (int i = 0; i < rank; ++i) { + for (uint64_t i = 0; i < rank; ++i) { if (sparsity[i] != DimLevelType::kDense && sparsity[i] != DimLevelType::kCompressed) { fprintf(stderr, "Unsupported sparsity value %d\n",