electriclilies commented on a change in pull request #9569:
URL: https://github.com/apache/tvm/pull/9569#discussion_r755545150



##########
File path: src/relay/ir/expr.cc
##########
@@ -184,6 +290,25 @@ TupleGetItem::TupleGetItem(Expr tuple, int index, Span 
span) {
   data_ = std::move(n);
 }
 
+TupleGetItem WithFields(TupleGetItem tuple_get_item, Optional<Expr> opt_tuple,
+                        Optional<Integer> opt_index, Optional<Span> opt_span) {
+  Expr tuple = opt_tuple.value_or(tuple_get_item->tuple);
+  int index =
+      opt_index.value_or(tuple_get_item->index)
+          ->value;  // Is it OK that this is an Integer instead of int? this 
lets me use Optional

Review comment:
       nice catch, thanks!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to