Skip to content

Commit

Permalink
fix unsigned and signed int comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
hypercubestart committed Mar 23, 2020
1 parent 0955681 commit 40e629c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relay/transforms/gradient_cell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class InputVisitor: public ExprFunctor<Expr(const Expr&, const Type&)> {
{expr}, Attrs(), {type});
} else if (auto* type_anno = type.as<TupleTypeNode>()) {
tvm::Array<Expr> 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));
}
Expand Down Expand Up @@ -136,7 +136,7 @@ class OutputVisitor: public ExprFunctor<Expr(const Expr&, const Type&)> {
return expr;
} else if (auto* type_anno = type.as<TupleTypeNode>()) {
tvm::Array<Expr> 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));
}
Expand Down

0 comments on commit 40e629c

Please sign in to comment.