Fix compilation warnings.

pull/461/head
Yi Zhang 2021-12-03 10:51:24 -05:00
parent a52aded0b9
commit 24bc06fc8d
2 changed files with 1 additions and 2 deletions

View File

@ -3262,7 +3262,7 @@ public:
SmallVector<Value> sizes(getTensorSizes(rewriter, loc, self));
Value productResult =
rewriter.create<arith::ConstantOp>(loc, rewriter.getIndexAttr(1));
for (int i = 0; i < sizes.size(); i++)
for (size_t i = 0; i < sizes.size(); i++)
productResult =
rewriter.create<arith::MulIOp>(loc, productResult, sizes[i]);
rewriter.replaceOp(op, castIndexToInt(rewriter, loc, productResult));

View File

@ -449,7 +449,6 @@ public:
Location loc = op.getLoc();
Value input = op.self();
Value output = op.result();
BaseTensorType inputTensorType = input.getType().cast<BaseTensorType>();
BaseTensorType outputTensorType = output.getType().cast<BaseTensorType>();
Value sum = rewriter.create<AtenSumOp>(loc, outputTensorType, input, op.dtype());
Value numTensorElements = rewriter.create<AtenNumelOp>(loc, input);