diff --git a/ngraph/core/include/ngraph/runtime/host_tensor.hpp b/ngraph/core/include/ngraph/runtime/host_tensor.hpp index 7a97a5d8ccd219..95ec63ad44adf0 100644 --- a/ngraph/core/include/ngraph/runtime/host_tensor.hpp +++ b/ngraph/core/include/ngraph/runtime/host_tensor.hpp @@ -25,17 +25,10 @@ namespace ngraph class NGRAPH_API HostTensor : public ngraph::runtime::Tensor { public: - HostTensor(const element::Type& element_type, - const Shape& shape, - void* memory_pointer, - const std::string& name = ""); - HostTensor(const element::Type& element_type, - const Shape& shape, - const std::string& name = ""); - HostTensor(const element::Type& element_type, - const PartialShape& partial_shape, - const std::string& name = ""); - HostTensor(const std::string& name = ""); + HostTensor(const element::Type& element_type, const Shape& shape, void* memory_pointer); + HostTensor(const element::Type& element_type, const Shape& shape); + HostTensor(const element::Type& element_type, const PartialShape& partial_shape); + HostTensor(); explicit HostTensor(const Output&); explicit HostTensor(const std::shared_ptr& constant); virtual ~HostTensor() override; diff --git a/ngraph/core/include/ngraph/runtime/tensor.hpp b/ngraph/core/include/ngraph/runtime/tensor.hpp index c0891fb8a17103..d4e17ad5446813 100644 --- a/ngraph/core/include/ngraph/runtime/tensor.hpp +++ b/ngraph/core/include/ngraph/runtime/tensor.hpp @@ -54,17 +54,6 @@ namespace ngraph NGRAPH_DEPRECATED("Only output ports have names") const std::string& get_name() const; - /// \brief Get the stale value of the tensor. A tensor is stale if its data is - /// changed. - /// \return true if there is new data in this tensor - NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release") - bool get_stale() const; - - /// \brief Set the stale value of the tensor. A tensor is stale if its data is - /// changed. - NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release") - void set_stale(bool val); - /// \brief Write bytes directly into the tensor /// \param p Pointer to source of data /// \param n Number of bytes to write, must be integral number of elements. @@ -75,15 +64,6 @@ namespace ngraph /// \param n Number of bytes to read, must be integral number of elements. virtual void read(void* p, size_t n) const = 0; - /// \brief check tensor for new data, call may block. - /// backends may use this to ensure tensor is updated (eg: lazy eval). - NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release") - virtual void wait_for_read_ready() {} - /// \brief notify tensor of new data, call may block. - /// backends may use this as indication of new data in tensor. - NGRAPH_DEPRECATED("This method is deprecated and will be removed in 2022.1 release") - virtual void wait_for_write_ready() {} - protected: std::shared_ptr m_descriptor; bool m_stale; diff --git a/ngraph/core/src/runtime/host_tensor.cpp b/ngraph/core/src/runtime/host_tensor.cpp index f1440640dd5950..7974967122eee9 100644 --- a/ngraph/core/src/runtime/host_tensor.cpp +++ b/ngraph/core/src/runtime/host_tensor.cpp @@ -16,9 +16,8 @@ static const size_t alignment = 64; runtime::HostTensor::HostTensor(const ngraph::element::Type& element_type, const Shape& shape, - void* memory_pointer, - const string& name) - : runtime::Tensor(std::make_shared(element_type, shape, name)) + void* memory_pointer) + : runtime::Tensor(std::make_shared(element_type, shape, "")) , m_memory_pointer(memory_pointer) { if (get_partial_shape().is_static() && get_element_type().is_static()) @@ -31,31 +30,27 @@ runtime::HostTensor::HostTensor(const ngraph::element::Type& element_type, } } -runtime::HostTensor::HostTensor(const element::Type& element_type, - const Shape& shape, - const std::string& name) - : HostTensor(element_type, shape, nullptr, name) +runtime::HostTensor::HostTensor(const element::Type& element_type, const Shape& shape) + : HostTensor(element_type, shape, nullptr) { } runtime::HostTensor::HostTensor(const element::Type& element_type, - const PartialShape& partial_shape, - const std::string& name) - : runtime::Tensor( - std::make_shared(element_type, partial_shape, name)) + const PartialShape& partial_shape) + : runtime::Tensor(std::make_shared(element_type, partial_shape, "")) , m_buffer_size(0) { // Defer allocation until ptr is requested } -runtime::HostTensor::HostTensor(const std::string& name) +runtime::HostTensor::HostTensor() : HostTensor(element::dynamic, PartialShape::dynamic()) { } NGRAPH_SUPPRESS_DEPRECATED_START runtime::HostTensor::HostTensor(const Output& value) - : HostTensor(value.get_element_type(), value.get_partial_shape(), value.get_tensor().get_name()) + : HostTensor(value.get_element_type(), value.get_partial_shape()) { } NGRAPH_SUPPRESS_DEPRECATED_END @@ -93,7 +88,7 @@ void runtime::HostTensor::allocate_buffer() NGRAPH_SUPPRESS_DEPRECATED_START runtime::HostTensor::HostTensor(const std::shared_ptr& constant) - : HostTensor(constant->output(0).get_tensor().get_name()) + : HostTensor() { initialize(constant); } diff --git a/ngraph/core/src/runtime/tensor.cpp b/ngraph/core/src/runtime/tensor.cpp index 55f8b3f0c3e44e..a963d7709c805e 100644 --- a/ngraph/core/src/runtime/tensor.cpp +++ b/ngraph/core/src/runtime/tensor.cpp @@ -41,13 +41,3 @@ const std::string& runtime::Tensor::get_name() const return m_descriptor->get_name(); NGRAPH_SUPPRESS_DEPRECATED_END } - -bool runtime::Tensor::get_stale() const -{ - return m_stale; -} - -void runtime::Tensor::set_stale(bool val) -{ - m_stale = val; -}