[Mlir-commits] [mlir] 1379596 - [mlir][sparse] fix signed/unsigned warning

Aart Bik llvmlistbot at llvm.org
Tue Sep 27 13:57:38 PDT 2022


Author: Aart Bik
Date: 2022-09-27T13:57:26-07:00
New Revision: 1379596e9dd7ffd1d02615ebe9a8be57cb393cd3

URL: https://github.com/llvm/llvm-project/commit/1379596e9dd7ffd1d02615ebe9a8be57cb393cd3
DIFF: https://github.com/llvm/llvm-project/commit/1379596e9dd7ffd1d02615ebe9a8be57cb393cd3.diff

LOG: [mlir][sparse] fix signed/unsigned warning

Reviewed By: wrengr

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

Added: 
    

Modified: 
    mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
index ba344e3725199..867803ceb1ddb 100644
--- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
+++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
@@ -517,7 +517,7 @@ LogicalResult SortOp::verify() {
                         bool checkEleType = true) -> LogicalResult {
     for (Value opnd : operands) {
       MemRefType mtp = opnd.getType().cast<MemRefType>();
-      uint64_t dim = mtp.getShape()[0];
+      int64_t dim = mtp.getShape()[0];
       // We can't check the size of dynamic dimension at compile-time, but all
       // xs and ys should have a dimension not less than n at runtime.
       if (n && dim != ShapedType::kDynamicSize && dim < n.value())


        


More information about the Mlir-commits mailing list