diff options
author | Jie Fu <jiefu@tencent.com> | 2024-01-16 07:08:24 +0800 |
---|---|---|
committer | Jie Fu <jiefu@tencent.com> | 2024-01-16 07:08:24 +0800 |
commit | 071207ea415d73844f6d48be3b83a7e010e3759b (patch) | |
tree | abacf0d26a05e54a600611bc2d282fc9d8a10fa7 | |
parent | 5b4f2b906ba697c276b3e0940c24ae640cfde695 (diff) | |
download | llvm-071207ea415d73844f6d48be3b83a7e010e3759b.zip llvm-071207ea415d73844f6d48be3b83a7e010e3759b.tar.gz llvm-071207ea415d73844f6d48be3b83a7e010e3759b.tar.bz2 |
[mlir] Fix -Wsign-compare in MeshOps.cpp (NFC)
llvm-project/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp:204:25:
error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare]
if (getShape().size() > rank)
~~~~~~~~~~~~~~~~~ ^ ~~~~
1 error generated.
-rw-r--r-- | mlir/lib/Dialect/Mesh/IR/MeshOps.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp index fa9da59..f6b6b7c 100644 --- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp +++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp @@ -201,7 +201,7 @@ LogicalResult ClusterOp::verify() { if (rank <= 0) return emitOpError("rank of cluster is expected to be a positive integer"); - if (getShape().size() > rank) + if (getShape().size() > size_t(rank)) return emitOpError( "rank of shape is not expected to be larger than rank of cluster"); |