From 40e629c17a38882426b9ee643ddd2a9ef1e43e13 Mon Sep 17 00:00:00 2001 From: Andrew Liu Date: Sun, 22 Mar 2020 16:44:20 -0700 Subject: [PATCH] fix unsigned and signed int comparison --- src/relay/transforms/gradient_cell.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay/transforms/gradient_cell.cc b/src/relay/transforms/gradient_cell.cc index b891e68c9e3c..0a224908fd74 100644 --- a/src/relay/transforms/gradient_cell.cc +++ b/src/relay/transforms/gradient_cell.cc @@ -98,7 +98,7 @@ class InputVisitor: public ExprFunctor { {expr}, Attrs(), {type}); } else if (auto* type_anno = type.as()) { tvm::Array fields; - for (int i = 0; i < type_anno->fields.size(); i++) { + for (size_t i = 0; i < type_anno->fields.size(); i++) { const Type& t = type_anno->fields[i]; fields.push_back(this->VisitExpr(TupleGetItemNode::make(expr, i), t)); } @@ -136,7 +136,7 @@ class OutputVisitor: public ExprFunctor { return expr; } else if (auto* type_anno = type.as()) { tvm::Array fields; - for (int i = 0; i < type_anno->fields.size(); i++) { + for (size_t i = 0; i < type_anno->fields.size(); i++) { const Type& t = type_anno->fields[i]; fields.push_back(this->VisitExpr(TupleGetItemNode::make(expr, i), t)); }