mbaret commented on a change in pull request #6697:
URL: https://github.com/apache/incubator-tvm/pull/6697#discussion_r514141313
##########
File path: src/relay/backend/graph_runtime_codegen.cc
##########
@@ -371,10 +371,28 @@ class GraphRuntimeCodegen : public
backend::MemoizedExprTranslator<std::vector<G
// Step into the functions that are handled by external codegen to
// collect metadata.
+ auto codegen = func->GetAttr<String>(attr::kCompiler);
+ CHECK(codegen.defined()) << "No external codegen is set";
+ std::string codegen_name = codegen.value();
const auto name_node = func->GetAttr<String>(tvm::attr::kGlobalSymbol);
- std::string symobl = std::string(name_node.value());
- ConstantUpdater const_visit(symobl, ¶ms_);
- const_visit(func);
+ std::string symbol = std::string(name_node.value());
+ std::string const_update_name = "relay.ext." + codegen_name +
".constant_updater";
Review comment:
I'm not exactly sure what you mean - these two lines specifically get
the symbol from the name_node and the name of the constant updater global func.
You need the symbol to initialise the ConstantUpdater, and the ConstantUpdater
doesn't require global func name (because it's the default fallback option).
----------------------------------------------------------------
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]