2 // Copyright (C) 2018-2019 Intel Corporation.
4 // This software and the related documents are Intel copyrighted materials,
5 // and your use of them is governed by the express license under which they
6 // were provided to you (End User License Agreement for the Intel(R) Software
7 // Development Products (Version May 2017)). Unless the License provides
8 // otherwise, you may not use, modify, copy, publish, distribute, disclose or
9 // transmit this software or the related documents without Intel's prior
10 // written permission.
12 // This software and the related documents are provided as is, with no
13 // express or implied warranties, other than those that are expressly
14 // stated in the License.
18 * @brief a header file for ExecutableNetwork
19 * @file dlia_executable_network.hpp
27 #include <unordered_map>
28 #include <unordered_set>
30 #include <ie_common.h>
31 #include <cpp/ie_plugin_cpp.hpp>
32 #include <cpp_interfaces/impl/ie_executable_network_thread_safe_default.hpp>
34 #include "hetero_infer_request.h"
35 #include "cnn_network_impl.hpp"
36 #include "hetero_async_infer_request.h"
38 namespace HeteroPlugin {
41 * @class ExecutableNetwork
42 * @brief Interface of executable network
44 class HeteroExecutableNetwork : public InferenceEngine::ExecutableNetworkThreadSafeDefault {
46 typedef std::shared_ptr<HeteroExecutableNetwork> Ptr;
51 HeteroExecutableNetwork(InferenceEngine::ICNNNetwork &network,
52 const std::map<std::string, std::string> &config,
53 const std::vector<InferenceEngine::IExtensionPtr> &extensions,
54 InferenceEngine::MapDeviceLoaders &deviceLoaders,
55 InferenceEngine::IErrorListener *listener);
57 virtual ~HeteroExecutableNetwork() = default;
60 * this functino implements the loading of hetero network,
61 * performs split to subgraphs and prepare intermediate blobs
66 void load(InferenceEngine::ICNNNetwork &network,
67 const std::map<std::string, std::string> &config,
68 const std::vector<InferenceEngine::IExtensionPtr> &extensions,
69 InferenceEngine::IErrorListener *listener);
71 InferenceEngine::InferRequestInternal::Ptr CreateInferRequestImpl(InferenceEngine::InputsDataMap networkInputs,
72 InferenceEngine::OutputsDataMap networkOutputs) override;
74 void CreateInferRequest(InferenceEngine::IInferRequest::Ptr &asyncRequest) override;
79 InferenceEngine::details::CNNNetworkImplPtr _clonedNetwork;
80 InferenceEngine::IHeteroDeviceLoader::Ptr _deviceLoader;
81 InferenceEngine::ExecutableNetwork::Ptr network;
82 std::unordered_set<std::string> _oNames;
83 std::unordered_set<std::string> _iNames;
85 std::vector<NetworkDesc> networks;
87 InferenceEngine::MapDeviceLoaders &_deviceLoaders;
90 } // namespace HeteroPlugin