mbs-octoml commented on code in PR #11770:
URL: https://github.com/apache/tvm/pull/11770#discussion_r907640562
##########
src/relay/backend/contrib/codegen_json/codegen_json.h:
##########
@@ -245,11 +258,14 @@ class JSONSerializer : public
MemoizedExprTranslator<std::vector<JSONGraphNodeEn
return memo_[GetRef<Expr>(vn)];
}
- std::vector<JSONGraphNodeEntry> VisitExpr_(const ConstantNode* cn) {
- std::string name = symbol_ + "_const_" + std::to_string(params_.size());
- params_.push_back(name);
- auto node = std::make_shared<JSONGraphNode>(name, "const" /* op_type_ */);
- return AddNode(node, GetRef<Expr>(cn));
+ std::vector<JSONGraphNodeEntry> VisitExpr_(const ConstantNode*
constant_node) {
+ std::string name = symbol_ + "_const_" +
std::to_string(const_names_.size());
+ VLOG(1) << "Will require parameter '" << name << "' to be available at
runtime";
Review Comment:
Done -- this was me trying to reverse engineer the consts protocol. It is
very unfortunate we've bound everything together as 'params'.
--
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]