zhiics commented on a change in pull request #4693: [runtime][refactor] Unify 
vm and interpreter objects
URL: https://github.com/apache/incubator-tvm/pull/4693#discussion_r367665057
 
 

 ##########
 File path: src/relay/pass/fold_constant.cc
 ##########
 @@ -187,10 +188,11 @@ class ConstantFolder : public ExprMutator {
           << "invalid dimension after constant eval";
       }
       return ConstantNode::make(nd_array);
-    } else if (const auto* val = value.as<TupleValueNode>()) {
+    } else if (const auto* val = value.as<runtime::ADTObj>()) {
+      runtime::ADT adt = GetRef<runtime::ADT>(val);
       Array<Expr> fields;
-      for (ObjectRef field : val->fields) {
-        fields.push_back(ObjectToExpr(field));
+      for (size_t i = 0; i < adt.size(); ++i) {
 
 Review comment:
   because we don't have iterators for ADT object

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to