Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / cpp_interfaces / interface / ie_iexecutable_network_internal.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <vector>
8 #include <memory>
9 #include <map>
10 #include <string>
11 #include <ie_iinfer_request.hpp>
12 #include <ie_primitive_info.hpp>
13 #include <cpp_interfaces/interface/ie_imemory_state_internal.hpp>
14
15 namespace InferenceEngine {
16
17 /**
18  * @brief minimum API to be implemented by plugin, which is used in ExecutableNetworkBase forwarding mechanism.
19  */
20 class IExecutableNetworkInternal {
21 public:
22     typedef std::shared_ptr<IExecutableNetworkInternal> Ptr;
23
24     virtual ~IExecutableNetworkInternal() = default;
25
26
27     /**
28      * @brief Gets the Executable network output Data node information. The received info is stored in the given Data node.
29      * This method need to be called to find output names for using them later during filling of a map
30      * of blobs passed later to InferenceEngine::IInferencePlugin::Infer()
31      * @return out Reference to the ConstOutputsDataMap object
32      */
33     virtual ConstOutputsDataMap GetOutputsInfo() const = 0;
34
35     /**
36      * @brief Gets the Executable network input Data node information. The received info is stored in the given InputsDataMap object.
37      * This method need to be called to find out input names for using them later during filling of a map
38      * of blobs passed later to InferenceEngine::IInferencePlugin::Infer()
39      * @return inputs Reference to ConstInputsDataMap object.
40      */
41     virtual ConstInputsDataMap GetInputsInfo() const = 0;
42
43
44     /**
45      * @brief Create an inference request object used to infer the network
46      *  Note: the returned request will have allocated input and output blobs (that can be changed later)
47      * @param req - shared_ptr for the created request
48      */
49     virtual void CreateInferRequest(IInferRequest::Ptr &req) = 0;
50
51     /**
52      * @brief Export the current created executable network so it can be used later in the Import() main API
53      * @param modelFileName - path to the location of the exported file
54      */
55     virtual void Export(const std::string &modelFileName) = 0;
56
57     /**
58      * @brief Get the mapping of IR layer names to actual implemented kernels
59      * @param deployedTopology - map of PrimitiveInfo objects representing the deployed topology
60      */
61     virtual void GetMappedTopology(std::map<std::string, std::vector<PrimitiveInfo::Ptr>> &deployedTopology) = 0;
62
63     /**
64     * @brief Get executable graph information from a device
65     * @param graphPtr network ptr to store executable graph information
66     */
67     virtual void GetExecGraphInfo(ICNNNetwork::Ptr &graphPtr) = 0;
68
69     virtual std::vector<IMemoryStateInternal::Ptr> QueryState() = 0;
70 };
71
72 }  // namespace InferenceEngine