1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
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
9 * @file vpu_plugin_config.hpp
16 #include "ie_plugin_config.hpp"
17 #include "myriad_plugin_config.hpp"
18 #include "hddl_plugin_config.hpp"
25 #define VPU_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_##name)
26 #define VPU_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_##name
28 #define DECLARE_VPU_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_##name)
29 #define DECLARE_VPU_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_##name)
35 #define VPU_METRIC(name) METRIC_KEY(VPU_##name)
36 #define DECLARE_VPU_METRIC(name, ...) DECLARE_METRIC_KEY(VPU_##name, __VA_ARGS__)
38 namespace InferenceEngine {
41 * @brief VPU plugin configuration
43 namespace VPUConfigParams {
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)
53 DECLARE_VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION);
56 * @deprecated Use CONFIG_KEY(LOG_LEVEL) instead.
57 * @brief The key to define log level
59 INFERENCE_ENGINE_DEPRECATED("Use CONFIG_KEY(LOG_LEVEL) instead")
60 DECLARE_VPU_CONFIG_KEY(LOG_LEVEL);
64 * @brief The key to define normalization coefficient for the network input.
65 * This option should used with be a real number. Example "255.f"
67 INFERENCE_ENGINE_DEPRECATED("")
68 DECLARE_VPU_CONFIG_KEY(INPUT_NORM);
72 * @brief The flag to specify Bias value that is added to each element of the network input.
73 * This option should used with be a real number. Example "0.1f"
75 INFERENCE_ENGINE_DEPRECATED("")
76 DECLARE_VPU_CONFIG_KEY(INPUT_BIAS);
79 * @brief The flag for adding to the profiling information the time of obtaining a tensor.
80 * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
82 DECLARE_VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME);
85 * @deprecated The data scaling now works automatically.
87 INFERENCE_ENGINE_DEPRECATED("The data scaling now works automatically")
88 DECLARE_VPU_CONFIG_KEY(NETWORK_CONFIG);
91 * @deprecated Use InputInfo::setLayout on input data from ICNNNetwork::getInputsInfo() or
92 * Data::setLayout on output data from ICNNNetwork::getOutputsInfo()
93 * @brief This option allows to to specify input output layouts for network layers.
94 * By default, this value set to VPU_CONFIG_VALUE(AUTO) value.
96 * VPU_CONFIG_VALUE(AUTO) executable network configured to use optimal layer layout depending on available HW
97 * VPU_CONFIG_VALUE(NCHW) executable network forced to use NCHW input/output layouts
98 * VPU_CONFIG_VALUE(NHWC) executable network forced to use NHWC input/output layouts
100 INFERENCE_ENGINE_DEPRECATED("Use InputInfo::setLayout on input data from ICNNNetwork::getInputsInfo() or" \
101 "Data::setLayout on output data from ICNNNetwork::getOutputsInfo()")
102 DECLARE_VPU_CONFIG_KEY(COMPUTE_LAYOUT);
105 * @deprecated See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info.
106 * @brief Supported keys definition for VPU_CONFIG_KEY(COMPUTE_LAYOUT) option.
108 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
109 DECLARE_VPU_CONFIG_VALUE(AUTO);
110 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
111 DECLARE_VPU_CONFIG_VALUE(NCHW);
112 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
113 DECLARE_VPU_CONFIG_VALUE(NHWC);
114 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
115 DECLARE_VPU_CONFIG_VALUE(NCDHW);
116 INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info")
117 DECLARE_VPU_CONFIG_VALUE(NDHWC);
120 * @brief This option allows to pass custom layers binding xml.
121 * If layer is present in such an xml, it would be used during inference even if the layer is natively supported
123 DECLARE_VPU_CONFIG_KEY(CUSTOM_LAYERS);
126 * @brief Ignore statistic in IR by plugin.
127 * Plugin could use statistic present in IR in order to try to improve calculations precision.
128 * If you don't want statistic to be used enable this option.
129 * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default)
131 DECLARE_VPU_CONFIG_KEY(IGNORE_IR_STATISTIC);
134 * @brief This option allows to specify protocol.
136 DECLARE_VPU_MYRIAD_CONFIG_KEY(PROTOCOL);
139 * @brief Supported keys definition for VPU_MYRIAD_CONFIG_KEY(PROTOCOL) option.
141 DECLARE_VPU_MYRIAD_CONFIG_VALUE(PCIE);
142 DECLARE_VPU_MYRIAD_CONFIG_VALUE(USB);
145 * @deprecated Use VPU_MYRIAD_CONFIG_KEY(FORCE_RESET) instead.
147 INFERENCE_ENGINE_DEPRECATED("Use VPU_MYRIAD_CONFIG_KEY(FORCE_RESET) instead")
148 DECLARE_VPU_CONFIG_KEY(FORCE_RESET);
151 * @deprecated Use VPU_MYRIAD_CONFIG_KEY(PLATFORM) instead.
153 INFERENCE_ENGINE_DEPRECATED("Use VPU_MYRIAD_CONFIG_KEY(PLATFORM) instead")
154 DECLARE_VPU_CONFIG_KEY(PLATFORM);
157 * @brief Supported keys definition for DECLARE_VPU_CONFIG_KEY(PLATFORM) option.
159 INFERENCE_ENGINE_DEPRECATED("")
160 DECLARE_VPU_CONFIG_VALUE(2450);
161 INFERENCE_ENGINE_DEPRECATED("")
162 DECLARE_VPU_CONFIG_VALUE(2480);
164 } // namespace VPUConfigParams
166 } // namespace InferenceEngine