Skip to content

Commit

Permalink
[GPU] Refactored network/program/topology classes (openvinotoolkit#6800)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-paramuzov authored Aug 4, 2021
1 parent b9b0a8b commit 8f5d9a8
Show file tree
Hide file tree
Showing 235 changed files with 1,638 additions and 2,001 deletions.
4 changes: 2 additions & 2 deletions inference-engine/src/cldnn_engine/cldnn_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ void CLDNNGraph::Build() {

std::shared_ptr<cldnn::network> CLDNNGraph::BuildNetwork(std::shared_ptr<cldnn::program> program) {
OV_ITT_SCOPED_TASK(itt::domains::CLDNNPlugin, "CLDNNGraph::BuildNetwork");
auto network = std::make_shared<cldnn::network>(*program, m_stream_id);
auto network = std::make_shared<cldnn::network>(program, m_stream_id);

if (!m_config.graph_dumps_dir.empty() && m_stream_id == 0) {
static int net_id = 0;
auto steps_info = network->get_optimization_steps_info();
auto steps_info = network->get_optimizer_passes_info();
size_t step_idx = 0;
for (auto& step : steps_info) {
CNNNetwork net(GetExecGraphInfoByPrimitivesInfo(step.second, true));
Expand Down
8 changes: 1 addition & 7 deletions inference-engine/src/cldnn_engine/cldnn_program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "ngraph/ops.hpp"
#include "ngraph_ops/nms_ie_internal.hpp"
#include "cldnn_itt.h"
#include "cldnn/runtime/debug_configuration.hpp"

using namespace InferenceEngine;
using namespace InferenceEngine::details;
Expand Down Expand Up @@ -178,16 +177,11 @@ std::shared_ptr<cldnn::program> Program::BuildProgram(const std::vector<std::sha
bool createTopologyOnly) {
OV_ITT_SCOPED_TASK(itt::domains::CLDNNPlugin, "Program::BuildProgram");
cldnn::build_options options;
GPU_DEBUG_GET_INSTANCE(debug_config);

if (!m_config.graph_dumps_dir.empty()) {
options.set_option(cldnn::build_option::graph_dumps_dir(m_config.graph_dumps_dir));
}

GPU_DEBUG_IF(!debug_config->dump_graphs.empty()) {
options.set_option(cldnn::build_option::graph_dumps_dir(debug_config->dump_graphs));
}

options.set_option(cldnn::build_option::optimize_data(true));
options.set_option(cldnn::build_option::tuning_config(m_config.tuningConfig));

Expand All @@ -199,7 +193,7 @@ std::shared_ptr<cldnn::program> Program::BuildProgram(const std::vector<std::sha
return {};
} else {
OV_ITT_SCOPED_TASK(itt::domains::CLDNNPlugin, "Program::CreateProgram");
auto program = std::make_shared<cldnn::program>(*m_engine, *m_topology, options);
auto program = cldnn::program::build_program(*m_engine, *m_topology, options);
CleanupBuild();

return program;
Expand Down
Loading

0 comments on commit 8f5d9a8

Please sign in to comment.