forked from OSchip/llvm-project
[mlir][sparse] fix compile-time warning
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D120756
This commit is contained in:
parent
0444a0e8a9
commit
1e47888de6
|
@ -756,7 +756,7 @@ toMLIRSparseTensor(uint64_t rank, uint64_t nse, uint64_t *shape, V *values,
|
|||
// Verify that perm is a permutation of 0..(rank-1).
|
||||
std::vector<uint64_t> 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 @@ toMLIRSparseTensor(uint64_t rank, uint64_t nse, uint64_t *shape, V *values,
|
|||
}
|
||||
|
||||
// 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",
|
||||
|
|
Loading…
Reference in New Issue