mirror of https://github.com/llvm/torch-mlir
signed/unsigned c++ compiler warning fixes (#2742)
parent
e1a86e480a
commit
47ffc90db4
|
@ -60,7 +60,7 @@ struct OpBinder {
|
|||
int64_t numOperands) {
|
||||
if (op->getNumOperands() != numOperands)
|
||||
return failure();
|
||||
for (int i = 0; i < numOperands; i++) {
|
||||
for (int64_t i = 0; i < numOperands; i++) {
|
||||
Value curr = op->getOperand(i);
|
||||
if (!toValidTensorType(curr.getType())) {
|
||||
return failure();
|
||||
|
@ -80,7 +80,7 @@ struct OpBinder {
|
|||
}
|
||||
|
||||
ParseResult tensorOperandsList( llvm::SmallVectorImpl<Value> &values) {
|
||||
for (int i = 0; i < op->getNumOperands(); i++) {
|
||||
for (uint32_t i = 0; i < op->getNumOperands(); i++) {
|
||||
values.push_back(op->getOperand(i));
|
||||
}
|
||||
return success();
|
||||
|
|
|
@ -182,7 +182,7 @@ void mlir::torch::onnx_c::populateDefaultDomainGtoP(
|
|||
return failure();
|
||||
}
|
||||
Value result = operands[0];
|
||||
for (int i = 1; i < operands.size(); i++) {
|
||||
for (uint64_t i = 1; i < operands.size(); i++) {
|
||||
result = rewriter.create<Torch::AtenMaximumOp>(
|
||||
binder.getLoc(), resultType, result, operands[i]);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void mlir::torch::onnx_c::populateDefaultDomainGtoP(
|
|||
return failure();
|
||||
}
|
||||
Value result = operands[0];
|
||||
for (int i = 1; i < operands.size(); i++) {
|
||||
for (uint64_t i = 1; i < operands.size(); i++) {
|
||||
result = rewriter.create<Torch::AtenMinimumOp>(
|
||||
binder.getLoc(), resultType, result, operands[i]);
|
||||
}
|
||||
|
|
|
@ -672,7 +672,7 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
|
|||
int64_t adjustmentInt =
|
||||
cast<Torch::ValueTensorType>(data.getType()).getSizes().size();
|
||||
// convert axes (tensor) into torch int list while dealing with neg axis
|
||||
for (int i = 0; i < axes.size(); i++) {
|
||||
for (uint64_t i = 0; i < axes.size(); i++) {
|
||||
// Go through the axes list and get each dim in the list
|
||||
int64_t dim = axes[i];
|
||||
if (dim < 0) {
|
||||
|
|
Loading…
Reference in New Issue