1 // Copyright (C) 2018-2019 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
15 #include "ie_plugin_config.hpp"
17 namespace InferenceEngine {
19 namespace GNAConfigParams {
21 #define GNA_CONFIG_KEY(name) InferenceEngine::GNAConfigParams::_CONFIG_KEY(GNA_##name)
22 #define GNA_CONFIG_VALUE(name) InferenceEngine::GNAConfigParams::GNA_##name
24 #define DECLARE_GNA_CONFIG_KEY(name) DECLARE_CONFIG_KEY(GNA_##name)
25 #define DECLARE_GNA_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(GNA_##name)
28 * @brief Scale factor that is calculated by user, in order to use static quantisation feature
29 * This option should be used with floating point value serialized to string with decimal separator equals to . (dot)
30 * @details For multiple input case, individual scale factors can be passed, using KEY_GNA_SCALE_FACTOR[_input_layer_name]
31 * where input_layer can be obtained from from CNNNetwork::GetInputsInfo
33 DECLARE_GNA_CONFIG_KEY(SCALE_FACTOR);
36 * @brief By default gna api work in Int16 precision, however this can be adjusted if necessary,
37 * currently supported values are I16, I8
39 DECLARE_GNA_CONFIG_KEY(PRECISION);
43 * @brief if turned on, dump GNA firmware model into specified file
45 DECLARE_GNA_CONFIG_KEY(FIRMWARE_MODEL_IMAGE);
48 * @brief GNA proc_type setting that should be one of GNA_AUTO, GNA_HW, GNA_SW, GNA_SW_EXACT
50 DECLARE_GNA_CONFIG_KEY(DEVICE_MODE);
52 DECLARE_GNA_CONFIG_VALUE(AUTO);
53 DECLARE_GNA_CONFIG_VALUE(HW);
54 DECLARE_GNA_CONFIG_VALUE(SW);
55 DECLARE_GNA_CONFIG_VALUE(SW_EXACT);
58 * @brief if enabled produced minimum memory footprint for loaded network in GNA memory, default value is YES
60 DECLARE_GNA_CONFIG_KEY(COMPACT_MODE);
63 * @brief The option to enable/disable uniformly distributed PWL algorithm.
64 * By default (in case of NO value set) the optimized algorithm called "Recursive Descent Algorithm for Finding
65 * the Optimal Minimax Piecewise Linear Approximation of Convex Functions is used.
66 * If value is YES then simple uniform distribution used to create PWL approximation of activation functions
67 * Uniform distribution usually gives poor approximation with same number of segments
69 DECLARE_GNA_CONFIG_KEY(PWL_UNIFORM_DESIGN);
72 * @brief By default, the GNA plugin uses one worker thread for inference computations.
73 * This parameter allows you to create up to 127 threads for software modes.
75 * Note that multithreading mode does not guarantee the same computation order as order
76 * of issuing. Additionally, in this case, software modes do not implement any serializations.
78 DECLARE_GNA_CONFIG_KEY(LIB_N_THREADS);
79 } // namespace GNAConfigParams
80 } // namespace InferenceEngine