From 9743784f911a2d6366e123afb65607cde9697fd7 Mon Sep 17 00:00:00 2001 From: Aleksandr Korolev Date: Fri, 4 Feb 2022 16:32:00 +0300 Subject: [PATCH] [VPU] update config header (#9857) * [VPU] update config header * Review fixes * Performance hint config update * Removal deprecated vpu config stuff * Review changes * Rename myriad properties from camelCase to snake_case * Review changes * Review fixes * Removal intel_myriad::common namespace * OV throughput stream option * Test fix * Reverted disable_convert & disable_reorder * Bugfixes * Change default value for PerformanceHintNumRequestsOption --- samples/cpp/benchmark_app/main.cpp | 1 - .../include/ie/vpu/hddl_plugin_config.hpp | 254 ------------------ .../include/ie/vpu/myriad_plugin_config.hpp | 68 ----- .../include/ie/vpu/vpu_plugin_config.hpp | 125 --------- .../runtime/intel_myriad/hddl_properties.hpp | 174 ++++++++++++ .../intel_myriad/myriad_properties.hpp | 129 +++++++++ .../options/ov_throughput_streams.hpp | 36 +++ .../options/performance_hint.hpp | 1 + .../options/performance_hint_num_requests.hpp | 1 + .../include/vpu/private_plugin_config.hpp | 10 - .../src/configuration/options/memory_type.cpp | 10 - .../options/ov_throughput_streams.cpp | 70 +++++ .../options/performance_hint.cpp | 15 +- .../options/performance_hint_num_requests.cpp | 10 +- .../src/configuration/options/protocol.cpp | 7 - .../src/frontend/frontend.cpp | 2 +- .../src/graph_transformer.cpp | 3 + .../graph_transformer/src/stages/permute.cpp | 21 +- .../myriad_executable_network.cpp | 5 +- .../myriad_plugin/myriad_executor.cpp | 2 - .../myriad_plugin/myriad_metrics.cpp | 21 +- .../myriad_plugin/myriad_plugin.cpp | 78 +++--- .../behavior/infer_request/config.cpp | 15 -- .../behavior/ov_plugin/core_integration.cpp | 14 +- .../behavior/plugin/configuration_tests.cpp | 114 -------- .../behavior/plugin/core_integration.cpp | 10 +- .../single_layer_tests/nonzero.cpp | 1 - .../subgraph_tests/concat_split_transpose.cpp | 1 - .../subgraph_tests/nonzero_transpose.cpp | 1 - .../unit/vpu/base/graph_transformer_tests.cpp | 11 +- .../plugin_tests/behavior_test_plugin.h | 2 - .../vpu/myriad_tests/vpu_get_metric_tests.cpp | 1 - .../plugin_tests/vpu_test_data.hpp | 40 --- .../common/layers/myriad_layers_rfcn_test.cpp | 4 +- .../regression/helpers/vpu_case_common.cpp | 1 + .../regression/helpers/vpu_case_common.hpp | 1 - .../helpers/vpu_classification_case.cpp | 5 +- .../graph_transformer/gt_functional_tests.cpp | 13 +- .../vpu/myriad_tests/myriad_configs_tests.cpp | 7 - .../vpu/vpu_base/myriad_layers_tests.hpp | 7 - .../vpu/vpu_base/vpu_layers_tests.hpp | 1 - .../helpers/tests_vpu_common.hpp | 1 - .../engines/vpu/graph_transformer_tests.cpp | 12 +- .../vpu/myriad_tests/myriad_engine_tests.cpp | 29 +- .../vpu/myriad_tests/myriad_metrics_tests.cpp | 2 - tools/compile_tool/main.cpp | 1 - 46 files changed, 528 insertions(+), 809 deletions(-) delete mode 100644 src/inference/include/ie/vpu/hddl_plugin_config.hpp delete mode 100644 src/inference/include/ie/vpu/myriad_plugin_config.hpp delete mode 100644 src/inference/include/ie/vpu/vpu_plugin_config.hpp create mode 100644 src/inference/include/openvino/runtime/intel_myriad/hddl_properties.hpp create mode 100644 src/inference/include/openvino/runtime/intel_myriad/myriad_properties.hpp create mode 100644 src/plugins/intel_myriad/common/include/vpu/configuration/options/ov_throughput_streams.hpp create mode 100644 src/plugins/intel_myriad/common/src/configuration/options/ov_throughput_streams.cpp diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 8c977855168..14a231c41ab 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -16,7 +16,6 @@ #include "gna/gna_config.hpp" #include "gpu/gpu_config.hpp" -#include "vpu/vpu_plugin_config.hpp" #include "samples/args_helper.hpp" #include "samples/common.hpp" diff --git a/src/inference/include/ie/vpu/hddl_plugin_config.hpp b/src/inference/include/ie/vpu/hddl_plugin_config.hpp deleted file mode 100644 index 280ab8b580e..00000000000 --- a/src/inference/include/ie/vpu/hddl_plugin_config.hpp +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (C) 2018-2022 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -/** - * @deprecated Use vpu/hddl_config.hpp instead. - * @brief A header that defines advanced related properties for VPU plugins. - * These properties should be used in SetConfig() and LoadNetwork() methods of plugins - * - * @file hddl_plugin_config.hpp - */ - -#pragma once - -#include "ie_api.h" -#include "ie_plugin_config.hpp" - -// -// Options -// - -/** - * @def VPU_HDDL_CONFIG_KEY(name) - * @brief Shortcut for defining VPU HDDL configuration key - */ -#define VPU_HDDL_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_HDDL_##name) -/** - * @def VPU_HDDL_CONFIG_VALUE(name) - * @brief Shortcut for defining VPU HDDL configuration value - */ -#define VPU_HDDL_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_HDDL_##name - -#define DECLARE_VPU_HDDL_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_HDDL_##name) -#define DECLARE_VPU_HDDL_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_HDDL_##name) - -// -// Metrics -// - -/** - * @def VPU_HDDL_METRIC(name) - * @brief Shortcut for defining VPU HDDL metric - */ -#define VPU_HDDL_METRIC(name) METRIC_KEY(VPU_HDDL_##name) -#define DECLARE_VPU_HDDL_METRIC(name, ...) DECLARE_METRIC_KEY(VPU_HDDL_##name, __VA_ARGS__) - -namespace InferenceEngine { - -namespace Metrics { - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_NUM instead - * @brief Metric to get a int of the device number, String value is METRIC_VPU_HDDL_DEVICE_NUM - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_NUM instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_NUM, int); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_NAME instead - * @brief Metric to get a std::vector of device names, String value is METRIC_VPU_HDDL_DEVICE_NAME - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_NAME instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_NAME, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_THERMAL instead - * @brief Metric to get a std::vector of device thermal, String value is METRIC_VPU_HDDL_DEVICE_THERMAL - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_THERMAL instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_THERMAL, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_ID instead - * @brief Metric to get a std::vector of device ids, String value is METRIC_VPU_HDDL_DEVICE_ID - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_ID instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_ID, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_SUBCLASS instead - * @brief Metric to get a std::vector of device subclasses, String value is METRIC_VPU_HDDL_DEVICE_SUBCLASS - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_SUBCLASS instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_SUBCLASS, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_MEMORY_TOTAL instead - * @brief Metric to get a std::vector of device total memory, String value is METRIC_VPU_HDDL_MEMORY_TOTAL - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_MEMORY_TOTAL instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_MEMORY_TOTAL, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_MEMORY_USED instead - * @brief Metric to get a std::vector of device used memory, String value is METRIC_VPU_HDDL_DEVICE_MEMORY_USED - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_MEMORY_USED instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_MEMORY_USED, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_UTILIZATION instead - * @brief Metric to get a std::vector of device utilization, String value is METRIC_VPU_HDDL_DEVICE_UTILIZATION - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_UTILIZATION instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_UTILIZATION, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_STREAM_ID instead - * @brief Metric to get a std::vector of stream ids, String value is METRIC_VPU_HDDL_DEVICE_STREAM_ID - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_STREAM_ID instead") -DECLARE_VPU_HDDL_METRIC(STREAM_ID, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_TAG instead - * @brief Metric to get a std::vector of device tags, String value is METRIC_VPU_HDDL_DEVICE_TAG - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_TAG instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_TAG, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_GROUP_ID instead - * @brief Metric to get a std::vector of group ids, String value is METRIC_VPU_HDDL_GROUP_ID - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_GROUP_ID instead") -DECLARE_VPU_HDDL_METRIC(GROUP_ID, std::vector); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_GROUP_USING_NUM instead - * @brief Metric to get a int number of device be using for group, String value is - * METRIC_VPU_HDDL_DEVICE_GROUP_USING_NUM - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_GROUP_USING_NUM instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_GROUP_USING_NUM, int); - -/** - * @deprecated Use InferenceEngine::METRIC_HDDL_DEVICE_TOTAL_NUM instead - * @brief Metric to get a int number of total device, String value is METRIC_VPU_HDDL_DEVICE_TOTAL_NUM - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::METRIC_HDDL_DEVICE_TOTAL_NUM instead") -DECLARE_VPU_HDDL_METRIC(DEVICE_TOTAL_NUM, int); - -} // namespace Metrics - -namespace VPUConfigParams { - -/** - * @deprecated Use InferenceEngine::HDDL_GRAPH_TAG instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; - * This option allows to specify the number of MYX devices used for inference a specific Executable network. - * Note: Only one network would be allocated to one device. - * The number of devices for the tag is specified in the hddl_service.config file. - * Example: - * "service_settings": - * { - * "graph_tag_map": - * { - * "tagA":3 - * } - * } - * It means that an executable network marked with tagA will be executed on 3 devices - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_GRAPH_TAG instead") -DECLARE_VPU_HDDL_CONFIG_KEY(GRAPH_TAG); - -/** - * @deprecated Use InferenceEngine::HDDL_STREAM_ID instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; - * This config makes the executable networks to be allocated on one certain device (instead of multiple devices). - * And all inference through this executable network, will be done on this device. - * Note: Only one network would be allocated to one device. - * The number of devices which will be used for stream-affinity must be specified in hddl_service.config file. - * Example: - * "service_settings": - * { - * "stream_device_number":5 - * } - * It means that 5 device will be used for stream-affinity - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_STREAM_ID instead") -DECLARE_VPU_HDDL_CONFIG_KEY(STREAM_ID); - -/** - * @deprecated Use InferenceEngine::HDDL_DEVICE_TAG instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; - * This config allows user to control device flexibly. This config gives a "tag" for a certain device while - * allocating a network to it. Afterward, user can allocating/deallocating networks to this device with this "tag". - * Devices used for such use case is controlled by a so-called "Bypass Scheduler" in HDDL backend, and the number - * of such device need to be specified in hddl_service.config file. - * Example: - * "service_settings": - * { - * "bypass_device_number": 5 - * } - * It means that 5 device will be used for Bypass scheduler. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_DEVICE_TAG instead") -DECLARE_VPU_HDDL_CONFIG_KEY(DEVICE_TAG); - -/** - * @deprecated Use InferenceEngine::HDDL_BIND_DEVICE instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: "YES/NO", default is "NO". - * This config is a sub-config of DEVICE_TAG, and only available when "DEVICE_TAG" is set. After a user load a - * network, the user got a handle for the network. - * If "YES", the network allocated is bind to the device (with the specified "DEVICE_TAG"), which means all afterwards - * inference through this network handle will be executed on this device only. - * If "NO", the network allocated is not bind to the device (with the specified "DEVICE_TAG"). If the same network - * is allocated on multiple other devices (also set BIND_DEVICE to "False"), then inference through any handle of these - * networks may be executed on any of these devices those have the network loaded. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_BIND_DEVICE instead") -DECLARE_VPU_HDDL_CONFIG_KEY(BIND_DEVICE); - -/** - * @deprecated Use InferenceEngine::HDDL_RUNTIME_PRIORITY instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: A signed int wrapped in a string, default is "0". - * This config is a sub-config of DEVICE_TAG, and only available when "DEVICE_TAG" is set and "BIND_DEVICE" is "False". - * When there are multiple devices running a certain network (a same network running on multiple devices in Bypass - * Scheduler), the device with a larger number has a higher priority, and more inference tasks will be fed to it with - * priority. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_RUNTIME_PRIORITY instead") -DECLARE_VPU_HDDL_CONFIG_KEY(RUNTIME_PRIORITY); - -/** - * @deprecated Use InferenceEngine::HDDL_USE_SGAD instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: "YES/NO", default is "NO". - * SGAD is short for "Single Graph All Device". With this scheduler, once application allocates 1 network, all devices - * (managed by SGAD scheduler) will be loaded with this graph. The number of network that can be loaded to one device - * can exceed one. Once application deallocates 1 network from device, all devices will unload the network from them. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_USE_SGAD instead") -DECLARE_VPU_HDDL_CONFIG_KEY(USE_SGAD); - -/** - * @deprecated Use InferenceEngine::HDDL_GROUP_DEVICE instead - * @brief [Only for OpenVINO Intel HDDL device] - * Type: A signed int wrapped in a string, default is "0". - * This config gives a "group id" for a certain device when this device has been reserved for certain client, client - * can use this device grouped by calling this group id while other client can't use this device - * Each device has their own group id. Device in one group shares same group id. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::HDDL_GROUP_DEVICE instead") -DECLARE_VPU_HDDL_CONFIG_KEY(GROUP_DEVICE); - -} // namespace VPUConfigParams - -} // namespace InferenceEngine diff --git a/src/inference/include/ie/vpu/myriad_plugin_config.hpp b/src/inference/include/ie/vpu/myriad_plugin_config.hpp deleted file mode 100644 index 02bac4dba1b..00000000000 --- a/src/inference/include/ie/vpu/myriad_plugin_config.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2018-2022 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -/** - * @deprecated Use vpu/myriad_config.hpp instead. - * @brief A header that defines advanced related properties for VPU plugins. - * These properties should be used in SetConfig() and LoadNetwork() methods of plugins - * - * @file myriad_plugin_config.hpp - */ - -#pragma once - -#include "ie_api.h" -#include "ie_plugin_config.hpp" - -/** - * @def VPU_MYRIAD_CONFIG_KEY(name) - * @brief Shortcut for defining VPU MYRIAD configuration key - */ -#define VPU_MYRIAD_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_MYRIAD_##name) -/** - * @def VPU_MYRIAD_CONFIG_VALUE(name) - * @brief Shortcut for defining VPU MYRIAD configuration value - */ -#define VPU_MYRIAD_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_MYRIAD_##name - -#define DECLARE_VPU_MYRIAD_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_MYRIAD_##name) -#define DECLARE_VPU_MYRIAD_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_MYRIAD_##name) - -namespace InferenceEngine { - -namespace VPUConfigParams { - -/** - * @deprecated Use InferenceEngine::MYRIAD_ENABLE_FORCE_RESET instead. - * @brief The flag to reset stalled devices: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default) - * This is a plugin scope option and must be used with the plugin's SetConfig method - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_ENABLE_FORCE_RESET instead") -DECLARE_VPU_MYRIAD_CONFIG_KEY(FORCE_RESET); - -/** - * @deprecated Use InferenceEngine::MYRIAD_DDR_TYPE instead - * @brief This option allows to specify device memory type. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_TYPE instead") -DECLARE_VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE); - -/** - * @deprecated Use DDR type values from InferenceEngine namespace with MYRIAD_DDR_ prefix - * @brief Supported keys definition for VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE) option. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_AUTO instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO); -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_MICRON_2GB instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(MICRON_2GB); -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_SAMSUNG_2GB instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(SAMSUNG_2GB); -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_HYNIX_2GB instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(HYNIX_2GB); -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_DDR_MICRON_1GB instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(MICRON_1GB); - -} // namespace VPUConfigParams - -} // namespace InferenceEngine diff --git a/src/inference/include/ie/vpu/vpu_plugin_config.hpp b/src/inference/include/ie/vpu/vpu_plugin_config.hpp deleted file mode 100644 index c2c2fd5f5da..00000000000 --- a/src/inference/include/ie/vpu/vpu_plugin_config.hpp +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2018-2022 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -/** - * @deprecated Use vpu/myriad_config.hpp or vpu/hddl_config.hpp instead. - * @brief A header that defines advanced related properties for VPU plugins. - * These properties should be used in SetConfig() and LoadNetwork() methods of plugins - * - * @file vpu_plugin_config.hpp - */ - -#pragma once - -#include "ie_api.h" -#include "vpu/hddl_plugin_config.hpp" -#include "vpu/myriad_plugin_config.hpp" - -// -// Common options -// - -#define VPU_CONFIG_KEY(name) InferenceEngine::VPUConfigParams::_CONFIG_KEY(VPU_##name) -#define VPU_CONFIG_VALUE(name) InferenceEngine::VPUConfigParams::VPU_##name - -#define DECLARE_VPU_CONFIG_KEY(name) DECLARE_CONFIG_KEY(VPU_##name) -#define DECLARE_VPU_CONFIG_VALUE(name) DECLARE_CONFIG_VALUE(VPU_##name) - -// -// Common metrics -// - -#define VPU_METRIC(name) METRIC_KEY(VPU_##name) -#define DECLARE_VPU_METRIC(name, ...) DECLARE_METRIC_KEY(VPU_##name, __VA_ARGS__) - -namespace InferenceEngine { - -/** - * @brief VPU plugin configuration - */ -namespace VPUConfigParams { - -// -// Common options -// - -/** - * @deprecated Use InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION instead. - * @brief Turn on HW stages usage (applicable for MyriadX devices only). - * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default) - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION instead") -DECLARE_VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION); - -/** - * @deprecated Use CONFIG_KEY(LOG_LEVEL) instead. - * @brief The key to define log level - */ -INFERENCE_ENGINE_DEPRECATED("Use CONFIG_KEY(LOG_LEVEL) instead") -DECLARE_VPU_CONFIG_KEY(LOG_LEVEL); - -/** - * @deprecated Use InferenceEngine::MYRIAD_ENABLE_RECEIVING_TENSOR_TIME instead. - * @brief The flag for adding to the profiling information the time of obtaining a tensor. - * This option should be used with values: CONFIG_VALUE(YES) or CONFIG_VALUE(NO) (default) - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_ENABLE_RECEIVING_TENSOR_TIME instead") -DECLARE_VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME); - -/** - * @deprecated Use InputInfo::setLayout on input data from CNNNetwork::getInputsInfo() or - * Data::setLayout on output data from CNNNetwork::getOutputsInfo() - * @brief This option allows to to specify input output layouts for network layers. - * By default, this value set to VPU_CONFIG_VALUE(AUTO) value. - * Supported values: - * VPU_CONFIG_VALUE(AUTO) executable network configured to use optimal layer layout depending on available HW - * VPU_CONFIG_VALUE(NCHW) executable network forced to use NCHW input/output layouts - * VPU_CONFIG_VALUE(NHWC) executable network forced to use NHWC input/output layouts - */ -INFERENCE_ENGINE_DEPRECATED("Use InputInfo::setLayout on input data from CNNNetwork::getInputsInfo() or" - "Data::setLayout on output data from CNNNetwork::getOutputsInfo()") -DECLARE_VPU_CONFIG_KEY(COMPUTE_LAYOUT); - -/** - * @deprecated See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info. - * @brief Supported keys definition for VPU_CONFIG_KEY(COMPUTE_LAYOUT) option. - */ -INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info") -DECLARE_VPU_CONFIG_VALUE(AUTO); -INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info") -DECLARE_VPU_CONFIG_VALUE(NCHW); -INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info") -DECLARE_VPU_CONFIG_VALUE(NHWC); -INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info") -DECLARE_VPU_CONFIG_VALUE(NCDHW); -INFERENCE_ENGINE_DEPRECATED("See VPU_CONFIG_KEY(COMPUTE_LAYOUT) deprecation info") -DECLARE_VPU_CONFIG_VALUE(NDHWC); - -/** - * @deprecated Use InferenceEngine::MYRIAD_CUSTOM_LAYERS instead. - * @brief This option allows to pass custom layers binding xml. - * If layer is present in such an xml, it would be used during inference even if the layer is natively supported - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_CUSTOM_LAYERS instead") -DECLARE_VPU_CONFIG_KEY(CUSTOM_LAYERS); - -/** - * @deprecated Use InferenceEngine::MYRIAD_PROTOCOL instead. - * @brief This option allows to specify protocol. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_PROTOCOL instead") -DECLARE_VPU_MYRIAD_CONFIG_KEY(PROTOCOL); - -/** - * @deprecated Use InferenceEngine::MYRIAD_PCIE or InferenceEngine::MYRIAD_USB instead. - * @brief Supported keys definition for VPU_MYRIAD_CONFIG_KEY(PROTOCOL) option. - */ -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_PCIE instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(PCIE); -INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::MYRIAD_USB instead") -DECLARE_VPU_MYRIAD_CONFIG_VALUE(USB); - -} // namespace VPUConfigParams - -} // namespace InferenceEngine diff --git a/src/inference/include/openvino/runtime/intel_myriad/hddl_properties.hpp b/src/inference/include/openvino/runtime/intel_myriad/hddl_properties.hpp new file mode 100644 index 00000000000..73964c8a120 --- /dev/null +++ b/src/inference/include/openvino/runtime/intel_myriad/hddl_properties.hpp @@ -0,0 +1,174 @@ +// Copyright (C) 2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +namespace ov { +namespace intel_myriad { +namespace hddl { +// RO properties +/** + * @brief Property to get a int of the device number + */ +static constexpr Property device_num{"HDDL_DEVICE_NUM"}; + +/** + * @brief Property to get a std::vector of device names + */ +static constexpr Property, PropertyMutability::RO> device_name{"HDDL_DEVICE_NAME"}; + +/** + * @brief Property to get a std::vector of device thermal + */ +static constexpr Property, PropertyMutability::RO> device_thermal{"HDDL_DEVICE_THERMAL"}; + +/** + * @brief Property to get a std::vector of device ids + */ +static constexpr Property, PropertyMutability::RO> device_id{"HDDL_DEVICE_ID"}; + +/** + * @brief Property to get a std::vector of device subclasses + */ +static constexpr Property, PropertyMutability::RO> device_subclass{"HDDL_DEVICE_SUBCLASS"}; + +/** + * @brief Property to get a std::vector of device total memory + */ +static constexpr Property, PropertyMutability::RO> device_memory_total{ + "HDDL_DEVICE_MEMORY_TOTAL"}; + +/** + * @brief Property to get a std::vector of device used memory + */ +static constexpr Property, PropertyMutability::RO> device_memory_used{ + "HDDL_DEVICE_MEMORY_USED"}; + +/** + * @brief Property to get a std::vector of device utilization + */ +static constexpr Property, PropertyMutability::RO> device_utilization{"HDDL_DEVICE_UTILIZATION"}; + +/** + * @brief Property to get a std::vector of stream ids + */ +static constexpr Property, PropertyMutability::RO> stream_id{"HDDL_STREAM_ID"}; + +/** + * @brief Property to get a std::vector of device tags + */ +static constexpr Property, PropertyMutability::RO> device_tag{"HDDL_DEVICE_TAG"}; + +/** + * @brief Property to get a std::vector of group ids + */ +static constexpr Property, PropertyMutability::RO> group_id{"HDDL_GROUP_ID"}; + +/** + * @brief Property to get a int number of device be using for group + */ +static constexpr Property device_group_using_num{"HDDL_DEVICE_GROUP_USING_NUM"}; + +/** + * @brief Property to get a int number of total device + */ +static constexpr Property device_total_num{"HDDL_DEVICE_TOTAL_NUM"}; + +// RW properties + +/** + * @brief [Only for HDDLPlugin] + * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; + * This option allows to specify the number of MYX devices used for inference a specific Executable network. + * Note: Only one network would be allocated to one device. + * The number of devices for the tag is specified in the hddl_service.config file. + * Example: + * "service_settings": + * { + * "graph_tag_map": + * { + * "tagA":3 + * } + * } + * It means that an executable network marked with tagA will be executed on 3 devices + */ +static constexpr Property graph_tag{"HDDL_GRAPH_TAG"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; + * This config makes the executable networks to be allocated on one certain device (instead of multiple devices). + * And all inference through this executable network, will be done on this device. + * Note: Only one network would be allocated to one device. + * The number of devices which will be used for stream-affinity must be specified in hddl_service.config file. + * Example: + * "service_settings": + * { + * "stream_device_number":5 + * } + * It means that 5 device will be used for stream-affinity + */ +static constexpr Property set_stream_id{"HDDL_SET_STREAM_ID"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: Arbitrary non-empty string. If empty (""), equals no set, default: ""; + * This config allows user to control device flexibly. This config gives a "tag" for a certain device while + * allocating a network to it. Afterward, user can allocating/deallocating networks to this device with this "tag". + * Devices used for such use case is controlled by a so-called "Bypass Scheduler" in HDDL backend, and the number + * of such device need to be specified in hddl_service.config file. + * Example: + * "service_settings": + * { + * "bypass_device_number": 5 + * } + * It means that 5 device will be used for Bypass scheduler. + */ +static constexpr Property set_device_tag{"HDDL_SET_DEVICE_TAG"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: "bool", default is "false". + * This config is a sub-config of DEVICE_TAG, and only available when "DEVICE_TAG" is set. After a user load a + * network, the user got a handle for the network. + * If "YES", the network allocated is bind to the device (with the specified "DEVICE_TAG"), which means all afterwards + * inference through this network handle will be executed on this device only. + * If "NO", the network allocated is not bind to the device (with the specified "DEVICE_TAG"). If the same network + * is allocated on multiple other devices (also set BIND_DEVICE to "False"), then inference through any handle of these + * networks may be executed on any of these devices those have the network loaded. + */ +static constexpr Property bind_device{"HDDL_BIND_DEVICE"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: A signed int wrapped in a string, default is "0". + * This config is a sub-config of DEVICE_TAG, and only available when "DEVICE_TAG" is set and "BIND_DEVICE" is "False". + * When there are multiple devices running a certain network (a same network running on multiple devices in Bypass + * Scheduler), the device with a larger number has a higher priority, and more inference tasks will be fed to it with + * priority. + */ +static constexpr Property runtime_priority{"HDDL_RUNTIME_PRIORITY"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: "bool", default is "false". + * SGAD is short for "Single Graph All Device". With this scheduler, once application allocates 1 network, all devices + * (managed by SGAD scheduler) will be loaded with this graph. The number of network that can be loaded to one device + * can exceed one. Once application deallocates 1 network from device, all devices will unload the network from them. + */ +static constexpr Property use_sgad{"HDDL_USE_SGAD"}; + +/** + * @brief [Only for HDDLPlugin] + * Type: A signed int wrapped in a string, default is "0". + * This config gives a "group id" for a certain device when this device has been reserved for certain client, client + * can use this device grouped by calling this group id while other client can't use this device + * Each device has their own group id. Device in one group shares same group id. + */ +static constexpr Property group_device{"HDDL_GROUP_DEVICE"}; +} // namespace hddl +} // namespace intel_myriad +}; // namespace ov diff --git a/src/inference/include/openvino/runtime/intel_myriad/myriad_properties.hpp b/src/inference/include/openvino/runtime/intel_myriad/myriad_properties.hpp new file mode 100644 index 00000000000..0d9adc71956 --- /dev/null +++ b/src/inference/include/openvino/runtime/intel_myriad/myriad_properties.hpp @@ -0,0 +1,129 @@ +// Copyright (C) 2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +namespace ov { +namespace intel_myriad { +/** + * @brief Turn on HW stages usage (applicable for MyriadX devices only). + */ +static constexpr Property enable_hw_acceleration{"MYRIAD_ENABLE_HW_ACCELERATION"}; + +/** + * @brief The flag for adding to the profiling information the time of obtaining a tensor. + */ +static constexpr Property enable_receiving_tensor_time{ + "MYRIAD_ENABLE_RECEIVING_TENSOR_TIME"}; + +/** + * @brief This option allows to pass custom layers binding xml. + * If layer is present in such an xml, it would be used during inference even if the layer is natively supported + */ +static constexpr Property custom_layers{"MYRIAD_CUSTOM_LAYERS"}; + +/** + * @brief Enum to define possible device protocols + */ +enum class Protocol { + PCIE = 0, //!< Will use a device with PCIE protocol + USB = 1, //!< Will use a device with USB protocol +}; + +/** @cond INTERNAL */ +inline std::ostream& operator<<(std::ostream& os, const Protocol& protocol) { + switch (protocol) { + case Protocol::PCIE: + return os << "MYRIAD_PCIE"; + case Protocol::USB: + return os << "MYRIAD_USB"; + default: + throw ov::Exception{"Unsupported myriad protocol"}; + } +}; +inline std::istream& operator>>(std::istream& is, Protocol& protocol) { + std::string str; + is >> str; + if (str == "MYRIAD_PCIE") { + protocol = Protocol::PCIE; + } else if (str == "MYRIAD_USB") { + protocol = Protocol::USB; + } else { + throw ov::Exception{"Unsupported myriad protocol: " + str}; + } + return is; +}; +/** @endcond */ + +// Myriad specific properties + +/** + * @brief This option allows to specify protocol. + */ +static constexpr Property protocol{"MYRIAD_PROTOCOL"}; + +/** + * @brief The flag to reset stalled devices. + */ +static constexpr Property enable_force_reset{"MYRIAD_ENABLE_FORCE_RESET"}; + +/** + * @brief Enum to define possible device mymory types + */ +enum class DDRType { + MYRIAD_DDR_AUTO = 0, //!< Automatic setting of DDR memory type + MYRIAD_DDR_MICRON_2GB = 1, //!< Using a device with MICRON_2GB DDR memory type + MYRIAD_DDR_SAMSUNG_2GB = 2, //!< Using a device with SAMSUNG_2GB DDR memory type + MYRIAD_DDR_HYNIX_2GB = 3, //!< Using a device with HYNIX_2GB DDR memory type + MYRIAD_DDR_MICRON_1GB = 4, //!< Using a device with MICRON_1GB DDR memory type +}; + +/** @cond INTERNAL */ +inline std::ostream& operator<<(std::ostream& os, const DDRType& ddrType) { + switch (ddrType) { + case DDRType::MYRIAD_DDR_AUTO: + return os << "MYRIAD_DDR_AUTO"; + case DDRType::MYRIAD_DDR_MICRON_2GB: + return os << "MYRIAD_DDR_MICRON_2GB"; + case DDRType::MYRIAD_DDR_SAMSUNG_2GB: + return os << "MYRIAD_DDR_SAMSUNG_2GB"; + case DDRType::MYRIAD_DDR_HYNIX_2GB: + return os << "MYRIAD_DDR_HYNIX_2GB"; + case DDRType::MYRIAD_DDR_MICRON_1GB: + return os << "MYRIAD_DDR_MICRON_1GB"; + default: + throw ov::Exception{"Unsupported myriad ddr type"}; + } +}; + +inline std::istream& operator>>(std::istream& is, DDRType& ddrType) { + std::string str; + is >> str; + if (str == "MYRIAD_DDR_AUTO") { + ddrType = DDRType::MYRIAD_DDR_AUTO; + } else if (str == "MYRIAD_DDR_MICRON_2GB") { + ddrType = DDRType::MYRIAD_DDR_MICRON_2GB; + } else if (str == "MYRIAD_DDR_SAMSUNG_2GB") { + ddrType = DDRType::MYRIAD_DDR_SAMSUNG_2GB; + } else if (str == "MYRIAD_DDR_HYNIX_2GB") { + ddrType = DDRType::MYRIAD_DDR_HYNIX_2GB; + } else if (str == "MYRIAD_DDR_MICRON_1GB") { + ddrType = DDRType::MYRIAD_DDR_MICRON_1GB; + } else { + throw ov::Exception{"Unsupported myriad protocol: " + str}; + } + return is; +}; +/** @endcond */ + +/** + * @brief This option allows to specify device memory type. + */ + +static constexpr Property ddr_type{"MYRIAD_DDR_TYPE"}; +} // namespace intel_myriad +}; // namespace ov diff --git a/src/plugins/intel_myriad/common/include/vpu/configuration/options/ov_throughput_streams.hpp b/src/plugins/intel_myriad/common/include/vpu/configuration/options/ov_throughput_streams.hpp new file mode 100644 index 00000000000..1f91c23226c --- /dev/null +++ b/src/plugins/intel_myriad/common/include/vpu/configuration/options/ov_throughput_streams.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2018-2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include "vpu/configuration/as_parameter_enabler.hpp" +#include "vpu/utils/optional.hpp" +#include "openvino/runtime/properties.hpp" + +namespace vpu { + +namespace details { + +enum class Access; +enum class Category; + +} // namespace details + +class PluginConfiguration; + +struct OvThroughputStreamsOption : public AsParameterEnabler { + using value_type = Optional; + + static std::string key(); + static void validate(const std::string&); + static void validate(const PluginConfiguration&); + static std::string defaultValue(); + static value_type parse(const std::string&); + static details::Access access(); + static details::Category category(); +}; + +} // namespace vpu diff --git a/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint.hpp b/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint.hpp index e09fc2012ff..c2c415390fb 100644 --- a/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint.hpp +++ b/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint.hpp @@ -7,6 +7,7 @@ #include #include "vpu/configuration/as_parameter_enabler.hpp" +#include "openvino/runtime/properties.hpp" namespace vpu { diff --git a/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint_num_requests.hpp b/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint_num_requests.hpp index 78bdabf431d..ac5c45a9981 100644 --- a/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint_num_requests.hpp +++ b/src/plugins/intel_myriad/common/include/vpu/configuration/options/performance_hint_num_requests.hpp @@ -8,6 +8,7 @@ #include #include "vpu/configuration/as_parameter_enabler.hpp" +#include "openvino/runtime/properties.hpp" namespace vpu { diff --git a/src/plugins/intel_myriad/common/include/vpu/private_plugin_config.hpp b/src/plugins/intel_myriad/common/include/vpu/private_plugin_config.hpp index 4e93276eae4..0fbfcc8457d 100644 --- a/src/plugins/intel_myriad/common/include/vpu/private_plugin_config.hpp +++ b/src/plugins/intel_myriad/common/include/vpu/private_plugin_config.hpp @@ -7,7 +7,6 @@ #include #include -#include namespace InferenceEngine { @@ -150,13 +149,4 @@ DECLARE_VPU_CONFIG(MYRIAD_DEVICE_CONNECT_TIMEOUT); DECLARE_VPU_CONFIG(MYRIAD_ENABLE_ASYNC_DMA); -namespace VPUConfigParams { - -IE_SUPPRESS_DEPRECATED_START -// Used to update API usage in the dependent repos. -DECLARE_VPU_CONFIG_KEY(DETECT_NETWORK_BATCH); -IE_SUPPRESS_DEPRECATED_END - -} // namespace VPUConfigParams - } // namespace InferenceEngine diff --git a/src/plugins/intel_myriad/common/src/configuration/options/memory_type.cpp b/src/plugins/intel_myriad/common/src/configuration/options/memory_type.cpp index fe8e980cefb..5723e3f8491 100644 --- a/src/plugins/intel_myriad/common/src/configuration/options/memory_type.cpp +++ b/src/plugins/intel_myriad/common/src/configuration/options/memory_type.cpp @@ -8,7 +8,6 @@ #include "vpu/configuration/plugin_configuration.hpp" #include -#include #include @@ -17,22 +16,13 @@ namespace vpu { namespace { const std::unordered_map& string2type() { -IE_SUPPRESS_DEPRECATED_START static const std::unordered_map converters = { {InferenceEngine::MYRIAD_DDR_AUTO, MovidiusDdrType::AUTO }, {InferenceEngine::MYRIAD_DDR_MICRON_2GB, MovidiusDdrType::MICRON_2GB }, {InferenceEngine::MYRIAD_DDR_SAMSUNG_2GB, MovidiusDdrType::SAMSUNG_2GB }, {InferenceEngine::MYRIAD_DDR_HYNIX_2GB, MovidiusDdrType::HYNIX_2GB }, {InferenceEngine::MYRIAD_DDR_MICRON_1GB, MovidiusDdrType::MICRON_1GB }, - - // Deprecated - {VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO), MovidiusDdrType::AUTO }, - {VPU_MYRIAD_CONFIG_VALUE(MICRON_2GB), MovidiusDdrType::MICRON_2GB }, - {VPU_MYRIAD_CONFIG_VALUE(SAMSUNG_2GB), MovidiusDdrType::SAMSUNG_2GB }, - {VPU_MYRIAD_CONFIG_VALUE(HYNIX_2GB), MovidiusDdrType::HYNIX_2GB }, - {VPU_MYRIAD_CONFIG_VALUE(MICRON_1GB), MovidiusDdrType::MICRON_1GB } }; -IE_SUPPRESS_DEPRECATED_END return converters; } diff --git a/src/plugins/intel_myriad/common/src/configuration/options/ov_throughput_streams.cpp b/src/plugins/intel_myriad/common/src/configuration/options/ov_throughput_streams.cpp new file mode 100644 index 00000000000..67f9d6f1c4b --- /dev/null +++ b/src/plugins/intel_myriad/common/src/configuration/options/ov_throughput_streams.cpp @@ -0,0 +1,70 @@ +// Copyright (C) 2018-2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "vpu/utils/containers.hpp" +#include "vpu/configuration/options/ov_throughput_streams.hpp" +#include "vpu/configuration/plugin_configuration.hpp" +#include "vpu/utils/error.hpp" +#include +#include +#include + +namespace vpu { + +void OvThroughputStreamsOption::validate(const std::string& value) { + if (value == defaultValue()) { + return; + } + + int intValue; + try { + intValue = std::stoi(value); + } catch (const std::exception& e) { + VPU_THROW_FORMAT(R"(unexpected {} option value "{}", must be a number)", key(), value); + } + + VPU_THROW_UNLESS(intValue >= 0, + R"(unexpected {} option value "{}", only not negative numbers are supported)", key(), value); +} + +void OvThroughputStreamsOption::validate(const PluginConfiguration& configuration) { + validate(configuration[key()]); +} + +std::string OvThroughputStreamsOption::key() { + return ov::streams::num.name(); +} + +details::Access OvThroughputStreamsOption::access() { + return details::Access::Public; +} + +details::Category OvThroughputStreamsOption::category() { + return details::Category::CompileTime; +} + +std::string OvThroughputStreamsOption::defaultValue() { + std::stringstream ss; + ss << ov::streams::AUTO; + return ss.str(); +} + +OvThroughputStreamsOption::value_type OvThroughputStreamsOption::parse(const std::string& value) { + if (value == defaultValue()) { + return OvThroughputStreamsOption::value_type(); + } + + int intValue; + try { + intValue = std::stoi(value); + } catch (const std::exception& e) { + VPU_THROW_FORMAT(R"(unexpected {} option value "{}", must be a number)", key(), value); + } + + VPU_THROW_UNSUPPORTED_OPTION_UNLESS(intValue >= 0, + R"(unexpected {} option value "{}", only not negative numbers are supported)", key(), value); + return intValue; +} + +} // namespace vpu diff --git a/src/plugins/intel_myriad/common/src/configuration/options/performance_hint.cpp b/src/plugins/intel_myriad/common/src/configuration/options/performance_hint.cpp index ca67025ba34..210bc55de85 100644 --- a/src/plugins/intel_myriad/common/src/configuration/options/performance_hint.cpp +++ b/src/plugins/intel_myriad/common/src/configuration/options/performance_hint.cpp @@ -7,6 +7,8 @@ #include "vpu/utils/containers.hpp" #include "vpu/configuration/plugin_configuration.hpp" #include +#include +#include namespace vpu { @@ -17,7 +19,7 @@ void PerformanceHintOption::validate(const PluginConfiguration& configuration) { } std::string PerformanceHintOption::key() { - return CONFIG_KEY(PERFORMANCE_HINT); + return ov::hint::performance_mode.name(); } details::Access PerformanceHintOption::access() { @@ -33,7 +35,16 @@ std::string PerformanceHintOption::defaultValue() { } PerformanceHintOption::value_type PerformanceHintOption::parse(const std::string& value) { - if (value == CONFIG_VALUE(LATENCY) || value == CONFIG_VALUE(THROUGHPUT) || value == "") { + std::string latencyValue; + std::string throughputValue; + std::stringstream tmp; + tmp << ov::hint::PerformanceMode::LATENCY; + latencyValue = tmp.str(); + tmp.clear(); + tmp << ov::hint::PerformanceMode::THROUGHPUT; + throughputValue = tmp.str(); + + if (value == latencyValue || value == throughputValue || value == "") { return value; } else { VPU_THROW_EXCEPTION << "Wrong value for property key " << CONFIG_KEY(PERFORMANCE_HINT) << ". Expected only " diff --git a/src/plugins/intel_myriad/common/src/configuration/options/performance_hint_num_requests.cpp b/src/plugins/intel_myriad/common/src/configuration/options/performance_hint_num_requests.cpp index 27f67461228..c13fe7dda89 100644 --- a/src/plugins/intel_myriad/common/src/configuration/options/performance_hint_num_requests.cpp +++ b/src/plugins/intel_myriad/common/src/configuration/options/performance_hint_num_requests.cpp @@ -8,6 +8,7 @@ #include "vpu/configuration/plugin_configuration.hpp" #include "vpu/utils/error.hpp" #include +#include #include namespace vpu { @@ -19,7 +20,7 @@ void PerformanceHintNumRequestsOption::validate(const PluginConfiguration& confi } std::string PerformanceHintNumRequestsOption::key() { - return CONFIG_KEY(PERFORMANCE_HINT_NUM_REQUESTS); + return ov::hint::num_requests.name(); } details::Access PerformanceHintNumRequestsOption::access() { @@ -31,20 +32,19 @@ details::Category PerformanceHintNumRequestsOption::category() { } std::string PerformanceHintNumRequestsOption::defaultValue() { - return "-1"; + return "0"; } PerformanceHintNumRequestsOption::value_type PerformanceHintNumRequestsOption::parse(const std::string& value) { try { auto returnValue = std::stoi(value); - if (returnValue > 0 || returnValue == -1) { + if (returnValue >= 0) { return returnValue; } else { throw std::logic_error("wrong val"); } } catch (...) { - VPU_THROW_EXCEPTION << "Wrong value of " << value << " for property key " - << CONFIG_VALUE(KEY_PERFORMANCE_HINT_NUM_REQUESTS) + VPU_THROW_EXCEPTION << "Wrong value of " << value << " for property key " << ov::hint::num_requests.name() << ". Expected only positive integer numbers"; } } diff --git a/src/plugins/intel_myriad/graph_transformer/src/configuration/options/protocol.cpp b/src/plugins/intel_myriad/graph_transformer/src/configuration/options/protocol.cpp index fe58493293b..2d2ee98845d 100644 --- a/src/plugins/intel_myriad/graph_transformer/src/configuration/options/protocol.cpp +++ b/src/plugins/intel_myriad/graph_transformer/src/configuration/options/protocol.cpp @@ -7,7 +7,6 @@ #include "vpu/configuration/plugin_configuration.hpp" #include -#include #include @@ -16,17 +15,11 @@ namespace vpu { namespace { const std::unordered_map& string2protocol() { -IE_SUPPRESS_DEPRECATED_START static const std::unordered_map converters = { {InferenceEngine::MYRIAD_USB, ncDeviceProtocol_t::NC_USB}, {InferenceEngine::MYRIAD_PCIE, ncDeviceProtocol_t::NC_PCIE}, {std::string(), ncDeviceProtocol_t::NC_ANY_PROTOCOL}, - - // Deprecated - {VPU_MYRIAD_CONFIG_VALUE(USB), ncDeviceProtocol_t::NC_USB}, - {VPU_MYRIAD_CONFIG_VALUE(PCIE), ncDeviceProtocol_t::NC_PCIE} }; -IE_SUPPRESS_DEPRECATED_END return converters; } diff --git a/src/plugins/intel_myriad/graph_transformer/src/frontend/frontend.cpp b/src/plugins/intel_myriad/graph_transformer/src/frontend/frontend.cpp index f71a9b00f41..ca92bb3d221 100644 --- a/src/plugins/intel_myriad/graph_transformer/src/frontend/frontend.cpp +++ b/src/plugins/intel_myriad/graph_transformer/src/frontend/frontend.cpp @@ -53,9 +53,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/plugins/intel_myriad/graph_transformer/src/graph_transformer.cpp b/src/plugins/intel_myriad/graph_transformer/src/graph_transformer.cpp index e1188ca0602..84547d54020 100644 --- a/src/plugins/intel_myriad/graph_transformer/src/graph_transformer.cpp +++ b/src/plugins/intel_myriad/graph_transformer/src/graph_transformer.cpp @@ -52,6 +52,7 @@ #include #include #include +#include namespace vpu { @@ -92,6 +93,8 @@ void CompileEnv::init(const PluginConfiguration& config, const Logger::Ptr& log) int numExecutors = 0; if (config.get().hasValue()) { numExecutors = config.get().get(); + } else if (config.get().hasValue()) { + numExecutors = config.get().get(); } else if (!config.get().empty()) { numExecutors = config.get() == CONFIG_VALUE(LATENCY) ? 1 : 2; } diff --git a/src/plugins/intel_myriad/graph_transformer/src/stages/permute.cpp b/src/plugins/intel_myriad/graph_transformer/src/stages/permute.cpp index a1ecffc29d4..3b60c6efdfb 100644 --- a/src/plugins/intel_myriad/graph_transformer/src/stages/permute.cpp +++ b/src/plugins/intel_myriad/graph_transformer/src/stages/permute.cpp @@ -118,24 +118,21 @@ Stage StageBuilder::addPermuteStage( return stage; } -Stage StageBuilder::addReorderStage( - const Model& model, - const std::string& name, - const ie::CNNLayerPtr& layer, - const Data& input, - const Data& output) { +Stage StageBuilder::addReorderStage(const Model& model, + const std::string& name, + const ie::CNNLayerPtr& layer, + const Data& input, + const Data& output) { const auto* env = CompileEnv::getOrNull(); - VPU_THROW_UNLESS( - env == nullptr || !env->config.get(), - "Tried to add Reorder Stage %v, while DISABLE_REORDER option was set", - name); - + VPU_THROW_UNLESS(env == nullptr || !env->config.get(), + "Tried to add Reorder Stage %v, while DISABLE_REORDER option was set", + name); for (const auto& p : input->desc().dims()) { IE_ASSERT(p.second == output->desc().dim(p.first)); } PermutationDimsMap permutationMap; - for (const auto & dim : output->desc().dimsOrder().toPermutation()) { + for (const auto& dim : output->desc().dimsOrder().toPermutation()) { permutationMap.set(dim, dim); } diff --git a/src/plugins/intel_myriad/myriad_plugin/myriad_executable_network.cpp b/src/plugins/intel_myriad/myriad_plugin/myriad_executable_network.cpp index c55bde67276..0a6fb858b06 100644 --- a/src/plugins/intel_myriad/myriad_plugin/myriad_executable_network.cpp +++ b/src/plugins/intel_myriad/myriad_plugin/myriad_executable_network.cpp @@ -20,6 +20,7 @@ #include #include #include "vpu/configuration/options/performance_hint_num_requests.hpp" +#include #include #include #include @@ -64,6 +65,8 @@ void ExecutableNetwork::openDevice(std::vector& devicePool) { int executors = 0; if (_config.get().hasValue()) { executors = _config.get().get(); + } else if (_config.get().hasValue()) { + executors = _config.get().get(); } else if (!_config.get().empty()) { executors = _config.get() == CONFIG_VALUE(LATENCY) ? 1 : 2; } @@ -242,7 +245,7 @@ InferenceEngine::Parameter ExecutableNetwork::GetMetric(const std::string &name) optimalNumOfInferRequests = _config.get() == CONFIG_VALUE(THROUGHPUT) ? optimalNumOfInferRequests : 1; } - if (_config.get() != -1) { + if (_config.get() != 0) { optimalNumOfInferRequests = std::min(optimalNumOfInferRequests, static_cast(_config.get())); diff --git a/src/plugins/intel_myriad/myriad_plugin/myriad_executor.cpp b/src/plugins/intel_myriad/myriad_plugin/myriad_executor.cpp index b6fe0e1dbb3..3f1cacbd2ea 100644 --- a/src/plugins/intel_myriad/myriad_plugin/myriad_executor.cpp +++ b/src/plugins/intel_myriad/myriad_plugin/myriad_executor.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -37,7 +36,6 @@ using namespace vpu::MyriadPlugin; using namespace InferenceEngine; -using namespace InferenceEngine::VPUConfigParams; using namespace std; using namespace vpu; diff --git a/src/plugins/intel_myriad/myriad_plugin/myriad_metrics.cpp b/src/plugins/intel_myriad/myriad_plugin/myriad_metrics.cpp index 5cdb88212d3..bf8b3741991 100644 --- a/src/plugins/intel_myriad/myriad_plugin/myriad_metrics.cpp +++ b/src/plugins/intel_myriad/myriad_plugin/myriad_metrics.cpp @@ -9,9 +9,11 @@ #include +#include "openvino/runtime/properties.hpp" +#include "openvino/runtime/intel_myriad/myriad_properties.hpp" + using namespace vpu::MyriadPlugin; using namespace InferenceEngine; -using namespace VPUConfigParams; using namespace PluginConfigParams; //------------------------------------------------------------------------------ @@ -34,23 +36,17 @@ MyriadMetrics::MyriadMetrics() { IE_SUPPRESS_DEPRECATED_START // TODO: remove once all options are migrated _supportedConfigKeys = { - MYRIAD_CUSTOM_LAYERS, - MYRIAD_ENABLE_FORCE_RESET, + ov::intel_myriad::custom_layers.name(), + ov::intel_myriad::enable_force_reset.name(), MYRIAD_ENABLE_MX_BOOT, - // deprecated - KEY_VPU_CUSTOM_LAYERS, - KEY_VPU_MYRIAD_FORCE_RESET, - CONFIG_KEY(CONFIG_FILE), }; -IE_SUPPRESS_DEPRECATED_END - _optimizationCapabilities = { METRIC_VALUE(FP16) }; + _optimizationCapabilities = {ov::device::capability::FP16, ov::device::capability::EXPORT_IMPORT}; _rangeForAsyncInferRequests = RangeType(3, 6, 1); _idToDeviceFullNameMap = { - {"5", "Intel Movidius Myriad 2 VPU"}, {"8", "Intel Movidius Myriad X VPU"}, }; } @@ -119,11 +115,14 @@ RangeType MyriadMetrics::RangeForAsyncInferRequests( const std::map& config) const { auto throughput_streams_str = config.find(InferenceEngine::MYRIAD_THROUGHPUT_STREAMS); + if (throughput_streams_str == config.end()) { + throughput_streams_str = config.find(ov::streams::num.name()); + } if (throughput_streams_str != config.end()) { try { int throughput_streams = std::stoi(throughput_streams_str->second); if (throughput_streams > 0) { - return RangeType(throughput_streams+1, throughput_streams*3, 1); + return RangeType(throughput_streams + 1, throughput_streams * 3, 1); } } catch(...) { diff --git a/src/plugins/intel_myriad/myriad_plugin/myriad_plugin.cpp b/src/plugins/intel_myriad/myriad_plugin/myriad_plugin.cpp index 579884d5c66..c5c69ede94a 100644 --- a/src/plugins/intel_myriad/myriad_plugin/myriad_plugin.cpp +++ b/src/plugins/intel_myriad/myriad_plugin/myriad_plugin.cpp @@ -9,12 +9,11 @@ #include #include +#include #include #include -#include #include -#include #include #include #include @@ -52,10 +51,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include #include #include @@ -67,14 +66,17 @@ #include #include #include - -#include "myriad_plugin.h" #include "vpu/configuration/options/performance_hint.hpp" #include "vpu/configuration/options/performance_hint_num_requests.hpp" +#include "vpu/configuration/options/ov_throughput_streams.hpp" + +#include "myriad_plugin.h" + +#include "openvino/runtime/properties.hpp" +#include "openvino/runtime/intel_myriad/myriad_properties.hpp" using namespace InferenceEngine; using namespace InferenceEngine::PluginConfigParams; -using namespace InferenceEngine::VPUConfigParams; using namespace vpu::MyriadPlugin; @@ -246,18 +248,10 @@ Engine::Engine(std::shared_ptr mvnc) : _parsedConfig.registerOption(); _parsedConfig.registerOption(); _parsedConfig.registerOption(); - + _parsedConfig.registerOption(); IE_SUPPRESS_DEPRECATED_START _parsedConfig.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_CONVERT_STAGES); _parsedConfig.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_REORDER); - _parsedConfig.registerDeprecatedOption(VPU_CONFIG_KEY(LOG_LEVEL)); - _parsedConfig.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(PROTOCOL)); - _parsedConfig.registerDeprecatedOption(VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION)); - _parsedConfig.registerDeprecatedOption(VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME)); - _parsedConfig.registerDeprecatedOption(VPU_CONFIG_KEY(DETECT_NETWORK_BATCH)); - _parsedConfig.registerDeprecatedOption(VPU_CONFIG_KEY(CUSTOM_LAYERS)); - _parsedConfig.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE)); - _parsedConfig.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(FORCE_RESET)); IE_SUPPRESS_DEPRECATED_END } @@ -292,45 +286,55 @@ InferenceEngine::Parameter Engine::GetMetric(const std::string& name, return availableDevices.front(); }; const auto getDeviceByName = [&devicePool](const std::string& deviceName) { - const auto deviceIt = std::find_if( - devicePool.begin(), devicePool.end(), [&deviceName](DevicePtr device) { - return device->_name == deviceName; - }); + const auto deviceIt = std::find_if(devicePool.begin(), devicePool.end(), [&deviceName](DevicePtr device) { + return device->_name == deviceName; + }); if (deviceIt == devicePool.end()) { return DevicePtr(); } return *deviceIt; }; - if (name == METRIC_KEY(AVAILABLE_DEVICES)) { - IE_SET_METRIC_RETURN(AVAILABLE_DEVICES, _metrics->AvailableDevicesNames(_mvnc, _devicePool)); - } else if (name == METRIC_KEY(FULL_DEVICE_NAME)) { - IE_SET_METRIC_RETURN(FULL_DEVICE_NAME, _metrics->FullName(getSpecifiedDeviceName())); + if (ov::available_devices == name) { + return _metrics->AvailableDevicesNames(_mvnc, _devicePool); + } else if (ov::device::full_name == name) { + return _metrics->FullName(getSpecifiedDeviceName()); } else if (name == METRIC_KEY(SUPPORTED_METRICS)) { const auto& supportedMetrics = _metrics->SupportedMetrics(); - IE_SET_METRIC_RETURN(SUPPORTED_METRICS, std::vector{supportedMetrics.cbegin(), supportedMetrics.cend()}); + IE_SET_METRIC_RETURN(SUPPORTED_METRICS, + std::vector{supportedMetrics.cbegin(), supportedMetrics.cend()}); + } else if (ov::supported_properties == name) { + return decltype(ov::supported_properties)::value_type { + ov::available_devices.name(), + ov::device::full_name.name(), + ov::supported_properties.name(), + ov::device::capabilities.name(), + ov::range_for_async_infer_requests.name(), + ov::device::thermal.name(), + ov::device::architecture.name(), + }; } else if (name == METRIC_KEY(SUPPORTED_CONFIG_KEYS)) { // TODO: remove once all options are migrated auto supportedConfigKeys = _metrics->SupportedConfigKeys(); const auto& publicKeys = _parsedConfig.getPublicKeys(); supportedConfigKeys.insert(publicKeys.cbegin(), publicKeys.cend()); - IE_SET_METRIC_RETURN(SUPPORTED_CONFIG_KEYS, std::vector{supportedConfigKeys.cbegin(), supportedConfigKeys.cend()}); - } else if (name == METRIC_KEY(OPTIMIZATION_CAPABILITIES)) { - const auto& optimizationCapabilities = _metrics->OptimizationCapabilities(); - IE_SET_METRIC_RETURN(SUPPORTED_CONFIG_KEYS, std::vector{optimizationCapabilities.cbegin(), optimizationCapabilities.cend()}); - } else if (name == METRIC_KEY(RANGE_FOR_ASYNC_INFER_REQUESTS)) { - IE_SET_METRIC_RETURN(RANGE_FOR_ASYNC_INFER_REQUESTS, _metrics->RangeForAsyncInferRequests(_config)); - } else if (name == METRIC_KEY(DEVICE_ARCHITECTURE)) { - IE_SET_METRIC_RETURN(DEVICE_ARCHITECTURE, _metrics->DeviceArchitecture(options)); - } else if (name == METRIC_KEY(IMPORT_EXPORT_SUPPORT)) { - IE_SET_METRIC_RETURN(IMPORT_EXPORT_SUPPORT, true); - } else if (name == METRIC_KEY(DEVICE_THERMAL)) { + IE_SET_METRIC_RETURN(SUPPORTED_CONFIG_KEYS, + std::vector{supportedConfigKeys.cbegin(), supportedConfigKeys.cend()}); + } else if (ov::device::capabilities == name) { + return std::vector {_metrics->OptimizationCapabilities().begin(), _metrics->OptimizationCapabilities().end()}; + } else if (ov::range_for_async_infer_requests == name) { + return _metrics->RangeForAsyncInferRequests(_config); + } else if (ov::device::architecture == name) { + return _metrics->DeviceArchitecture(options); + } else if (ov::device::thermal == name) { const auto& device = getDeviceByName(getSpecifiedDeviceName()); if (device != nullptr) { - IE_SET_METRIC_RETURN(DEVICE_THERMAL, _metrics->DevicesThermal(device)); + return _metrics->DevicesThermal(device); } else { return Parameter(); } + } else if (name == METRIC_KEY(IMPORT_EXPORT_SUPPORT)) { + IE_SET_METRIC_RETURN(IMPORT_EXPORT_SUPPORT, true); } IE_THROW(NotImplemented); } diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request/config.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request/config.cpp index 44edfbe28c8..562b91ad1ea 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request/config.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/infer_request/config.cpp @@ -4,7 +4,6 @@ #include "behavior/infer_request/config.hpp" -#include "vpu/vpu_plugin_config.hpp" #include "vpu/private_plugin_config.hpp" #include "vpu/myriad_config.hpp" @@ -48,16 +47,6 @@ namespace { {{InferenceEngine::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, CONFIG_VALUE(YES)}}, {{InferenceEngine::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, CONFIG_VALUE(NO)}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(YES)}}, - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}}, - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(YES)}}, - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(NO)}}, }; const std::vector> inferMultiConfigs = { @@ -65,10 +54,6 @@ namespace { {CONFIG_KEY(LOG_LEVEL), CONFIG_VALUE(LOG_DEBUG)}}, {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, {InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION, CONFIG_VALUE(YES)}}, - - // Deprecated - {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}}, }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestConfigTest, diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index 2e8a6843354..0b2ed277cfd 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -3,7 +3,9 @@ // #include "behavior/ov_plugin/core_integration.hpp" +#include +#include #include #include "common_test_utils/file_utils.hpp" @@ -36,13 +38,13 @@ using OVClassNetworkTestP_VPU_GetMetric = OVClassNetworkTestP; TEST_P(OVClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsFP16) { ov::Core ie; OV_ASSERT_PROPERTY_SUPPORTED(ov::device::capabilities) - std::vector device_capabilities; - ASSERT_NO_THROW(device_capabilities = - ie.get_property(deviceName, ov::device::capabilities)); - - ASSERT_EQ(device_capabilities.size(), 1); - ASSERT_EQ(device_capabilities.front(), ov::device::capability::FP16); + ASSERT_NO_THROW(device_capabilities = ie.get_property(deviceName, ov::device::capabilities)); + ASSERT_EQ(device_capabilities.size(), 2); + ASSERT_NE(std::find(device_capabilities.begin(), device_capabilities.end(), ov::device::capability::EXPORT_IMPORT), + device_capabilities.end()); + ASSERT_NE(std::find(device_capabilities.begin(), device_capabilities.end(), ov::device::capability::FP16), + device_capabilities.end()); } INSTANTIATE_TEST_SUITE_P(smoke_OVClassGetMetricP, OVClassNetworkTestP_VPU_GetMetric, ::testing::ValuesIn(devices)); diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/configuration_tests.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/configuration_tests.cpp index d2d92ff73fe..1ee9f13b6c9 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/configuration_tests.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/configuration_tests.cpp @@ -3,7 +3,6 @@ // #include -#include "vpu/vpu_plugin_config.hpp" #include "vpu/private_plugin_config.hpp" #include "vpu/utils/optional.hpp" #include "behavior/plugin/configuration_tests.hpp" @@ -151,30 +150,6 @@ std::vector> getCorrectConfigs() { {{InferenceEngine::MYRIAD_ENABLE_ASYNC_DMA, CONFIG_VALUE(YES)}}, {{InferenceEngine::MYRIAD_ENABLE_ASYNC_DMA, CONFIG_VALUE(NO)}}, - // Deprecated - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_NONE}}, - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_ERROR}}, - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_WARNING}}, - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_INFO}}, - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_DEBUG}}, - {{VPU_CONFIG_KEY(LOG_LEVEL), LOG_TRACE}}, - - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(YES)}}, - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}}, - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(YES)}}, - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(DETECT_NETWORK_BATCH), CONFIG_VALUE(YES)}}, - {{VPU_CONFIG_KEY(DETECT_NETWORK_BATCH), CONFIG_VALUE(NO)}}, - - {{VPU_CONFIG_KEY(CUSTOM_LAYERS), ""}}, - - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO)}}, - { {KEY_LOG_LEVEL, LOG_INFO}, {InferenceEngine::MYRIAD_COPY_OPTIMIZATION, CONFIG_VALUE(NO)}, @@ -225,12 +200,10 @@ std::vector> getCorrectConfigs() { MyriadDevicesInfo info; if (info.getAmountOfDevices(ncDeviceProtocol_t::NC_PCIE) > 0) { - correctConfigs.emplace_back(std::map{{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(PCIE)}}); correctConfigs.emplace_back(std::map{{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_PCIE}}); } if (info.getAmountOfDevices(ncDeviceProtocol_t::NC_USB) > 0) { - correctConfigs.emplace_back(std::map{{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(USB)}}); correctConfigs.emplace_back(std::map{{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_USB}}); } @@ -332,13 +305,6 @@ const std::vector& getPublicOptions() { static const std::vector publicOptions = { KEY_LOG_LEVEL, - VPU_CONFIG_KEY(LOG_LEVEL), InferenceEngine::MYRIAD_PROTOCOL, - VPU_MYRIAD_CONFIG_KEY(PROTOCOL), InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION, - VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), InferenceEngine::MYRIAD_ENABLE_RECEIVING_TENSOR_TIME, - VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), KEY_PERF_COUNT, KEY_PERFORMANCE_HINT, KEY_PERFORMANCE_HINT_NUM_REQUESTS, @@ -591,12 +525,9 @@ const std::vector& getPublicOptions() { KEY_EXCLUSIVE_ASYNC_REQUESTS, KEY_DEVICE_ID, InferenceEngine::MYRIAD_CUSTOM_LAYERS, - VPU_CONFIG_KEY(CUSTOM_LAYERS), KEY_CONFIG_FILE, InferenceEngine::MYRIAD_DDR_TYPE, - VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), InferenceEngine::MYRIAD_ENABLE_FORCE_RESET, - VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), }; return publicOptions; } @@ -637,7 +568,6 @@ const std::vector& getPrivateOptions() { InferenceEngine::MYRIAD_DISABLE_REORDER, InferenceEngine::MYRIAD_DEVICE_CONNECT_TIMEOUT, InferenceEngine::MYRIAD_DETECT_NETWORK_BATCH, - VPU_CONFIG_KEY(DETECT_NETWORK_BATCH), InferenceEngine::MYRIAD_CHECK_PREPROCESSING_INSIDE_MODEL, InferenceEngine::MYRIAD_ENABLE_EARLY_ELTWISE_RELU_FUSION, InferenceEngine::MYRIAD_ENABLE_CUSTOM_RESHAPE_PARAM, @@ -767,28 +697,6 @@ const std::vector>& getIncorrectConfigs() { {{InferenceEngine::MYRIAD_ENABLE_ASYNC_DMA, "ON"}}, {{InferenceEngine::MYRIAD_ENABLE_ASYNC_DMA, "OFF"}}, - // Deprecated - {{VPU_CONFIG_KEY(LOG_LEVEL), "INCORRECT_LOG_LEVEL"}}, - - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "BLUETOOTH"}}, - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "LAN"}}, - - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "ON"}}, - {{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "OFF"}}, - - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), "ON"}}, - {{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), "OFF"}}, - - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), "ON"}}, - {{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), "OFF"}}, - - {{VPU_CONFIG_KEY(DETECT_NETWORK_BATCH), "ON"}}, - {{VPU_CONFIG_KEY(DETECT_NETWORK_BATCH), "OFF"}}, - - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "AUTO"}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "2GB"}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "1GB"}}, - { {KEY_LOG_LEVEL, LOG_INFO}, {InferenceEngine::MYRIAD_COPY_OPTIMIZATION, "ON"}, @@ -873,28 +781,6 @@ const std::vector>& getIncorrectMultiConfigs( {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, {InferenceEngine::MYRIAD_DDR_TYPE, "1GB"} }, - - // Deprecated - { - {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_CONFIG_KEY(LOG_LEVEL), "INCORRECT_LOG_LEVEL"}, - }, - { - {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "BLUETOOTH"} - }, - { - {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "ON"} - }, - { - {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), "OFF"} - }, - { - {InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD}, - {VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "1GB"} - }, }; return incorrectMultiConfigs; } diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/core_integration.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/core_integration.cpp index 7d9342f5919..b5f207edcee 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/core_integration.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/plugin/core_integration.cpp @@ -3,6 +3,7 @@ // #include +#include #include "behavior/plugin/core_integration.hpp" #include "common_test_utils/file_utils.hpp" @@ -45,8 +46,13 @@ TEST_P(IEClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsF ASSERT_NO_THROW(optimizationCapabilitiesParameter = ie.GetMetric(deviceName, METRIC_KEY(OPTIMIZATION_CAPABILITIES))); const auto optimizationCapabilities = optimizationCapabilitiesParameter.as>(); - ASSERT_EQ(optimizationCapabilities.size(), 1); - ASSERT_EQ(optimizationCapabilities.front(), METRIC_VALUE(FP16)); + ASSERT_EQ(optimizationCapabilities.size(), 2); + ASSERT_NE(std::find(optimizationCapabilities.begin(), + optimizationCapabilities.end(), + ov::device::capability::EXPORT_IMPORT), + optimizationCapabilities.end()); + ASSERT_NE(std::find(optimizationCapabilities.begin(), optimizationCapabilities.end(), ov::device::capability::FP16), + optimizationCapabilities.end()); } INSTANTIATE_TEST_SUITE_P( diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp index db09fa3a582..86644298832 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp @@ -5,7 +5,6 @@ #include "single_layer_tests/nonzero.hpp" #include "common/myriad_common_test_utils.hpp" -#include #include #include diff --git a/src/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp b/src/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp index abb23d112be..a6411277d99 100644 --- a/src/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp +++ b/src/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp @@ -7,7 +7,6 @@ #include #include -#include namespace { diff --git a/src/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp b/src/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp index e6b3074d4a9..b30720dc743 100644 --- a/src/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp +++ b/src/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp @@ -5,7 +5,6 @@ #include #include #include -#include namespace { diff --git a/src/tests/unit/vpu/base/graph_transformer_tests.cpp b/src/tests/unit/vpu/base/graph_transformer_tests.cpp index 87bb7591852..41a8014ad19 100644 --- a/src/tests/unit/vpu/base/graph_transformer_tests.cpp +++ b/src/tests/unit/vpu/base/graph_transformer_tests.cpp @@ -55,6 +55,7 @@ #include #include #include "vpu/configuration/options/performance_hint_num_requests.hpp" +#include "vpu/configuration/options/ov_throughput_streams.hpp" #include #include @@ -443,18 +444,10 @@ PluginConfiguration createConfiguration() { configuration.registerOption(); configuration.registerOption(); configuration.registerOption(); - + configuration.registerOption(); IE_SUPPRESS_DEPRECATED_START configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_CONVERT_STAGES); configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_REORDER); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(LOG_LEVEL)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(PROTOCOL)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(DETECT_NETWORK_BATCH)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(CUSTOM_LAYERS)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(FORCE_RESET)); IE_SUPPRESS_DEPRECATED_END return configuration; diff --git a/src/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h b/src/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h index 9f6f2138690..23e2c0fbb94 100644 --- a/src/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h +++ b/src/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -22,7 +21,6 @@ using namespace ::testing; using namespace InferenceEngine; using namespace InferenceEngine::details; using namespace InferenceEngine::PluginConfigParams; -using namespace InferenceEngine::VPUConfigParams; using namespace InferenceEngine::GNAConfigParams; class BehTestParams { diff --git a/src/tests_deprecated/behavior/vpu/myriad_tests/vpu_get_metric_tests.cpp b/src/tests_deprecated/behavior/vpu/myriad_tests/vpu_get_metric_tests.cpp index 945d52b89a8..901a2607040 100644 --- a/src/tests_deprecated/behavior/vpu/myriad_tests/vpu_get_metric_tests.cpp +++ b/src/tests_deprecated/behavior/vpu/myriad_tests/vpu_get_metric_tests.cpp @@ -4,7 +4,6 @@ #include #include -#include #include "behavior_test_plugin.h" class VPUGetMetric : public testing::Test { diff --git a/src/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp b/src/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp index 9d85b124b83..973368fa9d4 100644 --- a/src/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp +++ b/src/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp @@ -80,9 +80,6 @@ const BehTestParams allUnSupportedValues[] = { const std::vector deviceSpecificConfigurations = { BEH_MYRIAD.withConfig({{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_USB}}), BEH_MYRIAD.withConfig({{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_PCIE}}), - - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(USB)}}), - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(PCIE)}}), }; const std::vector deviceAgnosticConfigurations = { @@ -118,24 +115,6 @@ const std::vector deviceAgnosticConfigurations = { // Please do not use other types of DDR in tests with a real device, because it may hang. BEH_MYRIAD.withConfig({{InferenceEngine::MYRIAD_DDR_TYPE, InferenceEngine::MYRIAD_DDR_AUTO}}), - - // Deprecated - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(YES)}}), - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(NO)}}), - - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}}), - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(NO)}}), - - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(YES)}}), - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(NO)}}), - - BEH_MULTI_CONFIG.withConfig({ - {MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "MYRIAD"}, - {VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)} - }), - - // Please do not use other types of DDR in tests with a real device, because it may hang. - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO)}}), }; const std::vector withCorrectConfValuesPluginOnly = { @@ -169,25 +148,6 @@ const BehTestParams withIncorrectConfValues[] = { BEH_MYRIAD.withConfig({{InferenceEngine::MYRIAD_DDR_TYPE, "-1"}}), BEH_MYRIAD.withConfig({{InferenceEngine::MYRIAD_DDR_TYPE, "MICRON"}}), - - // Deprecated - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "BLUETOOTH"}}), - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "LAN"}}), - - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "ON"}}), - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "OFF"}}), - - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), "ON"}}), - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), "OFF"}}), - - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), "ON"}}), - BEH_MYRIAD.withConfig({{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), "OFF"}}), - - BEH_MULTI_CONFIG.withConfig({{MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, "MYRIAD"}, - {VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION),"ON"}}), - - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "-1"}}), - BEH_MYRIAD.withConfig({{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "MICRON"}}), }; const BehTestParams withIncorrectConfKeys[] = { diff --git a/src/tests_deprecated/functional/vpu/common/layers/myriad_layers_rfcn_test.cpp b/src/tests_deprecated/functional/vpu/common/layers/myriad_layers_rfcn_test.cpp index 27b7e50cb1a..717b2c9bfa2 100644 --- a/src/tests_deprecated/functional/vpu/common/layers/myriad_layers_rfcn_test.cpp +++ b/src/tests_deprecated/functional/vpu/common/layers/myriad_layers_rfcn_test.cpp @@ -690,7 +690,7 @@ public: // Disable HW pooling std::map networkConfig; - networkConfig["VPU_HW_STAGES_OPTIMIZATION"] = "NO"; + networkConfig[InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION] = "NO"; ExecutableNetwork exeNetwork; ASSERT_NO_THROW(exeNetwork = _vpuPluginPtr->LoadNetwork(network_part, networkConfig)); @@ -744,7 +744,7 @@ public: // Disable HW pooling std::map networkConfig; - networkConfig["VPU_HW_STAGES_OPTIMIZATION"] = "NO"; + networkConfig[InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION] = "NO"; ASSERT_NO_THROW(_exeNetwork = _vpuPluginPtr->LoadNetwork(network, networkConfig)); ASSERT_NO_THROW(_inferRequest = _exeNetwork.CreateInferRequest()); diff --git a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.cpp b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.cpp index 22eb23c0335..0c1dfabd5ec 100644 --- a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.cpp +++ b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.cpp @@ -3,6 +3,7 @@ // #include "vpu_case_common.hpp" +#include "ie_plugin_config.hpp" bool CheckMyriadX() { if (auto envVar = std::getenv("IE_VPU_MYRIADX")) { diff --git a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp index a639d2faab7..84efc17a7cd 100644 --- a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp +++ b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp @@ -11,7 +11,6 @@ #include #include #include -#include #include "vpu_case_params.hpp" #include "vpu_param_containers.hpp" diff --git a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_classification_case.cpp b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_classification_case.cpp index 783bf161f26..980e591230b 100644 --- a/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_classification_case.cpp +++ b/src/tests_deprecated/functional/vpu/common/regression/helpers/vpu_classification_case.cpp @@ -3,6 +3,7 @@ // #include "vpu_classification_case.hpp" +#include "vpu/private_plugin_config.hpp" #include "functional_test_utils/plugin_cache.hpp" //------------------------------------------------------------------------------ @@ -37,8 +38,8 @@ void VpuNoClassificationRegression::InitConfig() { VpuNoRegressionBase::InitConfig(); if (resources_ != -1) { - config_["VPU_NUMBER_OF_CMX_SLICES"] = std::to_string(resources_); - config_["VPU_NUMBER_OF_SHAVES"] = std::to_string(resources_); + config_[InferenceEngine::MYRIAD_NUMBER_OF_CMX_SLICES] = std::to_string(resources_); + config_[InferenceEngine::MYRIAD_NUMBER_OF_SHAVES] = std::to_string(resources_); } } diff --git a/src/tests_deprecated/functional/vpu/graph_transformer/gt_functional_tests.cpp b/src/tests_deprecated/functional/vpu/graph_transformer/gt_functional_tests.cpp index 9a4d53969ac..8d1ff511355 100644 --- a/src/tests_deprecated/functional/vpu/graph_transformer/gt_functional_tests.cpp +++ b/src/tests_deprecated/functional/vpu/graph_transformer/gt_functional_tests.cpp @@ -39,9 +39,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -55,6 +55,7 @@ #include #include #include "vpu/configuration/options/performance_hint_num_requests.hpp" +#include "vpu/configuration/options/ov_throughput_streams.hpp" using namespace InferenceEngine; using namespace vpu; @@ -137,20 +138,14 @@ void graphTransformerFunctionalTests::PrepareGraphCompilation() { _configuration.registerOption(); _configuration.registerOption(); _configuration.registerOption(); + _configuration.registerOption(); IE_SUPPRESS_DEPRECATED_START _configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_CONVERT_STAGES); _configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_REORDER); - _configuration.registerDeprecatedOption(VPU_CONFIG_KEY(LOG_LEVEL)); - _configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(PROTOCOL)); - _configuration.registerDeprecatedOption(VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION)); - _configuration.registerDeprecatedOption(VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME)); - _configuration.registerDeprecatedOption(VPU_CONFIG_KEY(DETECT_NETWORK_BATCH)); - _configuration.registerDeprecatedOption(VPU_CONFIG_KEY(CUSTOM_LAYERS)); - _configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE)); - _configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(FORCE_RESET)); IE_SUPPRESS_DEPRECATED_END + _inputsInfo.clear(); _outputsInfo.clear(); _inputMap.clear(); diff --git a/src/tests_deprecated/functional/vpu/myriad_tests/myriad_configs_tests.cpp b/src/tests_deprecated/functional/vpu/myriad_tests/myriad_configs_tests.cpp index b3494d6a850..773910cc11f 100644 --- a/src/tests_deprecated/functional/vpu/myriad_tests/myriad_configs_tests.cpp +++ b/src/tests_deprecated/functional/vpu/myriad_tests/myriad_configs_tests.cpp @@ -61,18 +61,11 @@ TEST_P(myriadIncorrectModelsConfigsTests_nightly, LoadNetworkWithIncorrectConfig static const std::vector myriadCorrectPackageTypeConfigValues = { // Please do not use other types of DDR in tests with a real device, because it may hang. {{InferenceEngine::MYRIAD_DDR_TYPE, InferenceEngine::MYRIAD_DDR_AUTO}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO)}} }; static const std::vector myriadIncorrectPackageTypeConfigValues = { {{InferenceEngine::MYRIAD_DDR_TYPE, "-1"}}, {{InferenceEngine::MYRIAD_DDR_TYPE, "-MICRON_1GB"}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "-1"}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "-MICRON_1GB"}}, }; INSTANTIATE_TEST_SUITE_P(MyriadPackageConfigs, myriadCorrectModelsConfigsTests_nightly, diff --git a/src/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp b/src/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp index d88d64b5dfd..0015b613301 100644 --- a/src/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp +++ b/src/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp @@ -12,7 +12,6 @@ #include #include "tests_common.hpp" #include "single_layer_common.hpp" -#include #include #include "myriad_layers_reference_functions.hpp" #include "xml_net_builder.hpp" @@ -126,12 +125,6 @@ public: _pad_val = std::get<2>(params); _stride_val = std::get<3>(params); -#if 0 // 4DGP - // TODO: make it the test argument - _config[VPU_CONFIG_KEY(COMPUTE_LAYOUT)] = VPU_CONFIG_VALUE(NCHW); -// _config[VPU_CONFIG_KEY(COMPUTE_LAYOUT)] = VPU_CONFIG_VALUE(NHWC); -#endif - _params["kernel-x"] = std::to_string(_kernel_val.x); _params["kernel-y"] = std::to_string(_kernel_val.y); _params["stride-x"] = std::to_string(_stride_val.x); diff --git a/src/tests_deprecated/functional/vpu/vpu_base/vpu_layers_tests.hpp b/src/tests_deprecated/functional/vpu/vpu_base/vpu_layers_tests.hpp index 5ad52106821..9ca3ddcd126 100644 --- a/src/tests_deprecated/functional/vpu/vpu_base/vpu_layers_tests.hpp +++ b/src/tests_deprecated/functional/vpu/vpu_base/vpu_layers_tests.hpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/src/tests_deprecated/helpers/tests_vpu_common.hpp b/src/tests_deprecated/helpers/tests_vpu_common.hpp index 4b611a5ef29..c1de71242be 100644 --- a/src/tests_deprecated/helpers/tests_vpu_common.hpp +++ b/src/tests_deprecated/helpers/tests_vpu_common.hpp @@ -12,7 +12,6 @@ #include #include "single_layer_common.hpp" -#include "vpu/vpu_plugin_config.hpp" #include diff --git a/src/tests_deprecated/unit/engines/vpu/graph_transformer_tests.cpp b/src/tests_deprecated/unit/engines/vpu/graph_transformer_tests.cpp index d1d760a65ab..4d0241ee2ed 100644 --- a/src/tests_deprecated/unit/engines/vpu/graph_transformer_tests.cpp +++ b/src/tests_deprecated/unit/engines/vpu/graph_transformer_tests.cpp @@ -57,6 +57,7 @@ #include #include "vpu/configuration/options/performance_hint.hpp" #include "vpu/configuration/options/performance_hint_num_requests.hpp" +#include "vpu/configuration/options/ov_throughput_streams.hpp" namespace vpu { @@ -255,20 +256,11 @@ PluginConfiguration createConfiguration() { configuration.registerOption(); configuration.registerOption(); configuration.registerOption(); - + configuration.registerOption(); IE_SUPPRESS_DEPRECATED_START configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_CONVERT_STAGES); configuration.registerDeprecatedOption(InferenceEngine::MYRIAD_DISABLE_REORDER); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(LOG_LEVEL)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(PROTOCOL)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(DETECT_NETWORK_BATCH)); - configuration.registerDeprecatedOption(VPU_CONFIG_KEY(CUSTOM_LAYERS)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE)); - configuration.registerDeprecatedOption(VPU_MYRIAD_CONFIG_KEY(FORCE_RESET)); IE_SUPPRESS_DEPRECATED_END - return configuration; } diff --git a/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_engine_tests.cpp b/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_engine_tests.cpp index d9b17e460fe..cd94258b393 100644 --- a/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_engine_tests.cpp +++ b/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_engine_tests.cpp @@ -6,7 +6,6 @@ #include "myriad_test_case.h" #include "vpu/myriad_config.hpp" -#include "vpu/vpu_plugin_config.hpp" #include "vpu/private_plugin_config.hpp" using MyriadEngineSetCorrectConfigTest = MyriadEngineSetConfigTest; @@ -20,33 +19,20 @@ TEST_P(MyriadEngineSetIncorrectConfigTest, SetIncorrectConfig) { ASSERT_ANY_THROW(myriad_engine_->SetConfig(GetParam())); } -IE_SUPPRESS_DEPRECATED_START - static const std::vector myriadCorrectProtocolConfigValues = { {{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_PCIE}}, {{InferenceEngine::MYRIAD_PROTOCOL, InferenceEngine::MYRIAD_USB}}, {{InferenceEngine::MYRIAD_PROTOCOL, ""}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(PCIE)}}, - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), VPU_MYRIAD_CONFIG_VALUE(USB)}}, - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), ""}}, }; static const std::vector myriadIncorrectProtocolConfigValues = { // Protocols {{InferenceEngine::MYRIAD_PROTOCOL, "0"}}, {{InferenceEngine::MYRIAD_PROTOCOL, "PCI"}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "0"}}, - {{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "PCI"}}, }; static const std::vector myriadCorrectConfigCombinationValues = { - {{InferenceEngine::MYRIAD_PROTOCOL, ""}, - // Deprecated - {VPU_MYRIAD_CONFIG_KEY(PROTOCOL), ""}} + {{InferenceEngine::MYRIAD_PROTOCOL, ""}} }; static const std::vector myriadIncorrectPowerConfigValues = { @@ -70,26 +56,13 @@ static const std::vector myriadCorrectPackageTypeConfigValues = { {{InferenceEngine::MYRIAD_DDR_TYPE, InferenceEngine::MYRIAD_DDR_SAMSUNG_2GB}}, {{InferenceEngine::MYRIAD_DDR_TYPE, InferenceEngine::MYRIAD_DDR_HYNIX_2GB}}, {{InferenceEngine::MYRIAD_DDR_TYPE, InferenceEngine::MYRIAD_DDR_MICRON_1GB}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(DDR_AUTO)}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(MICRON_2GB)}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(SAMSUNG_2GB)}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(HYNIX_2GB)}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), VPU_MYRIAD_CONFIG_VALUE(MICRON_1GB)}}, }; static const std::vector myriadIncorrectPackageTypeConfigValues = { {{InferenceEngine::MYRIAD_DDR_TYPE, "-1"}}, {{InferenceEngine::MYRIAD_DDR_TYPE, "-MICRON_1GB"}}, - - // Deprecated - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "-1"}}, - {{VPU_MYRIAD_CONFIG_KEY(MOVIDIUS_DDR_TYPE), "-MICRON_1GB"}}, }; -IE_SUPPRESS_DEPRECATED_END - /// Protocol INSTANTIATE_TEST_SUITE_P(MyriadProtocolConfigs, MyriadEngineSetCorrectConfigTest, ::testing::ValuesIn(myriadCorrectProtocolConfigValues)); diff --git a/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_metrics_tests.cpp b/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_metrics_tests.cpp index 692cd0a04f3..110e3145181 100644 --- a/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_metrics_tests.cpp +++ b/src/tests_deprecated/unit/engines/vpu/myriad_tests/myriad_metrics_tests.cpp @@ -7,12 +7,10 @@ #include "myriad_test_case.h" #include -#include "vpu/vpu_plugin_config.hpp" #include "vpu/myriad_config.hpp" using namespace InferenceEngine; using namespace InferenceEngine::PluginConfigParams; -using namespace InferenceEngine::VPUConfigParams; using str_vector = std::vector; diff --git a/tools/compile_tool/main.cpp b/tools/compile_tool/main.cpp index 01ca69692f6..c2c805ec79b 100644 --- a/tools/compile_tool/main.cpp +++ b/tools/compile_tool/main.cpp @@ -16,7 +16,6 @@ #include "inference_engine.hpp" #include "openvino/openvino.hpp" -#include #include #include