[GPU] Fixed debug graph dump (#14806)

This commit is contained in:
Vladimir Paramuzov authored and GitHub committed 2022-12-26 18:47:35 +04:00
1 parent 6dd86506cd
commit 06c2d3da52
1 file changed
+14 -14
+14 -14
View File
@@ -113,6 +113,20 @@ void Graph::Build() {
net.serialize(debug_config->dry_run_path);
exit(0);
}
GPU_DEBUG_IF(!debug_config->dump_graphs.empty() && m_stream_id == 0) {
static int net_id = 0;
auto steps_info = GetNetwork()->get_optimizer_passes_info();
size_t step_idx = 0;
for (auto& step : steps_info) {
CNNNetwork net(GetExecGraphInfoByPrimitivesInfo(step.second, true));
net.serialize(debug_config->dump_graphs + std::to_string(net_id) + "_" +
std::to_string(step_idx) + "_" + step.first + "_graph.xml");
step_idx++;
}
net_id++;
}
}
bool Graph::use_external_queue() const {
@@ -135,20 +149,6 @@ std::shared_ptr<cldnn::network> Graph::BuildNetwork(std::shared_ptr<cldnn::progr
network = std::make_shared<cldnn::network>(program, m_stream_id);
}
GPU_DEBUG_GET_INSTANCE(debug_config);
GPU_DEBUG_IF(!debug_config->dump_graphs.empty() && m_stream_id == 0) {
static int net_id = 0;
auto steps_info = network->get_optimizer_passes_info();
size_t step_idx = 0;
for (auto& step : steps_info) {
CNNNetwork net(GetExecGraphInfoByPrimitivesInfo(step.second, true));
net.serialize(debug_config->dump_graphs + std::to_string(net_id) + "_" +
std::to_string(step_idx) + "_" + step.first + "_graph.xml");
step_idx++;
}
net_id++;
}
return network;
}