[all-commits] [llvm/llvm-project] 71251e: [mlir] Fix -Wsign-compare in SparseTensorRewriting...
Jie Fu via All-commits
all-commits at lists.llvm.org
Tue Feb 14 19:58:32 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 71251e8d4f3f26acb8692e5e1f23488d271f60e2
https://github.com/llvm/llvm-project/commit/71251e8d4f3f26acb8692e5e1f23488d271f60e2
Author: Jie Fu <jiefu at tencent.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
Log Message:
-----------
[mlir] Fix -Wsign-compare in SparseTensorRewriting.cpp and Sparsification.cpp (NFC)
/home/jiefu/llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp:279:33: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'const mlir::sparse_tensor::Level' (aka 'const unsigned long') [-Werror,-Wsign-compare]
assert(env.op().getRank(&t) == lvlRank);
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
1 error generated.
/home/jiefu/llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp:788:29: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'const mlir::sparse_tensor::Dimension' (aka 'const unsigned long') [-Werror,-Wsign-compare]
assert(srcRTT.getRank() == dimRank);
~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
/home/jiefu/llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp:810:31: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'const mlir::sparse_tensor::Dimension' (aka 'const unsigned long') [-Werror,-Wsign-compare]
assert(srcRTT.getRank() == dimRank);
~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
2 errors generated.
More information about the All-commits
mailing list