forked from mindspore-Ecosystem/mindspore
!3108 Fix bug of graph id changing in data dump release
Merge pull request !3108 from caifubi/data-dump-new
This commit is contained in:
commit
45d18f5e86
|
@ -71,6 +71,8 @@ void DataDumper::LoadDumpInfo() {
|
|||
}
|
||||
RtLoadDumpData(dump_info, &dev_load_mem_);
|
||||
load_flag_ = true;
|
||||
// graph id may changed in Unload
|
||||
graph_id_ = kernel_graph_->graph_id();
|
||||
MS_LOG(INFO) << "[DataDump] LoadDumpInfo end";
|
||||
}
|
||||
|
||||
|
@ -135,11 +137,10 @@ void DataDumper::UnloadDumpInfo() {
|
|||
MS_LOG(WARNING) << "Load not success, no need to unload";
|
||||
return;
|
||||
}
|
||||
MS_EXCEPTION_IF_NULL(kernel_graph_);
|
||||
MS_LOG(INFO) << "[DataDump] UnloadDumpInfo start. graphId:" << kernel_graph_->graph_id();
|
||||
MS_LOG(INFO) << "[DataDump] UnloadDumpInfo start. graphId:" << graph_id_;
|
||||
|
||||
aicpu::dump::OpMappingInfo op_mapping_info;
|
||||
op_mapping_info.set_model_id(kernel_graph_->graph_id());
|
||||
op_mapping_info.set_model_id(graph_id_);
|
||||
op_mapping_info.set_flag(kAicpuUnloadFlag);
|
||||
|
||||
for (const auto &kernel_name : dump_kernel_names_) {
|
||||
|
|
|
@ -42,6 +42,7 @@ class DataDumper {
|
|||
: load_flag_(false),
|
||||
dev_load_mem_(nullptr),
|
||||
dev_unload_mem_(nullptr),
|
||||
graph_id_(UINT32_MAX),
|
||||
kernel_graph_(kernel_graph),
|
||||
runtime_info_map_(runtime_info_map) {}
|
||||
~DataDumper();
|
||||
|
@ -58,6 +59,7 @@ class DataDumper {
|
|||
bool load_flag_;
|
||||
void *dev_load_mem_;
|
||||
void *dev_unload_mem_;
|
||||
uint32_t graph_id_;
|
||||
std::vector<std::string> dump_kernel_names_;
|
||||
const session::KernelGraph *kernel_graph_;
|
||||
std::map<std::string, std::shared_ptr<RuntimeInfo>> runtime_info_map_;
|
||||
|
|
Loading…
Reference in New Issue