Browse Source

remove warning log in pynative mode

tags/v0.5.0-beta
caifubi 5 years ago
parent
commit
3bc36040e1
2 changed files with 4 additions and 12 deletions
  1. +3
    -3
      mindspore/ccsrc/device/ascend/ascend_kernel_runtime.cc
  2. +1
    -9
      mindspore/ccsrc/session/kernel_graph.cc

+ 3
- 3
mindspore/ccsrc/device/ascend/ascend_kernel_runtime.cc View File

@@ -65,13 +65,13 @@ void AscendKernelRuntime::ClearGraphModelMap() {
}

void AscendKernelRuntime::ClearGraphRuntimeResource(uint32_t graph_id) {
MS_LOG(INFO) << "clear graph:" << graph_id << " runtime resource";
MS_LOG(DEBUG) << "clear graph:" << graph_id << " runtime resource";
auto iter = graph_model_map_.find(graph_id);
if (iter == graph_model_map_.end()) {
MS_LOG(WARNING) << "GraphId:" << graph_id << " not found";
MS_LOG(DEBUG) << "GraphId:" << graph_id << " not found";
return;
}
MS_LOG(INFO) << "Ge UnloadModel " << iter->first;
MS_LOG(DEBUG) << "Ge UnloadModel " << iter->first;
auto ret = ge::model_runner::ModelRunner::Instance().UnloadModel(iter->first);
if (!ret) {
MS_LOG(ERROR) << "UnloadModel failed";


+ 1
- 9
mindspore/ccsrc/session/kernel_graph.cc View File

@@ -731,14 +731,6 @@ void KernelGraph::UpdateCallRealInput() {

std::string KernelGraph::ToString() const { return std::string("kernel_graph_").append(std::to_string(graph_id_)); }

KernelGraph::~KernelGraph() {
auto context = MsContext::GetInstance();
if (!context) {
return;
}
if (context->execution_mode() == kGraphMode) {
device::KernelRuntimeManager::Instance().ClearGraphResource(graph_id_);
}
}
KernelGraph::~KernelGraph() { device::KernelRuntimeManager::Instance().ClearGraphResource(graph_id_); }
} // namespace session
} // namespace mindspore

Loading…
Cancel
Save