manupa-arm commented on a change in pull request #6697:
URL: https://github.com/apache/incubator-tvm/pull/6697#discussion_r510290218



##########
File path: src/relay/backend/contrib/codegen_c/codegen.cc
##########
@@ -290,8 +290,37 @@ runtime::Module CCompiler(const ObjectRef& ref) {
   return csource.CreateCSourceModule(ref);
 }
 
+/*!
+ * \brief A visitor to add the constants used as params for MetadataModule.
+ */
+struct CCompilerConstantUpdater : public ExprVisitor {

Review comment:
       @zhiics , What about the other way ? We make every codegen register a 
constant updater -- as you say if most of the codegen are based on JSONRuntime 
maybe that can implement the generic one and which could be overridden if the 
codegen requires. This way it creates a nice division of responsibilities -- 
constant creation and consumption is at more or less the same set of sources.




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


Reply via email to