Check HolderTests under the proxy (#19785)
* Skip only virtual device tests * Fixed proxy life time * Fixed compiled model get property * Fixed code style * Try to fix LTO
This commit is contained in:
1 parent
1a950f9e8d
commit
fa667156cb
5 files changed
+32
-11
No files matched your search
@@ -370,6 +370,11 @@ class Node;
|
||||
class RuntimeAttribute;
|
||||
|
||||
class CompiledModel;
|
||||
namespace proxy {
|
||||
|
||||
class CompiledModel;
|
||||
|
||||
}
|
||||
class RemoteContext;
|
||||
class RemoteTensor;
|
||||
|
||||
@@ -659,6 +664,7 @@ class OPENVINO_API Any {
|
||||
friend class ::ov::RuntimeAttribute;
|
||||
friend class ::InferenceEngine::ExecutableNetwork;
|
||||
friend class ::ov::CompiledModel;
|
||||
friend class ::ov::proxy::CompiledModel;
|
||||
friend class ::ov::RemoteContext;
|
||||
friend class ::ov::RemoteTensor;
|
||||
friend class ::ov::Plugin;
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
#include "openvino/runtime/icompiled_model.hpp"
|
||||
#include "openvino/runtime/properties.hpp"
|
||||
|
||||
#define OV_COMPILED_MODEL_CALL_STATEMENT(...) \
|
||||
OPENVINO_ASSERT(_impl != nullptr, "CompiledModel was not initialized."); \
|
||||
try { \
|
||||
__VA_ARGS__; \
|
||||
} catch (const std::exception& ex) { \
|
||||
OPENVINO_THROW(ex.what()); \
|
||||
} catch (...) { \
|
||||
OPENVINO_THROW("Unexpected exception"); \
|
||||
#define OV_COMPILED_MODEL_CALL_STATEMENT(...) \
|
||||
if (_impl == nullptr) \
|
||||
OPENVINO_THROW("CompiledModel was not initialized."); \
|
||||
try { \
|
||||
__VA_ARGS__; \
|
||||
} catch (const std::exception& ex) { \
|
||||
OPENVINO_THROW(ex.what()); \
|
||||
} catch (...) { \
|
||||
OPENVINO_THROW("Unexpected exception"); \
|
||||
}
|
||||
|
||||
namespace ov {
|
||||
@@ -115,7 +116,12 @@ void CompiledModel::set_property(const AnyMap& config) {
|
||||
}
|
||||
|
||||
Any CompiledModel::get_property(const std::string& name) const {
|
||||
OV_COMPILED_MODEL_CALL_STATEMENT(return {_impl->get_property(name), {_so}});
|
||||
OV_COMPILED_MODEL_CALL_STATEMENT({
|
||||
auto property = _impl->get_property(name);
|
||||
if (!property._so)
|
||||
property._so = _so;
|
||||
return property;
|
||||
});
|
||||
}
|
||||
|
||||
RemoteContext CompiledModel::get_context() const {
|
||||
|
||||
@@ -129,6 +129,8 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
R"(.*MemoryDynamicBatch.*)",
|
||||
// Meta plugins may miss saving HW plugin so handle, thus plugin may be unloaded before all objects are deleted which leads to segfault
|
||||
// Issue: 118840
|
||||
R"(.*OVHoldersTest.*)",
|
||||
R"(.*OVHoldersTest.*AUTO.*)",
|
||||
R"(.*OVHoldersTest.*MULTI.*)",
|
||||
R"(.*OVHoldersTest.*BATCH.*)",
|
||||
};
|
||||
}
|
||||
@@ -38,7 +38,10 @@ public:
|
||||
}
|
||||
|
||||
ov::Any get_property(const std::string& name) const override {
|
||||
return m_compiled_model->get_property(name);
|
||||
auto property = m_compiled_model->get_property(name);
|
||||
if (!property._so)
|
||||
property._so = m_compiled_model._so;
|
||||
return property;
|
||||
}
|
||||
const std::vector<ov::Output<const ov::Node>>& inputs() const override {
|
||||
return m_compiled_model->inputs();
|
||||
|
||||
@@ -49,6 +49,8 @@ std::vector<ov::ProfilingInfo> ov::proxy::InferRequest::get_profiling_info() con
|
||||
|
||||
ov::SoPtr<ov::ITensor> ov::proxy::InferRequest::get_tensor(const ov::Output<const ov::Node>& port) const {
|
||||
auto tensor = m_infer_request->get_tensor(port);
|
||||
if (!tensor._so)
|
||||
tensor._so = m_infer_request._so;
|
||||
if (std::dynamic_pointer_cast<ov::IRemoteTensor>(tensor._ptr)) {
|
||||
auto remote_context = std::dynamic_pointer_cast<ov::proxy::RemoteContext>(m_compiled_model->get_context()._ptr);
|
||||
OPENVINO_ASSERT(remote_context);
|
||||
@@ -64,6 +66,8 @@ void ov::proxy::InferRequest::set_tensor(const ov::Output<const ov::Node>& port,
|
||||
std::vector<ov::SoPtr<ov::ITensor>> ov::proxy::InferRequest::get_tensors(const ov::Output<const ov::Node>& port) const {
|
||||
auto tensors = m_infer_request->get_tensors(port);
|
||||
for (auto&& tensor : tensors) {
|
||||
if (!tensor._so)
|
||||
tensor._so = m_infer_request._so;
|
||||
if (std::dynamic_pointer_cast<ov::IRemoteTensor>(tensor._ptr)) {
|
||||
auto remote_context =
|
||||
std::dynamic_pointer_cast<ov::proxy::RemoteContext>(m_compiled_model->get_context()._ptr);
|
||||
|
||||
Reference in new issue
Block a user