|
14 | 14 | #include "openvino/runtime/internal_properties.hpp" |
15 | 15 | #include "openvino/runtime/core.hpp" |
16 | 16 | #include "openvino/runtime/properties.hpp" |
| 17 | +#include "openvino/runtime/shared_buffer.hpp" |
17 | 18 | #include "openvino/runtime/threading/executor_manager.hpp" |
18 | 19 | #include "transformations/rt_info/fused_names_attribute.hpp" |
19 | 20 |
|
@@ -76,6 +77,20 @@ std::shared_ptr<ov::ICompiledModel> Plugin::compile_model(const std::shared_ptr< |
76 | 77 | return compiled_model; |
77 | 78 | } |
78 | 79 |
|
| 80 | +std::shared_ptr<ov::ICompiledModel> Plugin::import_model(const ov::Tensor& model, const ov::AnyMap& properties) const { |
| 81 | + ov::SharedStreamBuffer buffer{reinterpret_cast<char*>(model.data()), model.get_byte_size()}; |
| 82 | + std::istream stream{&buffer}; |
| 83 | + return import_model(stream, properties); |
| 84 | +}; |
| 85 | + |
| 86 | +std::shared_ptr<ov::ICompiledModel> Plugin::import_model(const ov::Tensor& model, |
| 87 | + const ov::SoPtr<ov::IRemoteContext>& context, |
| 88 | + const ov::AnyMap& properties) const { |
| 89 | + ov::SharedStreamBuffer buffer{reinterpret_cast<char*>(model.data()), model.get_byte_size()}; |
| 90 | + std::istream stream{&buffer}; |
| 91 | + return import_model(stream, context, properties); |
| 92 | +}; |
| 93 | + |
79 | 94 | std::shared_ptr<ov::ICompiledModel> Plugin::import_model(std::istream& model_stream, |
80 | 95 | const ov::AnyMap& properties) const { |
81 | 96 | return import_model(model_stream, {}, properties); |
|
0 commit comments