Browse Source

Release context in execute end.

tags/v1.3.0
zhaozhixuan 4 years ago
parent
commit
181cd5891b
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      ge/hybrid/executor/hybrid_model_executor.cc
  2. +2
    -0
      ge/hybrid/executor/subgraph_executor.h

+ 1
- 0
ge/hybrid/executor/hybrid_model_executor.cc View File

@@ -125,6 +125,7 @@ Status HybridModelExecutor::ExecuteGraphInternal(HybridModelExecutor::ExecuteArg
args.outputs.clear(); args.outputs.clear();
HYBRID_CHK_STATUS_RET(root_graph_executor_->GetOutputs(args.outputs, args.output_desc), "Failed to get outputs"); HYBRID_CHK_STATUS_RET(root_graph_executor_->GetOutputs(args.outputs, args.output_desc), "Failed to get outputs");
RECORD_MODEL_EXECUTION_EVENT(&context_, "[GetOutput] End"); RECORD_MODEL_EXECUTION_EVENT(&context_, "[GetOutput] End");
root_graph_executor_->ResetContext();
return SUCCESS; return SUCCESS;
} }




+ 2
- 0
ge/hybrid/executor/subgraph_executor.h View File

@@ -41,6 +41,8 @@ class SubgraphExecutor {


Status PartialExecuteAsync(int task_group); Status PartialExecuteAsync(int task_group);


void ResetContext() { subgraph_context_.release(); }

/** /**
* Execute subgraph async, output tensor address(not data) and output tensor descriptions are * Execute subgraph async, output tensor address(not data) and output tensor descriptions are
* valid after this method returned * valid after this method returned


Loading…
Cancel
Save