anijain2305 commented on a change in pull request #5094: [Relay][BYOCG] 
Propagate constant to subgraphs
URL: https://github.com/apache/incubator-tvm/pull/5094#discussion_r395804633
 
 

 ##########
 File path: src/relay/backend/contrib/codegen_c/codegen.cc
 ##########
 @@ -40,14 +41,63 @@ class CodegenC : public ExprVisitor, public CodegenCBase {
  public:
   explicit CodegenC(const std::string& id) { this->ext_func_id_ = id; }
 
-  void VisitExpr_(const VarNode* node) {
+  void VisitExpr_(const VarNode* node) final {
     ext_func_args_.push_back(GetRef<Var>(node));
     out_.clear();
     Output output;
     output.name = node->name_hint();
     out_.push_back(output);
   }
 
+  void VisitExpr_(const ConstantNode* cn) final {
+    Constant con = GetRef<Constant>(cn);
 
 Review comment:
   s/con/constant
   
   Very minor, feel free to ignore.

----------------------------------------------------------------
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