mirror of https://github.com/llvm/torch-mlir
Fix compilation warning Wsign-compare (#1003)
parent
33bfeda4c5
commit
bbb648410e
|
@ -709,7 +709,7 @@ public:
|
||||||
Location loc = op.getLoc();
|
Location loc = op.getLoc();
|
||||||
Value self = op.self();
|
Value self = op.self();
|
||||||
MLIRContext *context = op.getContext();
|
MLIRContext *context = op.getContext();
|
||||||
auto rank = getTensorRank(self);
|
int rank = getTensorRank(self);
|
||||||
if (rank < 0)
|
if (rank < 0)
|
||||||
return rewriter.notifyMatchFailure(op, "Unimplemented: unranked tensor");
|
return rewriter.notifyMatchFailure(op, "Unimplemented: unranked tensor");
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ public:
|
||||||
return rewriter.notifyMatchFailure(
|
return rewriter.notifyMatchFailure(
|
||||||
op, "Unimplemented: repeats not list of Scalar");
|
op, "Unimplemented: repeats not list of Scalar");
|
||||||
|
|
||||||
if (rank > repeats.size()) {
|
if (rank > (int)repeats.size()) {
|
||||||
return rewriter.notifyMatchFailure(
|
return rewriter.notifyMatchFailure(
|
||||||
op, "repeats are not matched with self's rank");
|
op, "repeats are not matched with self's rank");
|
||||||
}
|
}
|
||||||
|
@ -753,7 +753,7 @@ public:
|
||||||
|
|
||||||
auto selfType = self.getType().dyn_cast<BaseTensorType>();
|
auto selfType = self.getType().dyn_cast<BaseTensorType>();
|
||||||
auto selfShape = selfType.getSizes();
|
auto selfShape = selfType.getSizes();
|
||||||
for (size_t i = 0; i < rank; i++) {
|
for (int i = 0; i < rank; i++) {
|
||||||
auto scale = repeats[i + leadingRank];
|
auto scale = repeats[i + leadingRank];
|
||||||
Value dimSize;
|
Value dimSize;
|
||||||
if (selfShape[i] == ShapedType::kDynamicSize) {
|
if (selfShape[i] == ShapedType::kDynamicSize) {
|
||||||
|
|
Loading…
Reference in New Issue