diff --git a/inference-engine/src/inference_engine/include/openvino/runtime/remote_context.hpp b/inference-engine/src/inference_engine/include/openvino/runtime/remote_context.hpp index 8faead4db45..b4c9848f913 100644 --- a/inference-engine/src/inference_engine/include/openvino/runtime/remote_context.hpp +++ b/inference-engine/src/inference_engine/include/openvino/runtime/remote_context.hpp @@ -3,9 +3,9 @@ // /** - * @brief This is a header file for the IE RemoteContext and RemoteBlob classes + * @brief This is a header file for the OpenVINO Runtime RemoteContext class * - * @file ie_remote_context.hpp + * @file openvino/runtime/remote_context.hpp */ #pragma once @@ -14,6 +14,8 @@ #include #include "ie_remote_context.hpp" +#include "openvino/core/shape.hpp" +#include "openvino/core/type/element_type.hpp" #include "openvino/runtime/common.hpp" #include "openvino/runtime/parameter.hpp" @@ -111,15 +113,18 @@ public: std::string get_device_name() const; /** - * @brief Allocates memory blob in device memory or wraps user-supplied memory handle + * @brief Allocates memory tensor in device memory or wraps user-supplied memory handle * using the specified tensor description and low-level device-specific parameters. - * Returns a pointer to the object which implements RemoteBlob interface. - * @param tensorDesc Defines the layout and dims of the blob - * @param params Map of the low-level blob object parameters. + * Returns a pointer to the object which implements RemoteTensor interface. + * @param element_type Defines the element type of the tensor + * @param shape Defines the shape of the tensor + * @param params Map of the low-level tensor object parameters. * Abstract method. - * @return A pointer to plugin object that implements RemoteBlob interface. + * @return A pointer to plugin object that implements RemoteTensor interface. */ - std::shared_ptr create_blob(const ie::TensorDesc& tensorDesc, const ParamMap& params = {}); + std::shared_ptr create_blob(element::Type element_type, + const Shape& shape, + const ParamMap& params = {}); /** * @brief Returns a map of device-specific parameters required for low-level diff --git a/inference-engine/src/inference_engine/src/cpp/ie_remote_context.cpp b/inference-engine/src/inference_engine/src/cpp/ie_remote_context.cpp index 79ec884050e..5e41d30dd1c 100644 --- a/inference-engine/src/inference_engine/src/cpp/ie_remote_context.cpp +++ b/inference-engine/src/inference_engine/src/cpp/ie_remote_context.cpp @@ -6,6 +6,7 @@ #include +#include "ie_ngraph_utils.hpp" #include "ie_remote_blob.hpp" #include "openvino/core/except.hpp" #include "openvino/runtime/remote_context.hpp" @@ -31,8 +32,12 @@ std::string RemoteContext::get_device_name() const { OV_REMOTE_CONTEXT_STATEMENT(return _impl->getDeviceName()); } -std::shared_ptr RemoteContext::create_blob(const ie::TensorDesc& tensorDesc, +std::shared_ptr RemoteContext::create_blob(element::Type type, + const Shape& shape, const ie::ParamMap& params) { + ie::TensorDesc tensorDesc(ie::details::convertPrecision(type), + shape, + ie::TensorDesc::getLayoutByRank(shape.size())); OV_REMOTE_CONTEXT_STATEMENT(return _impl->CreateBlob(tensorDesc, params)); }