Commit b5beac87 authored by Sergey Shalnov's avatar Sergey Shalnov Committed by Robert Kimball

IntelGPU backend: Remove nodes "Result" from cldnn::topology (#1952)

parent 92c1cc19
...@@ -375,6 +375,7 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func) ...@@ -375,6 +375,7 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
return true; return true;
} }
vector<cldnn::primitive_id> function_output_names;
cldnn::topology topology; cldnn::topology topology;
if (m_dump_graph_enable) if (m_dump_graph_enable)
...@@ -428,7 +429,7 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func) ...@@ -428,7 +429,7 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
{ {
arguments_check(op, 1, 1); arguments_check(op, 1, 1);
do_equal_propagation(topology, get_input_name(op), get_output_name(op)); function_output_names.push_back(get_input_name(op));
break; break;
} }
case OP_TYPEID::GetOutputElement: case OP_TYPEID::GetOutputElement:
...@@ -1519,6 +1520,11 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func) ...@@ -1519,6 +1520,11 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
network_build_options.set_option(cldnn::build_option::optimize_data(m_cldnn_graph_optimize)); network_build_options.set_option(cldnn::build_option::optimize_data(m_cldnn_graph_optimize));
if (!function_output_names.empty())
{
network_build_options.set_option(cldnn::build_option::outputs(function_output_names));
}
if (m_cldnn_dump_enable) if (m_cldnn_dump_enable)
{ {
network_build_options.set_option(cldnn::build_option::graph_dumps_dir(m_cldnn_dump_dir)); network_build_options.set_option(cldnn::build_option::graph_dumps_dir(m_cldnn_dump_dir));
...@@ -1587,7 +1593,7 @@ bool runtime::intelgpu::IntelGPUBackend::call(shared_ptr<Function> func, ...@@ -1587,7 +1593,7 @@ bool runtime::intelgpu::IntelGPUBackend::call(shared_ptr<Function> func,
{ {
shared_ptr<runtime::intelgpu::IntelGPUTensorView> ngraph_res = shared_ptr<runtime::intelgpu::IntelGPUTensorView> ngraph_res =
static_pointer_cast<runtime::intelgpu::IntelGPUTensorView>(outputs[i]); static_pointer_cast<runtime::intelgpu::IntelGPUTensorView>(outputs[i]);
const string& tensor_name = func->get_output_op(i)->get_output_tensor().get_name(); const string& tensor_name = get_input_name(func->get_output_op(i));
auto result_memory = result.at(tensor_name).get_memory().pointer<char>(); auto result_memory = result.at(tensor_name).get_memory().pointer<char>();
ngraph_res->write(result_memory.data(), 0, result_memory.size()); ngraph_res->write(result_memory.data(), 0, result_memory.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment