Publishing 2019 R3 content
[platform/upstream/dldt.git] / inference-engine / src / hetero_plugin / hetero_fallback_policy.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6 #include <string>
7 #include <map>
8 #include <ie_icnn_network.hpp>
9 #include <ie_icore.hpp>
10 #include <ie_ihetero_plugin.hpp>
11 #include <utility>
12 #include <vector>
13
14 namespace InferenceEngine {
15
16 class FallbackPolicy {
17 public:
18     FallbackPolicy(InferenceEngine::MapDeviceLoaders& deviceLoaders, bool dumpDotFile,
19                    const InferenceEngine::ICore * core);
20
21     void init(const std::string &config, const std::map<std::string, std::string> &allConfigs,
22               const std::vector<InferenceEngine::IExtensionPtr> &extensions);
23
24     QueryNetworkResult getAffinities(const std::map<std::string, std::string>& config, const ICNNNetwork& pNetwork) const;
25     void setAffinity(const QueryNetworkResult & res, ICNNNetwork& pNetwork) const;
26
27 private:
28     InferenceEngine::MapDeviceLoaders &_deviceLoaders;
29     std::vector<std::string> _fallbackDevices;
30     bool _dumpDotFile;
31     const InferenceEngine::ICore * _core;
32 };
33
34 }  // namespace InferenceEngine