提交 236d65b7 编写于 作者: C caifubi

Fix graph id changed in data dump release

上级 3f03480e
......@@ -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_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册