icemelon9 commented on a change in pull request #7210:
URL: https://github.com/apache/tvm/pull/7210#discussion_r557782672



##########
File path: src/relay/backend/compile_engine.cc
##########
@@ -593,8 +604,10 @@ class MakeShapeFunc : public 
backend::MemoizedExprTranslator<Array<te::Tensor>>
   std::unordered_map<Expr, Array<te::Tensor>, ObjectPtrHash, ObjectPtrEqual> 
param_data_;
   /*! \brief Map from parameter to list of shape placeholder */
   std::unordered_map<Expr, Array<te::Tensor>, ObjectPtrHash, ObjectPtrEqual> 
param_shapes_;
-  /*! \brief Stack of data dependencies for shape function */
+  /*! \brief Stack of data dependencies for shape function, specified per op */
   std::vector<bool> data_dependants_;

Review comment:
       Correct me if I'm wrong. The `data_dependent_` logic is to determine 
whether we need shape or data from each node when visiting it. This applies to 
`Var`, `Constant`, and `Call`. Since the data dependency could be now different 
for each arg in the Call, we should always use `data_dependants_per_input_`.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to