fixing dump iteration 1 issue in gpu

This commit is contained in:
Parastoo Ashtari 2021-07-06 18:09:11 -04:00
parent 7dd2ae02ee
commit eddbd0300f
2 changed files with 5 additions and 10 deletions

View File

@ -677,15 +677,14 @@ void DebugServices::AddToTensorData(const std::string &backend_name, const std::
void DebugServices::SetPrefixToCheck(std::string *prefix_dump_file_name, std::string *slot_string_to_check, void DebugServices::SetPrefixToCheck(std::string *prefix_dump_file_name, std::string *slot_string_to_check,
std::string *dump_style_kernel_name, size_t slot, bool is_output) { std::string *dump_style_kernel_name, size_t slot, bool is_output) {
std::string dump_style_name_part = *dump_style_kernel_name; std::string dump_style_name_part = *dump_style_kernel_name;
std::string slot_str = "";
GetNodeNameWithoutScope(&dump_style_name_part); GetNodeNameWithoutScope(&dump_style_name_part);
std::string slot_str;
if (is_output) { if (is_output) {
dump_style_name_part += ".output." + std::to_string(slot); slot_str = ".output." + std::to_string(slot);
slot_str += ".output." + std::to_string(slot);
} else { } else {
dump_style_name_part += ".input." + std::to_string(slot); slot_str = ".input." + std::to_string(slot);
slot_str += ".input." + std::to_string(slot);
} }
dump_style_name_part += slot_str;
*prefix_dump_file_name = dump_style_name_part; *prefix_dump_file_name = dump_style_name_part;
*slot_string_to_check = slot_str; *slot_string_to_check = slot_str;
} }

View File

@ -450,9 +450,8 @@ void Debugger::PostExecuteGraphDebugger() {
for (auto graph : graph_ptr_list_) { for (auto graph : graph_ptr_list_) {
debugger_->LoadParametersAndConst(graph); debugger_->LoadParametersAndConst(graph);
} }
bool dump_enabled = debugger_->DumpDataEnabledIteration();
// debug used for dump // debug used for dump
if (debugger_ && dump_enabled) { if (debugger_ && debugger_->CheckDebuggerDumpEnabled()) {
// Dump Parameters and consts // Dump Parameters and consts
for (auto graph : graph_ptr_list_) { for (auto graph : graph_ptr_list_) {
debugger_->Dump(graph); debugger_->Dump(graph);
@ -460,9 +459,6 @@ void Debugger::PostExecuteGraphDebugger() {
debugger_->ClearCurrentData(); debugger_->ClearCurrentData();
} }
} }
} else {
DumpJsonParser::GetInstance().UpdateDumpIter();
} }
if (debugger_) { if (debugger_) {
debugger_->PostExecute(); debugger_->PostExecute();