From bbb648410ec35f335e7e807c07658d0a7ca0d8c6 Mon Sep 17 00:00:00 2001 From: Ramiro Leal-Cavazos Date: Wed, 6 Jul 2022 11:06:10 -0500 Subject: [PATCH] Fix compilation warning Wsign-compare (#1003) --- lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp index e3e5236cf..4f86e3794 100644 --- a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp +++ b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp @@ -709,7 +709,7 @@ public: Location loc = op.getLoc(); Value self = op.self(); MLIRContext *context = op.getContext(); - auto rank = getTensorRank(self); + int rank = getTensorRank(self); if (rank < 0) return rewriter.notifyMatchFailure(op, "Unimplemented: unranked tensor"); @@ -718,7 +718,7 @@ public: return rewriter.notifyMatchFailure( op, "Unimplemented: repeats not list of Scalar"); - if (rank > repeats.size()) { + if (rank > (int)repeats.size()) { return rewriter.notifyMatchFailure( op, "repeats are not matched with self's rank"); } @@ -753,7 +753,7 @@ public: auto selfType = self.getType().dyn_cast(); auto selfShape = selfType.getSizes(); - for (size_t i = 0; i < rank; i++) { + for (int i = 0; i < rank; i++) { auto scale = repeats[i + leadingRank]; Value dimSize; if (selfShape[i] == ShapedType::kDynamicSize) {