vpu_plugin_config.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018 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 #include "../ie_plugin_config.hpp"
16 
17 #define VPU_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_##name)
18 #define VPU_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_##name
19 
20 #define DECLARE_VPU_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_##name)
21 #define DECLARE_VPU_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_##name)
22 
23 #define VPU_HDDL_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_HDDL_##name)
24 #define VPU_HDDL_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_HDDL_##name
25 
26 #define DECLARE_VPU_HDDL_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_HDDL_##name)
27 #define DECLARE_VPU_HDDL_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_HDDL_##name)
28 
29 namespace InferenceEngine {
30 namespace VPUConfigParams {
31 
32 /**
33  * @brief Turn on HW stages usage (applicable for MyriadX devices only).
34  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
35  */
36 DECLARE_VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION);
37 
38 /**
39  * @brief The key to specify desirable log level for devices.
40  * This option should be used with values: CONFIG_VALUE(LOG_NONE) (default),
41  * CONFIG_VALUE(LOG_WARNING), CONFIG_VALUE(LOG_INFO), CONFIG_VALUE(LOG_DEBUG)
42  */
43 DECLARE_VPU_CONFIG_KEY(LOG_LEVEL);
44 
45 /**
46  * @deprecated
47  * @brief The key to define normalization coefficient for the network input.
48  * This option should used with be a real number. Example "255.f"
49  */
50 DECLARE_VPU_CONFIG_KEY(INPUT_NORM);
51 
52 /**
53  * @deprecated
54  * @brief The flag to specify Bias value that is added to each element of the network input.
55  * This option should used with be a real number. Example "0.1f"
56  */
57 DECLARE_VPU_CONFIG_KEY(INPUT_BIAS);
58 
59 /**
60  * @brief The flag for adding to the profiling information the time of obtaining a tensor.
61  * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
62  */
63 DECLARE_VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME);
64 
65 /**
66  * @brief The flag to reset stalled devices: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
67  * This is a plugin scope option and must be used with the plugin's SetConfig method
68  */
69 DECLARE_VPU_CONFIG_KEY(FORCE_RESET);
70 
71 /**
72  * @brief This option allows to specify the number of MYX devices used for inference by Executable network.
73  * The number of devices for the tag is specified in the hddl_service.config file.
74  * Example:
75  * "service_settings":
76  * {
77  * "graph_tag_map":
78  * {
79  * "tagA":3
80  * }
81  * }
82  * It means that an executable network marked with tagA will be executed on 3 devices
83  */
84 DECLARE_VPU_HDDL_CONFIG_KEY(GRAPH_TAG);
85 
86 /**
87  * @brief This options allows to specify that several different executable networks, marked with the same STREAM_ID,
88  * must be executed on the same device.
89  * The number of devices which will be used for stream-affinity must be specified in hddl_service.config file.
90  * Example:
91  * "service_settings":
92  * {
93  * "stream_device_number":5
94  * }
95  * It means that 5 device will be used for stream-affinity
96  */
97 DECLARE_VPU_HDDL_CONFIG_KEY(STREAM_ID);
98 
99 /**
100  * @brief This option allows to pass extra configuration for executable network.
101  * By default, it is empty string, which means - no configuration.
102  * String format:
103  * <key>=<value>,<key>=<value>,...
104  * Supported parameters and options:
105  * * file : path to XML file with configuration
106  * * data : options related to data objects (input, output, intermediate), next parameter describes the option
107  * * scale : SCALE factor for data range (applicable for input and intermediate data)
108  */
109 DECLARE_VPU_CONFIG_KEY(NETWORK_CONFIG);
110 
111 /**
112  * @brief This option allows to to specify input output layouts for network layers.
113  * By default, this value set to VPU_CONFIG_VALUE(AUTO) value.
114  * Supported values:
115  * VPU_CONFIG_VALUE(AUTO) executable network configured to use optimal layer layout depending on available HW
116  * VPU_CONFIG_VALUE(NCHW) executable network forced to use NCHW input/output layouts
117  * VPU_CONFIG_VALUE(NHWC) executable network forced to use NHWC input/output layouts
118  */
119 DECLARE_VPU_CONFIG_KEY(COMPUTE_LAYOUT);
120 
121 /**
122  * @brief This option allows to pass custom layers binding xml.
123  * If layer is present in such an xml, it would be used during inference even if the layer is natively supported
124  */
125 DECLARE_VPU_CONFIG_KEY(CUSTOM_LAYERS);
126 
127 /**
128  * @brief Supported keys definition for VPU_CONFIG_KEY(COMPUTE_LAYOUT) option.
129  */
130 DECLARE_VPU_CONFIG_VALUE(AUTO);
131 DECLARE_VPU_CONFIG_VALUE(NCHW);
132 DECLARE_VPU_CONFIG_VALUE(NHWC);
133 
134 /**
135  * @brief This option allows to specify device.
136  * If specified device is not available then creating infer request will throw an exception.
137  */
138 DECLARE_VPU_CONFIG_KEY(PLATFORM);
139 
140 /**
141  * @brief Supported keys definition for VPU_CONFIG_KEY(PLATFORM) option.
142  */
143 DECLARE_VPU_CONFIG_VALUE(2450);
144 DECLARE_VPU_CONFIG_VALUE(2480);
145 
146 } // namespace VPUConfigParams
147 } // namespace InferenceEngine
Definition: ie_argmax_layer.hpp:11