You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/09/24 22:01:41 UTC

[GitHub] [incubator-mxnet] mseth10 commented on a change in pull request #19214: [BUGFIX] Free up executor memory when reassigning new executor

mseth10 commented on a change in pull request #19214:
URL: https://github.com/apache/incubator-mxnet/pull/19214#discussion_r494635381



##########
File path: src/executor/graph_executor.cc
##########
@@ -2061,25 +2061,26 @@ Executor *Executor::Bind(nnvm::Symbol symbol,
                          const std::vector<OpReqType> &grad_req_type,
                          const std::vector<NDArray> &aux_states,
                          Executor* shared_exec) {
-  auto exec = new exec::GraphExecutor(symbol);
+  // Verbosity level: If =1 logs the name of subgaph backend
+  //                  If >1 then additional details regarding subgraph backend is logged
   static int verbose = dmlc::GetEnv("MXNET_SUBGRAPH_VERBOSE", 1);
   std::vector<NDArray> tmp_in_args = in_args;
   std::vector<NDArray> tmp_arg_grad_store = arg_grad_store;
   std::vector<OpReqType> tmp_grad_req_type = grad_req_type;
   std::vector<NDArray> tmp_aux_states = aux_states;
 
-  if (!exec->subgraph_property().empty()) {
-    const auto& backend_name = exec->subgraph_property();
+  const auto& backend_name = dmlc::GetEnv("MXNET_SUBGRAPH_BACKEND", exec::GetDefaultSubgraphBackend());
+  if (!backend_name.empty()) {

Review comment:
       we should also include the check `backend_name ==  "None"` or we can do something like this before the condition https://github.com/apache/incubator-mxnet/blob/3b0b9dc9d865ee0b1456e8f400f6f4a25c77b5db/src/executor/graph_executor.cc#L59-L60




----------------------------------------------------------------
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:
users@infra.apache.org