Publishing 2019 R1.1 content and Myriad plugin sources (#162)
[platform/upstream/dldt.git] / inference-engine / src / vpu / graph_transformer / include / vpu / network_config.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <vpu/graph_transformer.hpp>
8
9 #include <string>
10 #include <unordered_map>
11 #include <unordered_set>
12
13 #include <details/caseless.hpp>
14
15 namespace vpu {
16
17 namespace ie = InferenceEngine;
18
19 class NetworkConfig final {
20 public:
21     void parse(const CompilationConfig& config);
22
23     bool skipAllLayers() const;
24     bool skipLayerType(const std::string& layerType) const { return _noneLayers.count(layerType) != 0; }
25
26     bool hasManualDataScale() const { return !_dataScale.empty(); }
27     const std::unordered_map<std::string, float>& dataScale() const { return _dataScale; }
28
29     bool hwDisabled(const std::string& layerName) const;
30
31 private:
32     ie::details::caseless_set<std::string> _noneLayers;
33
34     std::unordered_map<std::string, float> _dataScale;
35
36     std::unordered_set<std::string> _hwWhiteList;
37     std::unordered_set<std::string> _hwBlackList;
38 };
39
40 }  // namespace vpu