Commit fff591a3 authored by Sergey Shalnov's avatar Sergey Shalnov Committed by Scott Cyphers

IntelGPU backend: Code refactoring due to Node functions deprecated (#2734)

parent 62e2ae18
...@@ -351,6 +351,11 @@ descriptor::Tensor& Node::get_output_tensor(size_t i) const ...@@ -351,6 +351,11 @@ descriptor::Tensor& Node::get_output_tensor(size_t i) const
return m_outputs.at(i).get_tensor(); return m_outputs.at(i).get_tensor();
} }
const string& Node::get_output_tensor_name(size_t i) const
{
return m_outputs.at(i).get_tensor().get_name();
}
descriptor::Tensor& Node::get_output_tensor() const descriptor::Tensor& Node::get_output_tensor() const
{ {
if (get_output_size() != 1) if (get_output_size() != 1)
...@@ -380,6 +385,11 @@ const PartialShape& Node::get_input_partial_shape(size_t i) const ...@@ -380,6 +385,11 @@ const PartialShape& Node::get_input_partial_shape(size_t i) const
return m_inputs.at(i).get_partial_shape(); return m_inputs.at(i).get_partial_shape();
} }
const string& Node::get_input_tensor_name(size_t i) const
{
return m_inputs.at(i).get_tensor().get_name();
}
bool Node::has_same_type(std::shared_ptr<const Node> node) const bool Node::has_same_type(std::shared_ptr<const Node> node) const
{ {
if (get_output_size() != node->get_output_size()) if (get_output_size() != node->get_output_size())
......
...@@ -236,6 +236,9 @@ namespace ngraph ...@@ -236,6 +236,9 @@ namespace ngraph
/// Returns the tensor for output i /// Returns the tensor for output i
descriptor::Tensor& get_output_tensor(size_t i) const; descriptor::Tensor& get_output_tensor(size_t i) const;
/// Returns the tensor name for output i
const std::string& get_output_tensor_name(size_t i) const;
/// Checks that there is exactly one output and returns its tensor. /// Checks that there is exactly one output and returns its tensor.
descriptor::Tensor& get_output_tensor() const; descriptor::Tensor& get_output_tensor() const;
...@@ -260,6 +263,9 @@ namespace ngraph ...@@ -260,6 +263,9 @@ namespace ngraph
/// Returns the partial shape of input i /// Returns the partial shape of input i
const PartialShape& get_input_partial_shape(size_t i) const; const PartialShape& get_input_partial_shape(size_t i) const;
/// Returns the tensor name for input i
const std::string& get_input_tensor_name(size_t i) const;
std::unordered_set<descriptor::Tensor*> liveness_new_list; std::unordered_set<descriptor::Tensor*> liveness_new_list;
std::unordered_set<descriptor::Tensor*> liveness_free_list; std::unordered_set<descriptor::Tensor*> liveness_free_list;
......
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