jroesch commented on a change in pull request #7518:
URL: https://github.com/apache/tvm/pull/7518#discussion_r609050655
##########
File path: src/relay/backend/graph_runtime_codegen.cc
##########
@@ -181,23 +186,56 @@ class GraphOpNode : public GraphNode {
const std::string op_type_name_{"tvm_op"};
};
-/*! \brief Code generator for graph runtime */
+/*! \brief Code generator for the graph runtime, produces a module containing
the graph JSON,
+ * module, and parameters.
+ */
class GraphRuntimeCodegen : public
backend::MemoizedExprTranslator<std::vector<GraphNodeRef>> {
public:
GraphRuntimeCodegen(runtime::Module* mod, const TargetsMap& targets) :
mod_(mod) {
- compile_engine_ = CompileEngine::Global();
targets_ = targets;
}
LoweredOutput Codegen(relay::Function func) {
- auto pf = GetPackedFunc("relay.backend.GraphPlanMemory");
- storage_device_map_ = (*pf)(func);
+ // Jared: why do we do this? just call C++ API.
Review comment:
Yeah I think we need to move up the stack to address this, because
everyone is only thinking about their own memory planning needs and not really
looking at the large picture.
--
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]