This is an automated email from the ASF dual-hosted git repository.
samskalicky pushed a commit to branch v1.8.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.8.x by this push:
new 07d7e13 delete executor before reallocating it memory (#19222)
07d7e13 is described below
commit 07d7e139db70fc7d9d25b5b830ac5ed32ff14811
Author: Rohit Kumar Srivastava <[email protected]>
AuthorDate: Fri Sep 25 18:03:40 2020 -0700
delete executor before reallocating it memory (#19222)
Co-authored-by: Rohit Kumar Srivastava <[email protected]>
---
src/executor/graph_executor.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/executor/graph_executor.cc b/src/executor/graph_executor.cc
index c7febc4..28b79ae 100644
--- a/src/executor/graph_executor.cc
+++ b/src/executor/graph_executor.cc
@@ -2006,6 +2006,7 @@ Executor *Executor::SimpleBind(nnvm::Symbol symbol,
default_ctx, group2ctx, &tmp_in_arg_ctxes,
&tmp_arg_grad_ctxes,
&tmp_grad_req_types, &tmp_aux_state_ctxes,
verbose);
// Subgraph cannot be recreated from unoptimized symbol
+ delete exec;
exec = new exec::GraphExecutor(symbol);
exec->Init(symbol.Copy(), default_ctx, group2ctx, tmp_in_arg_ctxes,
tmp_arg_grad_ctxes,
tmp_aux_state_ctxes, arg_shape_map, arg_dtype_map,
arg_stype_map,
@@ -2077,6 +2078,7 @@ Executor *Executor::Bind(nnvm::Symbol symbol,
&tmp_arg_grad_store, &tmp_grad_req_type,
&tmp_aux_states,
verbose);
// Subgraph cannot be recreated from unoptimized symbol
+ delete exec;
exec = new exec::GraphExecutor(symbol);
}
}