vpu_plugin_config.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @brief A header that defines advanced related properties for VPU plugins.
7  * These properties should be used in SetConfig() and LoadNetwork() methods of plugins
8  *
9  * @file vpu_plugin_config.hpp
10  */
11 
12 #pragma once
13 
14 #include <string>
15 
16 #include "ie_plugin_config.hpp"
17 #include "myriad_plugin_config.hpp"
18 #include "hddl_plugin_config.hpp"
19 #include "ie_api.h"
20 
21 //
22 // Common options
23 //
24 
25 #define VPU_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_##name)
26 #define VPU_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_##name
27 
28 #define DECLARE_VPU_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_##name)
29 #define DECLARE_VPU_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_##name)
30 
31 //
32 // Common metrics
33 //
34 
35 #define VPU_METRIC(name) METRIC_KEY(VPU_##name)
36 #define DECLARE_VPU_METRIC(name, ...) DECLARE_METRIC_KEY(VPU_##name, __VA_ARGS__)
37 
38 namespace InferenceEngine {
39 
40 /**
41  * @brief VPU plugin configuration
42  */
43 namespace VPUConfigParams {
44 
45 //
46 // Common options
47 //
48 
49 /**
50  * @brief Turn on HW stages usage (applicable for MyriadX devices only).
51  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
52  */
53 DECLARE_VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION);
54 
55 /**
56  * @deprecated Use CONFIG_KEY(LOG_LEVEL) instead.
57  */
58 INFERENCE_ENGINE_DEPRECATED("Use CONFIG_KEY(LOG_LEVEL) instead")
59 DECLARE_VPU_CONFIG_KEY(LOG_LEVEL);
60 
61 /**
62  * @deprecated
63  * @brief The key to define normalization coefficient for the network input.
64  * This option should used with be a real number. Example "255.f"
65  */
66 INFERENCE_ENGINE_DEPRECATED("")
67 DECLARE_VPU_CONFIG_KEY(INPUT_NORM);
68 
69 /**
70  * @deprecated
71  * @brief The flag to specify Bias value that is added to each element of the network input.
72  * This option should used with be a real number. Example "0.1f"
73  */
74 INFERENCE_ENGINE_DEPRECATED("")
75 DECLARE_VPU_CONFIG_KEY(INPUT_BIAS);
76 
77 /**
78  * @brief The flag for adding to the profiling information the time of obtaining a tensor.
79  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
80  */
81 DECLARE_VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME);
82 
83 /**
84  * @deprecated The data scaling now works automatically.
85  */
86 INFERENCE_ENGINE_DEPRECATED("The data scaling now works automatically")
87 DECLARE_VPU_CONFIG_KEY(NETWORK_CONFIG);
88 
89 /**
90  * @deprecated Use InputInfo::setLayout on input data from ICNNNetwork::getInputsInfo() or
91  * Data::setLayout on output data from ICNNNetwork::getOutputsInfo()
92  * @brief This option allows to to specify input output layouts for network layers.
93  * By default, this value set to VPU_CONFIG_VALUE(AUTO) value.
94  * Supported values:
95  * VPU_CONFIG_VALUE(AUTO) executable network configured to use optimal layer layout depending on available HW
96  * VPU_CONFIG_VALUE(NCHW) executable network forced to use NCHW input/output layouts
97  * VPU_CONFIG_VALUE(NHWC) executable network forced to use NHWC input/output layouts
98  */
99 INFERENCE_ENGINE_DEPRECATED("Use InputInfo::setLayout on input data from ICNNNetwork::getInputsInfo() or" \
100  "Data::setLayout on output data from ICNNNetwork::getOutputsInfo()")
101 DECLARE_VPU_CONFIG_KEY(COMPUTE_LAYOUT);
102 
103 /**
104  * @deprecated See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info.
105  * @brief Supported keys definition for VPU_CONFIG_KEY(COMPUTE_LAYOUT) option.
106  */
107 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
108 DECLARE_VPU_CONFIG_VALUE(AUTO);
109 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
110 DECLARE_VPU_CONFIG_VALUE(NCHW);
111 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
112 DECLARE_VPU_CONFIG_VALUE(NHWC);
113 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
114 DECLARE_VPU_CONFIG_VALUE(NCDHW);
115 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
116 DECLARE_VPU_CONFIG_VALUE(NDHWC);
117 
118 /**
119  * @brief This option allows to pass custom layers binding xml.
120  * If layer is present in such an xml, it would be used during inference even if the layer is natively supported
121  */
122 DECLARE_VPU_CONFIG_KEY(CUSTOM_LAYERS);
123 
124 /**
125  * @brief Ignore statistic in IR by plugin.
126  * Plugin could use statistic present in IR in order to try to improve calculations precision.
127  * If you don't want statistic to be used enable this option.
128  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
129  */
130 DECLARE_VPU_CONFIG_KEY(IGNORE_IR_STATISTIC);
131 
132 /**
133  * @brief This option allows to specify protocol.
134  */
135 DECLARE_VPU_MYRIAD_CONFIG_KEY(PROTOCOL);
136 
137 /**
138  * @brief Supported keys definition for VPU_MYRIAD_CONFIG_KEY(PROTOCOL) option.
139  */
140 DECLARE_VPU_MYRIAD_CONFIG_VALUE(PCIE);
141 DECLARE_VPU_MYRIAD_CONFIG_VALUE(USB);
142 
143 /**
144  * @deprecated Use VPU_MYRIAD_CONFIG_KEY(FORCE_RESET) instead.
145  */
146 INFERENCE_ENGINE_DEPRECATED("Use VPU_MYRIAD_CONFIG_KEY(FORCE_RESET) instead")
147 DECLARE_VPU_CONFIG_KEY(FORCE_RESET);
148 
149 /**
150  * @deprecated Use VPU_MYRIAD_CONFIG_KEY(PLATFORM) instead.
151  */
152 INFERENCE_ENGINE_DEPRECATED("Use VPU_MYRIAD_CONFIG_KEY(PLATFORM) instead")
153 DECLARE_VPU_CONFIG_KEY(PLATFORM);
154 
155 /**
156  * @brief Supported keys definition for DECLARE_VPU_CONFIG_KEY(PLATFORM) option.
157  */
158 INFERENCE_ENGINE_DEPRECATED("")
159 DECLARE_VPU_CONFIG_VALUE(2450);
160 INFERENCE_ENGINE_DEPRECATED("")
161 DECLARE_VPU_CONFIG_VALUE(2480);
162 
163 } // namespace VPUConfigParams
164 
165 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
a header for advanced hardware related properties for clDNN plugin To use in SetConfig() method of pl...
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS...