[mlir][sparse] Fix windows build.
authorbixia1 <bixia@google.com>
Tue, 1 Nov 2022 23:55:24 +0000 (16:55 -0700)
committerbixia1 <bixia@google.com>
Wed, 2 Nov 2022 00:00:02 +0000 (17:00 -0700)
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D137210

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp

index a051946..9c002f1 100644 (file)
@@ -618,7 +618,7 @@ private:
     uint64_t rank = dstTp.getRank();
     // Gather the indices-arrays in the dst tensor storage order.
     SmallVector<Value, 4> xs(rank, Value());
-    for (int64_t i = 0; i < rank; i++) {
+    for (uint64_t i = 0; i < rank; i++) {
       uint64_t orgDim = toOrigDim(encSrc, i);
       xs[toStoredDim(encDst, orgDim)] = rewriter.create<ToIndicesOp>(
           loc, indTp, src, rewriter.getIndexAttr(orgDim));