@@ -4365,7 +4365,7 @@ void DavinciModel::SetDataDumperArgs(const ComputeGraphPtr &graph, const map<str | |||||
data_dumper_.SetDeviceId(device_id); | data_dumper_.SetDeviceId(device_id); | ||||
if (known_node_) { | if (known_node_) { | ||||
data_dumper_.SetLoopAddr(global_step_addr_, nullptr, nullptr); | |||||
data_dumper_.SetLoopAddr(known_shape_global_step_, nullptr, nullptr); | |||||
} else { | } else { | ||||
// set loop count addr | // set loop count addr | ||||
auto get_var_addr = [&](const string &name) -> void *{ | auto get_var_addr = [&](const string &name) -> void *{ | ||||
@@ -499,6 +499,10 @@ class DavinciModel { | |||||
return exception_dumper_.DumpExceptionInfo(exception_infos); | return exception_dumper_.DumpExceptionInfo(exception_infos); | ||||
} | } | ||||
void SetKnownShapeGlobalStep(void *global_step) { | |||||
known_shape_global_step_ = global_step; | |||||
} | |||||
void DumperShrink() { | void DumperShrink() { | ||||
data_dumper_.DumpShrink(); | data_dumper_.DumpShrink(); | ||||
} | } | ||||
@@ -1105,6 +1109,9 @@ class DavinciModel { | |||||
vector<InputOutputDescInfo> output_descs_; | vector<InputOutputDescInfo> output_descs_; | ||||
vector<uint32_t> output_formats_; | vector<uint32_t> output_formats_; | ||||
// known shape node for dump | |||||
void *known_shape_global_step_; | |||||
// op name to attrs mapping | // op name to attrs mapping | ||||
std::map<std::string, std::map<std::string, std::vector<std::string>>> op_name_to_attrs_; | std::map<std::string, std::map<std::string, std::vector<std::string>>> op_name_to_attrs_; | ||||
}; | }; | ||||
@@ -145,6 +145,8 @@ Status KnownNodeTask::InitDavinciModel(const HybridModel &model, TensorBuffer *w | |||||
auto dump_properties = DumpManager::GetInstance().GetDumpProperties(model.GetSessionId()); | auto dump_properties = DumpManager::GetInstance().GetDumpProperties(model.GetSessionId()); | ||||
if (dump_properties.IsDumpOpen() || dump_properties.IsOpDebugOpen()) { | if (dump_properties.IsDumpOpen() || dump_properties.IsOpDebugOpen()) { | ||||
davinci_model_->SetDumpProperties(dump_properties); | davinci_model_->SetDumpProperties(dump_properties); | ||||
void *global_step = model.GetGlobalStep(); | |||||
davinci_model_->SetKnownShapeGlobalStep(); | |||||
} | } | ||||
void *weight = nullptr; | void *weight = nullptr; | ||||