mirror of https://github.com/llvm/torch-mlir
Fix compilation warnings.
parent
a52aded0b9
commit
24bc06fc8d
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue