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 namespace VPUConfigParams {
41 
42 //
43 // Common options
44 //
45 
46 /**
47  * @brief Turn on HW stages usage (applicable for MyriadX devices only).
48  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
49  */
50 DECLARE_VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION);
51 
52 /**
53  * @brief The key to specify desirable log level for devices.
54  * This option should be used with values: CONFIG_VALUE(LOG_NONE) (default),
55  * CONFIG_VALUE(LOG_WARNING), CONFIG_VALUE(LOG_INFO), CONFIG_VALUE(LOG_DEBUG)
56  */
57 DECLARE_VPU_CONFIG_KEY(LOG_LEVEL);
58 
59 /**
60  * @deprecated
61  * @brief The key to define normalization coefficient for the network input.
62  * This option should used with be a real number. Example "255.f"
63  */
64 INFERENCE_ENGINE_DEPRECATED
65 DECLARE_VPU_CONFIG_KEY(INPUT_NORM);
66 
67 /**
68  * @deprecated
69  * @brief The flag to specify Bias value that is added to each element of the network input.
70  * This option should used with be a real number. Example "0.1f"
71  */
72 INFERENCE_ENGINE_DEPRECATED
73 DECLARE_VPU_CONFIG_KEY(INPUT_BIAS);
74 
75 /**
76  * @brief The flag for adding to the profiling information the time of obtaining a tensor.
77  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
78  */
79 DECLARE_VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME);
80 
81 /**
82  * @brief This option allows to pass extra configuration for executable network.
83  * By default, it is empty string, which means - no configuration.
84  * String format:
85  * <key>=<value>,<key>=<value>,...
86  * Supported parameters and options:
87  * * file : path to XML file with configuration
88  * * data : options related to data objects (input, output, intermediate), next parameter describes the option
89  * * scale : SCALE factor for data range (applicable for input and intermediate data)
90  */
91 DECLARE_VPU_CONFIG_KEY(NETWORK_CONFIG);
92 
93 /**
94  * @brief This option allows to to specify input output layouts for network layers.
95  * By default, this value set to VPU_CONFIG_VALUE(AUTO) value.
96  * Supported values:
97  * VPU_CONFIG_VALUE(AUTO) executable network configured to use optimal layer layout depending on available HW
98  * VPU_CONFIG_VALUE(NCHW) executable network forced to use NCHW input/output layouts
99  * VPU_CONFIG_VALUE(NHWC) executable network forced to use NHWC input/output layouts
100  */
101 DECLARE_VPU_CONFIG_KEY(COMPUTE_LAYOUT);
102 
103 /**
104  * @brief Supported keys definition for VPU_CONFIG_KEY(COMPUTE_LAYOUT) option.
105  */
106 DECLARE_VPU_CONFIG_VALUE(AUTO);
107 DECLARE_VPU_CONFIG_VALUE(NCHW);
108 DECLARE_VPU_CONFIG_VALUE(NHWC);
109 
110 /**
111  * @brief This option allows to pass custom layers binding xml.
112  * If layer is present in such an xml, it would be used during inference even if the layer is natively supported
113  */
114 DECLARE_VPU_CONFIG_KEY(CUSTOM_LAYERS);
115 
116 /**
117  * @brief Ignore statistic in IR by plugin.
118  * Plugin could use statistic present in IR in order to try to improve calculations precision.
119  * If you don't want statistic to be used enable this option.
120  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
121  */
122 DECLARE_VPU_CONFIG_KEY(IGNORE_IR_STATISTIC);
123 
124 /**
125  * @brief This option allows to specify protocol.
126  */
127 DECLARE_VPU_MYRIAD_CONFIG_KEY(PROTOCOL);
128 
129 /**
130  * @brief Supported keys definition for VPU_MYRIAD_CONFIG_KEY(PROTOCOL) option.
131  */
132 DECLARE_VPU_MYRIAD_CONFIG_VALUE(PCIE);
133 DECLARE_VPU_MYRIAD_CONFIG_VALUE(USB);
134 
135 /**
136  * @deprecated Use VPU_MYRIAD_CONFIG_KEY(FORCE_RESET) instead.
137  */
138 INFERENCE_ENGINE_DEPRECATED
139 DECLARE_VPU_CONFIG_KEY(FORCE_RESET);
140 
141 /**
142  * @deprecated Use VPU_MYRIAD_CONFIG_KEY(PLATFORM) instead.
143  */
144 INFERENCE_ENGINE_DEPRECATED
145 DECLARE_VPU_CONFIG_KEY(PLATFORM);
146 
147 /**
148  * @brief Supported keys definition for DECLARE_VPU_CONFIG_KEY(PLATFORM) option.
149  */
150 INFERENCE_ENGINE_DEPRECATED
151 DECLARE_VPU_CONFIG_VALUE(2450);
152 INFERENCE_ENGINE_DEPRECATED
153 DECLARE_VPU_CONFIG_VALUE(2480);
154 
155 /**
156  * @brief [Only for HDDLPlugin]
157  * Type: "YES/NO", default is "NO".
158  * SGAD is short for "Single Graph All Device". With this scheduler, once application allocates 1 network, all devices
159  * (managed by SGAD scheduler) will be loaded with this graph. The number of network that can be loaded to one device
160  * can exceed one. Once application deallocates 1 network from device, all devices will unload the network from them.
161  */
162 DECLARE_VPU_HDDL_CONFIG_KEY(USE_SGAD);
163 
164 } // namespace VPUConfigParams
165 
166 } // namespace InferenceEngine
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...