diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 2c20f894ba8ca4..7d7454f8794849 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -64,7 +64,7 @@ jobs: Static: CMAKE_BUILD_SHARED_LIBS: 'OFF' PYTHON_STATIC_ARGS: -m "not dynamic_library" - CMAKE_CPACK_GENERATOR: + CMAKE_CPACK_GENERATOR: "TGZ" SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python RUN_PREFIX: . $(SETUPVARS) && diff --git a/.github/ISSUE_TEMPLATE/build.yml b/.github/ISSUE_TEMPLATE/build.yml new file mode 100644 index 00000000000000..d65a546dac2027 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/build.yml @@ -0,0 +1,95 @@ +name: Build Issue Report +description: This report is for the build/installation issue +title: "[Build]: " +labels: ["build", "support_request"] +body: + - type: markdown + attributes: + value: | + Please provide all the necessary information to expedite the response. + - type: input + id: ov_version + attributes: + label: OpenVINO Version + description: OpenVINO version, branch, or tag in OpenVINO GitHub + placeholder: 2021.4.0 LTS / Master Branch / tag 2022.3.0 + validations: + required: true + - type: dropdown + id: os + attributes: + label: Operating System + description: What OS are you using? + options: + - Ubuntu 18.04 (LTS) + - Ubuntu 20.04 (LTS) + - Ubuntu 22.04 (LTS) + - Windows System + - Red Hat Enterprise Linux 8 + - OpenSUSE + - Android System + - Raspbian Stretch OS + - macOS Systems for Intel CPU + - macOS Systems for Apple Silicon + - WebAssembly + - WSL2 for Windows + - Other (Please specify in description) + validations: + required: true + - type: dropdown + id: architecture + attributes: + label: Hardware Architecture + description: What is your hardware architecture used in this test? + options: + - x86 (64 bits) + - x86 (32 bits) + - ARM (64 bits) + - ARM (32 bits) + - RISC-V + - Other (please specify in the description) + validations: + required: true + - type: textarea + id: target_platform + attributes: + label: Target Platform + description: | + You can also provide us full system log with the following command + Windows cmd - "systeminfo" + Linux terminal - "lscpu" and "lscpu -e" + placeholder: Paste your full platform/system information here + validations: + required: false + - type: textarea + id: build_description + attributes: + label: Build issue description + description: What issue are you facing during the build/installation? + placeholder: Please provide a detailed description of what happened + validations: + required: true + - type: textarea + id: build_script + attributes: + label: Build scrip or step-by-step to reproduce + description: How can we reproduce your issue? + placeholder: Please provide detailed instructions on how to reproduce the issue + validations: + required: false + - type: textarea + id: build_logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so there is no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Issue submission checklist + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/intel/intel-one-mono/blob/main/CODE_OF_CONDUCT.md) + options: + - label: I report the issue. It's not a question + required: true + - label: I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found the solution + required: true diff --git a/CMakeLists.txt b/CMakeLists.txt index fad19139a1de77..461f1a209cb1c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ message (STATUS "CMAKE_VERSION ......................... " ${CMAKE_VERSION}) message (STATUS "OpenVINO_SOURCE_DIR ................... " ${OpenVINO_SOURCE_DIR}) message (STATUS "OpenVINO_BINARY_DIR ................... " ${OpenVINO_BINARY_DIR}) message (STATUS "CMAKE_GENERATOR ....................... " ${CMAKE_GENERATOR}) +message (STATUS "CPACK_GENERATOR ....................... " ${CPACK_GENERATOR}) message (STATUS "CMAKE_C_COMPILER_ID ................... " ${CMAKE_C_COMPILER_ID}) message (STATUS "CMAKE_CXX_COMPILER_ID ................. " ${CMAKE_CXX_COMPILER_ID}) if(OV_GENERATOR_MULTI_CONFIG) diff --git a/cmake/developer_package/packaging/archive.cmake b/cmake/developer_package/packaging/archive.cmake new file mode 100644 index 00000000000000..7513a72f880f96 --- /dev/null +++ b/cmake/developer_package/packaging/archive.cmake @@ -0,0 +1,90 @@ +# Copyright (C) 2018-2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +include(GNUInstallDirs) + +# +# ov_archive_cpack_set_dirs() +# +# Set directories for ARCHIVE cpack +# +macro(ov_archive_cpack_set_dirs) + # common "archive" package locations + # TODO: move current variables to OpenVINO specific locations + set(OV_CPACK_INCLUDEDIR runtime/include) + set(OV_CPACK_IE_CMAKEDIR runtime/cmake) + set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake) + set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake) + set(OV_CPACK_DOCDIR docs) + set(OV_CPACK_LICENSESDIR licenses) + set(OV_CPACK_SAMPLESDIR samples) + set(OV_CPACK_WHEELSDIR tools) + set(OV_CPACK_TOOLSDIR tools) + set(OV_CPACK_DEVREQDIR tools) + set(OV_CPACK_PYTHONDIR python) + + if(WIN32) + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/$) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_WHEEL_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/Release) + elseif(APPLE) + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_WHEEL_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/Release) + else() + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}) + set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}) + set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR}) + endif() + set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}) + + # for BW compatibility + set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR}) + set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR}) + set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR}) +endmacro() + +ov_archive_cpack_set_dirs() + +# +# Override include / exclude rules for components +# This is required to exclude some files from installation +# (e.g. archive packages don't require python_package component) +# + +macro(ov_define_component_include_rules) + # core components + unset(OV_CPACK_COMP_CORE_EXCLUDE_ALL) + unset(OV_CPACK_COMP_CORE_C_EXCLUDE_ALL) + unset(OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL) + unset(OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL) + # licensing + unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL) + # samples + unset(OV_CPACK_COMP_CPP_SAMPLES_EXCLUDE_ALL) + unset(OV_CPACK_COMP_C_SAMPLES_EXCLUDE_ALL) + unset(OV_CPACK_COMP_PYTHON_SAMPLES_EXCLUDE_ALL) + # python + unset(OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL) + unset(OV_CPACK_COMP_BENCHMARK_APP_EXCLUDE_ALL) + unset(OV_CPACK_COMP_OVC_EXCLUDE_ALL) + set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL) + unset(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL) + # tools + set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL) + unset(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL) + # scripts + unset(OV_CPACK_COMP_INSTALL_DEPENDENCIES_EXCLUDE_ALL) + unset(OV_CPACK_COMP_SETUPVARS_EXCLUDE_ALL) +endmacro() + +ov_define_component_include_rules() + +# New in version 3.18 +set(CPACK_ARCHIVE_THREADS 8) +# multiple packages are generated +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) diff --git a/cmake/developer_package/packaging/nsis.cmake b/cmake/developer_package/packaging/nsis.cmake index 1a89f39344016c..f5393357d0ab51 100644 --- a/cmake/developer_package/packaging/nsis.cmake +++ b/cmake/developer_package/packaging/nsis.cmake @@ -43,6 +43,52 @@ endmacro() ov_nsis_specific_settings() +# +# ov_nsis_cpack_set_dirs() +# +# Set directories for ARCHIVE cpack +# +macro(ov_archive_cpack_set_dirs) + # common "archive" package locations + # TODO: move current variables to OpenVINO specific locations + set(OV_CPACK_INCLUDEDIR runtime/include) + set(OV_CPACK_IE_CMAKEDIR runtime/cmake) + set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake) + set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake) + set(OV_CPACK_DOCDIR docs) + set(OV_CPACK_LICENSESDIR licenses) + set(OV_CPACK_SAMPLESDIR samples) + set(OV_CPACK_WHEELSDIR tools) + set(OV_CPACK_TOOLSDIR tools) + set(OV_CPACK_DEVREQDIR tools) + set(OV_CPACK_PYTHONDIR python) + + if(WIN32) + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/$) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_WHEEL_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/Release) + elseif(APPLE) + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) + set(OV_WHEEL_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/Release) + else() + set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}) + set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}) + set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}) + set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR}) + endif() + set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}) + + # for BW compatibility + set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR}) + set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR}) + set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR}) +endmacro() + +ov_nsis_cpack_set_dirs() + # # Override include / exclude rules for components # This is required to exclude some files from installation diff --git a/cmake/developer_package/packaging/packaging.cmake b/cmake/developer_package/packaging/packaging.cmake index e1d9b60f6079de..50a9d14e2e5d40 100644 --- a/cmake/developer_package/packaging/packaging.cmake +++ b/cmake/developer_package/packaging/packaging.cmake @@ -39,52 +39,6 @@ function(ov_get_pyversion pyversion) endif() endfunction() -# -# ov_cpack_set_dirs() -# -# Set directories for cpack -# -macro(ov_cpack_set_dirs) - # common IRC package locations - # TODO: move current variables to OpenVINO specific locations - set(OV_CPACK_INCLUDEDIR runtime/include) - set(OV_CPACK_IE_CMAKEDIR runtime/cmake) - set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake) - set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake) - set(OV_CPACK_DOCDIR docs) - set(OV_CPACK_LICENSESDIR licenses) - set(OV_CPACK_SAMPLESDIR samples) - set(OV_CPACK_WHEELSDIR tools) - set(OV_CPACK_TOOLSDIR tools) - set(OV_CPACK_DEVREQDIR tools) - set(OV_CPACK_PYTHONDIR python) - - if(WIN32) - set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) - set(OV_CPACK_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/$) - set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) - set(OV_WHEEL_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/Release) - elseif(APPLE) - set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$) - set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/$) - set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$) - set(OV_WHEEL_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/Release) - else() - set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}) - set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}) - set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}) - set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR}) - endif() - set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}) - - # for BW compatibility - set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR}) - set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR}) - set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR}) -endmacro() - -ov_cpack_set_dirs() - # # ov_cpack_add_component(NAME ...) # @@ -169,38 +123,15 @@ endmacro() ov_define_component_names() -# default components for case when CPACK_GENERATOR is not set (i.e. default open source user) -macro(ov_define_component_include_rules) - # core components - unset(OV_CPACK_COMP_CORE_EXCLUDE_ALL) - unset(OV_CPACK_COMP_CORE_C_EXCLUDE_ALL) - unset(OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL) - unset(OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL) - # licensing - unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL) - # samples - unset(OV_CPACK_COMP_CPP_SAMPLES_EXCLUDE_ALL) - unset(OV_CPACK_COMP_C_SAMPLES_EXCLUDE_ALL) - unset(OV_CPACK_COMP_PYTHON_SAMPLES_EXCLUDE_ALL) - # python - unset(OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL) - unset(OV_CPACK_COMP_BENCHMARK_APP_EXCLUDE_ALL) - unset(OV_CPACK_COMP_OVC_EXCLUDE_ALL) - set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL) - unset(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL) - # tools - set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL) - unset(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL) - # scripts - unset(OV_CPACK_COMP_INSTALL_DEPENDENCIES_EXCLUDE_ALL) - unset(OV_CPACK_COMP_SETUPVARS_EXCLUDE_ALL) -endmacro() - -ov_define_component_include_rules() +if(NOT DEFINED CPACK_GENERATOR) + set(CPACK_GENERATOR "TGZ") +elseif(NOT CPACK_GENERATOR) + message(FATAL_ERROR "CPACK_GENERATOR cannot contain an empty value") +endif() # # Include generator specific configuration file: -# 1. Overrides directories set by ov__cpack_set_dirs() +# 1. Overrides directories set by ov__cpack_set_dirs() # This is requried, because different generator use different locations for installed files # 2. Merges some components using ov_override_component_names() # This is required, because different generators have different set of components @@ -230,12 +161,11 @@ elseif(CPACK_GENERATOR STREQUAL "NSIS") include(packaging/nsis) elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW|CONAN|VCPKG)$") include(packaging/common-libraries) +elseif(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|TZST|ZIP)$") + include(packaging/archive) endif() macro(ie_cpack) - if(NOT DEFINED CPACK_GENERATOR) - set(CPACK_GENERATOR "TGZ") - endif() set(CPACK_SOURCE_GENERATOR "") # not used set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenVINO™ Toolkit") set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED OFF) @@ -287,18 +217,10 @@ macro(ie_cpack) # include GENERATOR dedicated per-component configuration file # NOTE: private modules need to define ov_cpack_settings macro - # for custom packages configuration + # for custom packages configuration if(COMMAND ov_cpack_settings) ov_cpack_settings() endif() - # generator specific variables - if(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|ZIP)$") - # New in version 3.18 - set(CPACK_ARCHIVE_THREADS 8) - # multiple packages are generated - set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) - endif() - include(CPack) endmacro() diff --git a/cmake/packaging/archive.cmake b/cmake/packaging/archive.cmake new file mode 100644 index 00000000000000..59bdc01eb0427b --- /dev/null +++ b/cmake/packaging/archive.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2018-2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +# +# OpenVINO Core components including frontends, plugins, etc +# +macro(ov_cpack_settings) + # fill a list of components which are part of conda + set(cpack_components_all ${CPACK_COMPONENTS_ALL}) + unset(CPACK_COMPONENTS_ALL) + foreach(item IN LISTS cpack_components_all) + string(TOUPPER ${item} UPPER_COMP) + # filter out some components, which are not needed to be wrapped to conda-forge | brew | conan | vcpkg + if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND + # python_package is not needed in case of archives, because components like pyopenvino are used, as well as wheels + NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*") + list(APPEND CPACK_COMPONENTS_ALL ${item}) + endif() + endforeach() + unset(cpack_components_all) + list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL) +endmacro() diff --git a/cmake/packaging/common-libraries.cmake b/cmake/packaging/common-libraries.cmake index 5d2f7bd79e9e89..9b96ed528609df 100644 --- a/cmake/packaging/common-libraries.cmake +++ b/cmake/packaging/common-libraries.cmake @@ -13,6 +13,8 @@ macro(ov_cpack_settings) string(TOUPPER ${item} UPPER_COMP) # filter out some components, which are not needed to be wrapped to conda-forge | brew | conan | vcpkg if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND + # because in case of VCPKG | CONAN | BREW | CONDA-FORGE distributions, python is either not needed or installed separately + (NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND # even for case of system TBB we have installation rules for wheels packages # so, need to skip this explicitly since they are installed in `host` section NOT item MATCHES "^tbb(_dev)?$" AND @@ -21,6 +23,7 @@ macro(ov_cpack_settings) list(APPEND CPACK_COMPONENTS_ALL ${item}) endif() endforeach() + unset(cpack_components_all) list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL) # override generator diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmake index 49a1ad9fe08d36..766209977340bb 100644 --- a/cmake/packaging/debian.cmake +++ b/cmake/packaging/debian.cmake @@ -47,7 +47,7 @@ macro(ov_cpack_settings) string(TOUPPER ${item} UPPER_COMP) # filter out some components, which are not needed to be wrapped to .deb package if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND - # skip OpenVINO Python API (pattern in form of "_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") + # skip OpenVINO Python API (pattern in form of "pyopenvino_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO}_python.*" AND # because in case of .deb package, pyopenvino_package_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} is installed (NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND @@ -65,6 +65,7 @@ macro(ov_cpack_settings) list(APPEND CPACK_COMPONENTS_ALL ${item}) endif() endforeach() + unset(cpack_components_all) list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL) # version with 3 components diff --git a/cmake/packaging/nsis.cmake b/cmake/packaging/nsis.cmake index b6e809514ca713..e5467ee5afedec 100644 --- a/cmake/packaging/nsis.cmake +++ b/cmake/packaging/nsis.cmake @@ -15,6 +15,7 @@ macro(ov_cpack_settings) list(APPEND CPACK_COMPONENTS_ALL ${item}) endif() endforeach() + unset(cpack_components_all) # restore the components settings diff --git a/cmake/packaging/packaging.cmake b/cmake/packaging/packaging.cmake index a4e165d615d310..7d685f43143de0 100644 --- a/cmake/packaging/packaging.cmake +++ b/cmake/packaging/packaging.cmake @@ -3,11 +3,13 @@ # if(CPACK_GENERATOR STREQUAL "DEB") - include(cmake/packaging/debian.cmake) + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/debian.cmake") elseif(CPACK_GENERATOR STREQUAL "RPM") - include(cmake/packaging/rpm.cmake) + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/rpm.cmake") elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW|CONAN|VCPKG)$") - include(cmake/packaging/common-libraries.cmake) + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/common-libraries.cmake") +elseif(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|TZST|ZIP)$") + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/archive.cmake") elseif(CPACK_GENERATOR STREQUAL "NSIS") - include(cmake/packaging/nsis.cmake) + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/nsis.cmake") endif() diff --git a/cmake/packaging/rpm.cmake b/cmake/packaging/rpm.cmake index 24ce1b2cb0696b..d3dd22bcdbd195 100644 --- a/cmake/packaging/rpm.cmake +++ b/cmake/packaging/rpm.cmake @@ -33,7 +33,7 @@ macro(ov_cpack_settings) string(TOUPPER ${item} UPPER_COMP) # filter out some components, which are not needed to be wrapped to .rpm package if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND - # skip OpenVINO Python API (pattern in form of "_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") + # skip OpenVINO Python API (pattern in form of "pyopenvino_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO}_python.*" AND # because in case of .rpm package, pyopenvino_package_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} is installed (NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND @@ -51,6 +51,7 @@ macro(ov_cpack_settings) list(APPEND CPACK_COMPONENTS_ALL ${item}) endif() endforeach() + unset(cpack_components_all) list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL) # version with 3 components diff --git a/docs/OV_Runtime_UG/automatic_batching.md b/docs/OV_Runtime_UG/automatic_batching.md index 5b558502234f55..7fc4732a8e8db6 100644 --- a/docs/OV_Runtime_UG/automatic_batching.md +++ b/docs/OV_Runtime_UG/automatic_batching.md @@ -11,7 +11,7 @@ The Automatic Batching Execution mode (or Auto-batching for short) performs automatic batching on-the-fly to improve device utilization by grouping inference requests together, without programming effort from the user. With Automatic Batching, gathering the input and scattering the output from the individual inference requests required for the batch happen transparently, without affecting the application code. -Auto Batching can be used :ref:`directly as a virtual device ` or as an :ref:`option for inference on CPU/GPU/VPU ` (by means of configuration/hint). These 2 ways are provided for the user to enable the BATCH devices **explicitly** or **implicitly**, with the underlying logic remaining the same. An example of the difference is that the CPU device doesn’t support implicitly to enable BATCH device, commands such as ``./benchmark_app -m -d CPU -hint tput`` will not apply BATCH device **implicitly**, but ``./benchmark_app -m -d "BATCH:CPU(16)`` can **explicitly** load BATCH device. +Auto Batching can be used :ref:`directly as a virtual device ` or as an :ref:`option for inference on CPU/GPU/NPU ` (by means of configuration/hint). These 2 ways are provided for the user to enable the BATCH devices **explicitly** or **implicitly**, with the underlying logic remaining the same. An example of the difference is that the CPU device doesn’t support implicitly to enable BATCH device, commands such as ``./benchmark_app -m -d CPU -hint tput`` will not apply BATCH device **implicitly**, but ``./benchmark_app -m -d "BATCH:CPU(16)`` can **explicitly** load BATCH device. Auto-batching primarily targets the existing code written for inferencing many requests, each instance with the batch size 1. To get corresponding performance improvements, the application **must be running multiple inference requests simultaneously**. Auto-batching can also be used via a particular *virtual* device. diff --git a/docs/_static/download/operation_conformance_table_files/opset_report_omz_static.html b/docs/_static/download/operation_conformance_table_files/opset_report_omz_static.html index dea9f8ca231cb6..4f95c22d048fae 100644 --- a/docs/_static/download/operation_conformance_table_files/opset_report_omz_static.html +++ b/docs/_static/download/operation_conformance_table_files/opset_report_omz_static.html @@ -105,7 +105,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver GPU NVIDIA TEMPLATE - VPUX + NPU @@ -119,7 +119,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver 95 95 95 - 93 + 93 @@ -131,7 +131,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver 76.84 % 26.32 % 97.89 % - 11.83 % + 11.83 % @@ -143,7 +143,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver 94.92 % 55.09 % 100.0 % - 21.1 % + 21.1 % @@ -155,7 +155,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver 98.25 % 88.98 % 99.96 % - 7.69 % + 7.69 % @@ -304,12 +304,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -430,12 +430,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -556,12 +556,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -682,12 +682,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -808,12 +808,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -969,12 +969,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -1100,12 +1100,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1226,12 +1226,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1352,12 +1352,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1478,12 +1478,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1604,12 +1604,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1730,12 +1730,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -1891,12 +1891,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -2022,12 +2022,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -2183,12 +2183,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -2349,12 +2349,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -2480,12 +2480,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -2606,12 +2606,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -2767,12 +2767,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -2898,12 +2898,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -3024,12 +3024,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -3185,12 +3185,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -3311,12 +3311,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -3472,12 +3472,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -3638,12 +3638,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -3804,12 +3804,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -3935,12 +3935,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -4096,12 +4096,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -4227,12 +4227,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -4388,12 +4388,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -4554,12 +4554,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -4720,12 +4720,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -4851,12 +4851,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5012,12 +5012,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -5143,12 +5143,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5269,12 +5269,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5395,12 +5395,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5521,12 +5521,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5647,12 +5647,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5773,12 +5773,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -5934,12 +5934,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -6100,12 +6100,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -6266,12 +6266,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 75.0 %
@@ -6432,12 +6432,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -6563,12 +6563,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -6689,12 +6689,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -6815,12 +6815,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -6976,12 +6976,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -7142,12 +7142,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -7308,12 +7308,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -7439,12 +7439,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -7565,12 +7565,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -7691,12 +7691,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -7817,12 +7817,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -7943,12 +7943,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -8069,12 +8069,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -8097,7 +8097,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver N/A N/A N/A - N/A + N/A @@ -8244,12 +8244,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -8410,12 +8410,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -8576,12 +8576,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -8707,12 +8707,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -8833,12 +8833,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -8994,12 +8994,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 60.0 %
@@ -9160,12 +9160,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -9291,12 +9291,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -9452,12 +9452,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 22.73 %
@@ -9583,12 +9583,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -9709,12 +9709,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -9870,12 +9870,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -10001,12 +10001,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -10127,12 +10127,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -10288,12 +10288,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -10419,12 +10419,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -10580,12 +10580,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -10711,12 +10711,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -10837,12 +10837,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -10998,12 +10998,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -11164,12 +11164,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -11295,7 +11295,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - N/A + N/A @@ -11442,12 +11442,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 66.67 %
@@ -11608,12 +11608,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -11774,12 +11774,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -11905,12 +11905,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -12031,12 +12031,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -12192,12 +12192,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -12323,12 +12323,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -12484,12 +12484,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -12615,12 +12615,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -12741,12 +12741,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -12902,12 +12902,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 55.56 %
@@ -13033,12 +13033,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13159,12 +13159,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13285,12 +13285,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13446,12 +13446,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -13577,12 +13577,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13703,12 +13703,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13829,12 +13829,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -13990,12 +13990,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -14121,12 +14121,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -14247,12 +14247,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -14408,12 +14408,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -14574,12 +14574,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -14705,12 +14705,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -14866,12 +14866,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -14997,12 +14997,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -15123,12 +15123,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -15249,12 +15249,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -15375,12 +15375,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -15536,12 +15536,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 50.0 %
@@ -15702,12 +15702,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -15833,12 +15833,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -15959,12 +15959,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -16120,12 +16120,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -16286,12 +16286,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -16452,12 +16452,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -16618,12 +16618,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -16749,12 +16749,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -16875,12 +16875,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17001,12 +17001,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17162,12 +17162,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -17293,12 +17293,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17419,12 +17419,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17580,12 +17580,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -17711,12 +17711,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17837,12 +17837,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -17963,12 +17963,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18089,12 +18089,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18215,12 +18215,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18341,12 +18341,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18502,12 +18502,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -18668,12 +18668,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18794,12 +18794,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -18955,12 +18955,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -19086,12 +19086,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -19247,12 +19247,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -19378,7 +19378,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - N/A + N/A @@ -19490,12 +19490,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -19651,12 +19651,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -19782,12 +19782,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -19908,12 +19908,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20034,12 +20034,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20160,12 +20160,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20321,12 +20321,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -20452,12 +20452,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20578,12 +20578,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20704,12 +20704,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20830,12 +20830,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -20956,12 +20956,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21117,12 +21117,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -21248,12 +21248,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21374,12 +21374,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21500,12 +21500,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21626,12 +21626,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21752,12 +21752,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -21878,12 +21878,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -22004,12 +22004,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -22135,12 +22135,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -22261,12 +22261,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -22422,12 +22422,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -22588,12 +22588,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -22754,12 +22754,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -22920,12 +22920,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -23086,12 +23086,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -23252,12 +23252,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -23418,12 +23418,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -23549,12 +23549,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -23710,12 +23710,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -23841,12 +23841,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -23967,12 +23967,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -24093,12 +24093,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -24219,12 +24219,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -24380,12 +24380,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -24511,7 +24511,7 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - N/A + N/A @@ -24658,12 +24658,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -24824,12 +24824,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -24990,12 +24990,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -25156,12 +25156,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -25287,12 +25287,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -25448,12 +25448,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -25614,12 +25614,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 75.0 %
@@ -25780,12 +25780,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -25946,12 +25946,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -26077,12 +26077,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -26238,12 +26238,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -26369,12 +26369,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -26530,12 +26530,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 90.91 %
@@ -26696,12 +26696,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -26827,12 +26827,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -26988,12 +26988,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -27154,12 +27154,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 44.44 %
@@ -27320,12 +27320,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -27486,12 +27486,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -27652,12 +27652,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -27818,12 +27818,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -27949,12 +27949,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -28110,12 +28110,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -28276,12 +28276,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 0.0 %
@@ -28442,12 +28442,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 22.22 %
@@ -28608,12 +28608,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -28739,12 +28739,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -28900,12 +28900,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 100.0 %
@@ -29031,12 +29031,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -29192,12 +29192,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 50.0 %
@@ -29323,12 +29323,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -29449,12 +29449,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -29610,12 +29610,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 25.0 %
@@ -29776,12 +29776,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 71.43 %
@@ -29907,12 +29907,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
@@ -30068,12 +30068,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 63.64 %
@@ -30234,12 +30234,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - 90.0 %
@@ -30365,12 +30365,12 @@

Operations coverage summary: Tag: Conformance_report__omz_static_opset | Ver - ---
diff --git a/docs/optimization_guide/nncf/ptq/basic_quantization_flow.md b/docs/optimization_guide/nncf/ptq/basic_quantization_flow.md index 5fc93dcc34405e..2b31176f1ef102 100644 --- a/docs/optimization_guide/nncf/ptq/basic_quantization_flow.md +++ b/docs/optimization_guide/nncf/ptq/basic_quantization_flow.md @@ -191,7 +191,7 @@ Tune quantization parameters regex = '.*layer_.*' nncf.quantize(model, dataset, ignored_scope=nncf.IgnoredScope(patterns=regex)) -* ``target_device`` - defines the target device, the specificity of which will be taken into account during optimization. The following values are supported: ``ANY`` (default), ``CPU``, ``CPU_SPR``, ``GPU``, and ``VPU``. +* ``target_device`` - defines the target device, the specificity of which will be taken into account during optimization. The following values are supported: ``ANY`` (default), ``CPU``, ``CPU_SPR``, ``GPU``, and ``NPU``. .. code-block:: sh diff --git a/samples/cpp/benchmark_app/utils.cpp b/samples/cpp/benchmark_app/utils.cpp index 10cc2c3163ca59..af0691693545d9 100644 --- a/samples/cpp/benchmark_app/utils.cpp +++ b/samples/cpp/benchmark_app/utils.cpp @@ -61,7 +61,7 @@ size_t InputInfo::depth() const { uint32_t device_default_device_duration_in_seconds(const std::string& device) { static const std::map deviceDefaultDurationInSeconds{{"CPU", 60}, {"GPU", 60}, - {"VPU", 60}, + {"NPU", 60}, {"UNKNOWN", 120}}; uint32_t duration = 0; for (const auto& deviceDurationInSeconds : deviceDefaultDurationInSeconds) { diff --git a/samples/cpp/speech_sample/README.md b/samples/cpp/speech_sample/README.md index 2771f141923454..188a5b43cbc2c6 100644 --- a/samples/cpp/speech_sample/README.md +++ b/samples/cpp/speech_sample/README.md @@ -96,7 +96,7 @@ Several execution modes are supported via the ``-d`` flag: - ``CPU`` - All calculations are performed on CPU device using CPU Plugin. - ``GPU`` - All calculations are performed on GPU device using GPU Plugin. -- ``VPU`` - All calculations are performed on VPU device using VPU Plugin. +- ``NPU`` - All calculations are performed on NPU device using NPU Plugin. - ``GNA_AUTO`` - GNA hardware is used if available and the driver is installed. Otherwise, the GNA device is emulated in fast-but-not-bit-exact mode. - ``GNA_HW`` - GNA hardware is used if available and the driver is installed. Otherwise, an error will occur. - ``GNA_SW`` - Deprecated. The GNA device is emulated in fast-but-not-bit-exact mode. @@ -144,7 +144,7 @@ Usage message: -i "" Required. Path(s) to input file(s). Usage for a single file/layer: or . Example of usage for several files/layers: :=,:=. -m "" Required. Path to an .xml file with a trained model (required if -rg is missing). -o "" Optional. Output file name(s) to save scores (inference results). Example of usage for a single file/layer: or . Example of usage for several files/layers: :=,:=. - -d "" Optional. Specify a target device to infer on. CPU, GPU, VPU, GNA_AUTO, GNA_HW, GNA_HW_WITH_SW_FBACK, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA as the primary device and CPU as a secondary (e.g. HETERO:GNA,CPU) are supported. The sample will look for a suitable plugin for device specified. + -d "" Optional. Specify a target device to infer on. CPU, GPU, NPU, GNA_AUTO, GNA_HW, GNA_HW_WITH_SW_FBACK, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA as the primary device and CPU as a secondary (e.g. HETERO:GNA,CPU) are supported. The sample will look for a suitable plugin for device specified. -pc Optional. Enables per-layer performance report. -q "" Optional. Input quantization mode for GNA: static (default) or user defined (use with -sf). -qb "" Optional. Weight resolution in bits for GNA quantization: 8 or 16 (default) @@ -162,7 +162,7 @@ Usage message: -compile_target "" Optional. Specify GNA compile target generation. May be one of GNA_TARGET_2_0, GNA_TARGET_3_0. By default, generation corresponds to the GNA HW available in the system or the latest fully supported generation by the software. See the GNA Plugin's GNA_COMPILE_TARGET config option description. -memory_reuse_off Optional. Disables memory optimizations for compiled model. - Available target devices: CPU GNA GPU VPU + Available target devices: CPU GNA GPU NPU .. _model-preparation-speech: diff --git a/samples/cpp/speech_sample/speech_sample.hpp b/samples/cpp/speech_sample/speech_sample.hpp index 9ba602a55e3d39..0bc3a24c950d51 100644 --- a/samples/cpp/speech_sample/speech_sample.hpp +++ b/samples/cpp/speech_sample/speech_sample.hpp @@ -24,7 +24,7 @@ static const char model_message[] = "Required. Path to an .xml file with a train /// @brief message for assigning calculation to device static const char target_device_message[] = - "Optional. Specify a target device to infer on. CPU, GPU, VPU, GNA_AUTO, GNA_HW, " + "Optional. Specify a target device to infer on. CPU, GPU, NPU, GNA_AUTO, GNA_HW, " "GNA_HW_WITH_SW_FBACK, GNA_SW_FP32, " "GNA_SW_EXACT and HETERO with combination of GNA as the primary device and CPU" " as a secondary (e.g. HETERO:GNA,CPU) are supported. " @@ -274,7 +274,7 @@ bool parse_and_check_command_line(int argc, char* argv[]) { "HETERO:GNA_HW,CPU", "HETERO:GNA_SW_EXACT,CPU", "HETERO:GNA_SW_FP32,CPU", - "VPU"}; + "NPU"}; if (std::find(supportedDevices.begin(), supportedDevices.end(), FLAGS_d) == supportedDevices.end()) { throw std::logic_error("Specified device is not supported."); diff --git a/samples/python/speech_sample/README.md b/samples/python/speech_sample/README.md index ba765f1e127f8a..a4120b10ebfd7d 100644 --- a/samples/python/speech_sample/README.md +++ b/samples/python/speech_sample/README.md @@ -95,7 +95,7 @@ Several execution modes are supported via the ``-d`` flag: - ``CPU`` - All calculations are performed on CPU device using CPU Plugin. - ``GPU`` - All calculations are performed on GPU device using GPU Plugin. -- ``VPU`` - All calculations are performed on VPU device using VPU Plugin. +- ``NPU`` - All calculations are performed on NPU device using NPU Plugin. - ``GNA_AUTO`` - GNA hardware is used if available and the driver is installed. Otherwise, the GNA device is emulated in fast-but-not-bit-exact mode. - ``GNA_HW`` - GNA hardware is used if available and the driver is installed. Otherwise, an error will occur. - ``GNA_SW`` - Deprecated. The GNA device is emulated in fast-but-not-bit-exact mode. @@ -155,7 +155,7 @@ Usage message: Usage for a single file/layer: or . Example of usage for several files/layers: :=,:=. -d DEVICE, --device DEVICE - Optional. Specify a target device to infer on. CPU, GPU, VPU, GNA_AUTO, GNA_HW, GNA_SW_FP32, + Optional. Specify a target device to infer on. CPU, GPU, NPU, GNA_AUTO, GNA_HW, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA as the primary device and CPU as a secondary (e.g. HETERO:GNA,CPU) are supported. The sample will look for a suitable plugin for device specified. Default value is CPU. diff --git a/samples/python/speech_sample/arg_parser.py b/samples/python/speech_sample/arg_parser.py index d6e8c41d83404a..c498eb286df2dd 100644 --- a/samples/python/speech_sample/arg_parser.py +++ b/samples/python/speech_sample/arg_parser.py @@ -32,7 +32,7 @@ def build_arg_parser() -> argparse.ArgumentParser: 'Example of usage for several files/layers: :=,:=.') args.add_argument('-d', '--device', default='CPU', type=str, help='Optional. Specify a target device to infer on. ' - 'CPU, GPU, VPU, GNA_AUTO, GNA_HW, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA' + 'CPU, GPU, NPU, GNA_AUTO, GNA_HW, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA' ' as the primary device and CPU as a secondary (e.g. HETERO:GNA,CPU) are supported. ' 'The sample will look for a suitable plugin for device specified. Default value is CPU.') args.add_argument('-bs', '--batch_size', type=int, choices=range(1, 9), metavar='[1-8]', diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index facfb2218312e6..2e41c7e7802fbd 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -364,5 +364,8 @@ if(ENABLE_TESTS) endif() if(OpenVINODeveloperPackage_FOUND) + # provides a callback function to describe each component in repo + include("${OpenVINO_SOURCE_DIR}/cmake/packaging/packaging.cmake") + ie_cpack(${IE_CPACK_COMPONENTS_ALL}) endif() diff --git a/src/bindings/python/constraints.txt b/src/bindings/python/constraints.txt index cabd454463101f..d4c8d587644996 100644 --- a/src/bindings/python/constraints.txt +++ b/src/bindings/python/constraints.txt @@ -2,7 +2,7 @@ numpy>=1.16.6,<1.26 # Python bindings, frontends # pytest -pytest>=5.0,<7.4 +pytest>=5.0,<7.5 pytest-dependency==0.5.1 pytest-html==3.2.0 pytest-timeout==2.1.0 diff --git a/src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py b/src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py index ce8c60c864dbaf..e07a23dc5cccc1 100644 --- a/src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py +++ b/src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py @@ -58,8 +58,15 @@ def __init__(self, pt_module, graph_element=None, example_input=None, alias_db=N self.pt_module = pt_module self.raw_inputs = list(self.graph_element.inputs()) self.raw_outputs = list(self.graph_element.outputs()) - if self._input_signature is not None and "self" in self.raw_inputs[0].debugName(): - self._input_signature.insert(0, "self") + if self._input_signature is not None: + if "self" in self.raw_inputs[0].debugName(): + self._input_signature.insert(0, "self") + if 0 < len(self._input_signature) < len(self.raw_inputs): + # last input is args input, we need to multiply that name by number of extra inputs + self._input_signature = self._input_signature[:-1] + n = len(self._input_signature) + for i in range(len(self.raw_inputs) - n): + self._input_signature.append(self.raw_inputs[i + n].debugName()) if isinstance(self.graph_element, torch.Graph): self._transform_tensor_list_constants_to_listconstruct(self.graph_element) diff --git a/src/core/shape_inference/include/tensor_data_accessor.hpp b/src/core/shape_inference/include/tensor_data_accessor.hpp index 41c48641ad9ab2..300d859561b6da 100644 --- a/src/core/shape_inference/include/tensor_data_accessor.hpp +++ b/src/core/shape_inference/include/tensor_data_accessor.hpp @@ -18,6 +18,9 @@ class ITensorAccessor { * @return Tensor to data at port. */ virtual Tensor operator()(size_t port) const = 0; + +protected: + ~ITensorAccessor() = default; }; /** diff --git a/src/frontends/pytorch/src/op/fake_quantize.cpp b/src/frontends/pytorch/src/op/fake_quantize.cpp index fdb3548156b01f..0cc0113ded77c7 100644 --- a/src/frontends/pytorch/src/op/fake_quantize.cpp +++ b/src/frontends/pytorch/src/op/fake_quantize.cpp @@ -67,7 +67,7 @@ OutputVector translate_fake_quantize_per_channel_affine(const NodeContext& conte auto rank = std::get<1>(get_shape_rank(context, input_node)); auto ones = std::make_shared(const_1, rank); - auto normalized_axis = normalize_axis(context, axis, input_node); + auto normalized_axis = normalize_axis(context, axis, rank); // Create vector of length of rank filled with ones, except single -1 value at place selected by axis element. auto new_shape = std::make_shared(ones, normalized_axis, const_neg_1, const_0); // Reshape scale and zero point to tensor of the same rank as input, having shape 1 everywhere except dimension diff --git a/src/frontends/pytorch/src/op/flatten.cpp b/src/frontends/pytorch/src/op/flatten.cpp index 6022661c3aa8cf..3ff896cefd83d5 100644 --- a/src/frontends/pytorch/src/op/flatten.cpp +++ b/src/frontends/pytorch/src/op/flatten.cpp @@ -21,14 +21,6 @@ using namespace ov::op; OutputVector translate_flatten(const NodeContext& context) { num_inputs_check(context, 1, 3); auto x = context.get_input(0); - int64_t start_dim = 0; - int64_t end_dim = -1; - if (!context.input_is_none(1)) { - start_dim = context.const_input(1); - } - if (!context.input_is_none(2)) { - end_dim = context.const_input(2); - } Output shape; Output rank; std::tie(shape, rank) = get_shape_rank(context, x, true); @@ -38,20 +30,16 @@ OutputVector translate_flatten(const NodeContext& context) { if (!context.input_is_none(1)) { start_dim_node = context.get_input(1); } else { - start_dim_node = v0::Constant::create(element::i32, Shape{}, {start_dim}); + start_dim_node = v0::Constant::create(element::i32, Shape{}, {0}); } if (!context.input_is_none(2)) { end_dim_node = context.get_input(2); } else { - end_dim_node = v0::Constant::create(element::i32, Shape{}, {end_dim}); - } - if (start_dim < 0) { - start_dim_node = context.mark_node(std::make_shared(rank, start_dim_node)); - } - if (end_dim < 0) { - end_dim_node = context.mark_node(std::make_shared(rank, end_dim_node)); + end_dim_node = v0::Constant::create(element::i32, Shape{}, {-1}); } - // Slice shape from begin and end, then concat with -1, if slice return empty tensor concat shuold still be able to + start_dim_node = normalize_axis(context, start_dim_node, rank); + end_dim_node = normalize_axis(context, end_dim_node, rank); + // Slice shape from begin and end, then concat with -1, if slice return empty tensor concat should still be able to // work with it auto zero = v0::Constant::create(element::i32, Shape{1}, {0}); auto one = v0::Constant::create(element::i32, Shape{1}, {1}); diff --git a/src/frontends/pytorch/src/op/transpose.cpp b/src/frontends/pytorch/src/op/transpose.cpp index 51fd4c3eae6457..3ea5ef17283ffe 100644 --- a/src/frontends/pytorch/src/op/transpose.cpp +++ b/src/frontends/pytorch/src/op/transpose.cpp @@ -24,19 +24,12 @@ using namespace ov::op; OutputVector translate_transpose(const NodeContext& context) { num_inputs_check(context, 3, 3); - auto dim0 = context.const_input(1); - auto dim1 = context.const_input(2); Output rank; std::tie(std::ignore, rank) = get_shape_rank(context, context.get_input(0), true); - // Use opset::If for dim normalization auto dim0_node = context.get_input(1); auto dim1_node = context.get_input(2); - if (dim0 < 0) { - dim0_node = std::make_shared(rank, dim0_node); - } - if (dim1 < 0) { - dim1_node = std::make_shared(rank, dim1_node); - } + dim0_node = normalize_axis(context, dim0_node, rank); + dim1_node = normalize_axis(context, dim1_node, rank); auto start = v0::Constant::create(element::i32, {}, {0}); auto step = v0::Constant::create(element::i32, {}, {1}); auto range = std::make_shared(start, rank, step, element::i32); diff --git a/src/frontends/pytorch/src/op/unflatten.cpp b/src/frontends/pytorch/src/op/unflatten.cpp index 673efbc1480161..a913398eb35a51 100644 --- a/src/frontends/pytorch/src/op/unflatten.cpp +++ b/src/frontends/pytorch/src/op/unflatten.cpp @@ -28,11 +28,13 @@ OutputVector translate_unflatten(const NodeContext& context) { if (context.get_input_type(2).is()) { sizes = concat_list_construct(sizes); } - auto input_shape = context.mark_node(std::make_shared(input, element::i32)); + Output input_shape; + Output rank; + std::tie(input_shape, rank) = get_shape_rank(context, input); auto zero_1d = context.mark_node(v0::Constant::create(element::i32, Shape{1}, {0})); auto one_1d = context.mark_node(v0::Constant::create(element::i32, Shape{1}, {1})); dim = context.mark_node(std::make_shared(dim, element::i32)); - dim = normalize_axis(context, dim, input); + dim = normalize_axis(context, dim, rank); sizes = context.mark_node(std::make_shared(sizes, element::i32)); auto max_int = context.mark_node(v0::Constant::create(element::i32, Shape{1}, {std::numeric_limits::max()})); auto dim_plus_one = context.mark_node(std::make_shared(dim, one_1d)); diff --git a/src/frontends/pytorch/src/utils.cpp b/src/frontends/pytorch/src/utils.cpp index 929ac8b251d454..2c26feee8981ff 100644 --- a/src/frontends/pytorch/src/utils.cpp +++ b/src/frontends/pytorch/src/utils.cpp @@ -117,11 +117,7 @@ std::shared_ptr get_axes_range(const NodeContext& context, int input_id) { return context.mark_node(std::make_shared(start, reduced_rank, step, element::i32)); }; -std::shared_ptr normalize_axis(const NodeContext& context, - const Output& axis, - const Output& input_node) { - Output rank; - std::tie(std::ignore, rank) = get_shape_rank(context, input_node); +Output normalize_axis(const NodeContext& context, const Output& axis, const Output& rank) { auto axis_rank = context.mark_node(std::make_shared(axis, rank)); auto is_less = context.mark_node(std::make_shared(axis_rank, rank)); auto new_axis = context.mark_node(std::make_shared(is_less, axis_rank, axis)); diff --git a/src/frontends/pytorch/src/utils.hpp b/src/frontends/pytorch/src/utils.hpp index 175f80e77d9181..565476e7974ad8 100644 --- a/src/frontends/pytorch/src/utils.hpp +++ b/src/frontends/pytorch/src/utils.hpp @@ -39,9 +39,7 @@ Output reshape_kernel_for_group(const NodeContext& context, const Output get_axes_range(const NodeContext& context, int input_id); -std::shared_ptr normalize_axis(const NodeContext& context, - const Output& axis, - const Output& input_node); +Output normalize_axis(const NodeContext& context, const Output& axis, const Output& input_node); std::shared_ptr numel(const NodeContext& context, const Output& x); diff --git a/src/frontends/pytorch/src/utils_quantize.cpp b/src/frontends/pytorch/src/utils_quantize.cpp index a8820b8ffe473d..5af546f3d5be5d 100644 --- a/src/frontends/pytorch/src/utils_quantize.cpp +++ b/src/frontends/pytorch/src/utils_quantize.cpp @@ -90,7 +90,7 @@ Output quantize(const NodeContext& context, const auto rank = std::get<1>(get_shape_rank(context, input_convert, false, element::i32)); const auto ones = context.mark_node(std::make_shared(one, rank)); - const auto normalized_axis = normalize_axis(context, axis_convert, input_convert); + const auto normalized_axis = normalize_axis(context, axis_convert, rank); const auto new_shape = context.mark_node(std::make_shared(ones, normalized_axis, neg_one, zero)); @@ -156,8 +156,8 @@ Output quantize(const NodeContext& context, FRONT_END_OP_CONVERSION_CHECK(false, "Failed to convert a node to QuantizedPtNode"); } -std::shared_ptr cast_quantized_fw_node(Output node) { - auto quant_node = std::dynamic_pointer_cast(node.get_node_shared_ptr()); +std::shared_ptr cast_quantized_fw_node(std::shared_ptr node) { + auto quant_node = std::dynamic_pointer_cast(node); if (!quant_node) { return nullptr; } @@ -168,19 +168,6 @@ std::shared_ptr cast_quantized_fw_node(Output node) { return quant_node; } -std::shared_ptr cast_quantized_fw_node(Output node, const std::string& type) { - auto quant_node = std::dynamic_pointer_cast(node.get_node_shared_ptr()); - if (!quant_node) { - return nullptr; - } - const auto& attrs = quant_node->get_attrs(); - if (attrs.find(QuantizedPtNode::quantized_node_type_key) == attrs.end() || - attrs.at(QuantizedPtNode::quantized_node_type_key) != type) { - return nullptr; - } - return quant_node; -} - } // namespace pytorch } // namespace frontend } // namespace ov diff --git a/src/frontends/pytorch/src/utils_quantize.hpp b/src/frontends/pytorch/src/utils_quantize.hpp index a78855ca2b3eb5..0d5219f00885f7 100644 --- a/src/frontends/pytorch/src/utils_quantize.hpp +++ b/src/frontends/pytorch/src/utils_quantize.hpp @@ -140,8 +140,7 @@ Output quantize(const NodeContext& context, const Output& zero_point, const Output& quantized_node); -std::shared_ptr cast_quantized_fw_node(Output node); -std::shared_ptr cast_quantized_fw_node(Output node, const std::string& type); +std::shared_ptr cast_quantized_fw_node(std::shared_ptr node); namespace op { /** diff --git a/src/frontends/tensorflow/src/op_table.cpp b/src/frontends/tensorflow/src/op_table.cpp index c7cf8ff6195933..08abacac63cfdd 100644 --- a/src/frontends/tensorflow/src/op_table.cpp +++ b/src/frontends/tensorflow/src/op_table.cpp @@ -190,6 +190,7 @@ const std::map get_supported_ops() { {"MaxPool", CreatorFunction(translate_max_pool_op)}, {"MaxPoolV2", CreatorFunction(translate_max_pool_op)}, {"MaxPool3D", CreatorFunction(translate_max_pool_op)}, + {"MaxPoolWithArgmax", CreatorFunction(translate_max_pool_op)}, {"Merge", CreatorFunction(translate_merge_op)}, {"MirrorPad", CreatorFunction(translate_mirror_pad_op)}, {"MutableHashTable", CreatorFunction(translate_hash_table_op)}, diff --git a/src/frontends/tensorflow_common/src/op/interpolate.cpp b/src/frontends/tensorflow_common/src/op/interpolate.cpp index c2c09295e4a024..a46acf773e5376 100644 --- a/src/frontends/tensorflow_common/src/op/interpolate.cpp +++ b/src/frontends/tensorflow_common/src/op/interpolate.cpp @@ -2,12 +2,18 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/interpolate.hpp" + #include "common_op_table.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/convert.hpp" +#include "openvino/op/divide.hpp" +#include "openvino/op/shape_of.hpp" +#include "openvino/op/slice.hpp" using namespace std; using namespace ov; -using namespace ov::opset8; +using namespace ov::op; namespace ov { namespace frontend { @@ -30,58 +36,48 @@ OutputVector translate_interpolate_op(const NodeContext& node) { " is True, the attribute align_corners must be False."); // prepare attributes for OpenVINO Interpolate operation - Interpolate::InterpolateAttrs interpolate_attrs; - interpolate_attrs.shape_calculation_mode = Interpolate::ShapeCalcMode::SIZES; + v11::Interpolate::InterpolateAttrs interpolate_attrs; + interpolate_attrs.shape_calculation_mode = v11::Interpolate::ShapeCalcMode::SIZES; if (op_type == "ResizeNearestNeighbor") { - interpolate_attrs.mode = Interpolate::InterpolateMode::NEAREST; - interpolate_attrs.nearest_mode = Interpolate::NearestMode::FLOOR; + interpolate_attrs.mode = v11::Interpolate::InterpolateMode::NEAREST; + interpolate_attrs.nearest_mode = v11::Interpolate::NearestMode::FLOOR; } else if (op_type == "ResizeBilinear") { auto input_rank = images.get_partial_shape().rank(); if (input_rank.is_static() && input_rank.get_length() == 4) { - interpolate_attrs.mode = Interpolate::InterpolateMode::LINEAR_ONNX; + interpolate_attrs.mode = v11::Interpolate::InterpolateMode::LINEAR_ONNX; } else { - interpolate_attrs.mode = Interpolate::InterpolateMode::LINEAR; + interpolate_attrs.mode = v11::Interpolate::InterpolateMode::LINEAR; } - interpolate_attrs.nearest_mode = Interpolate::NearestMode::ROUND_PREFER_FLOOR; + interpolate_attrs.nearest_mode = v11::Interpolate::NearestMode::ROUND_PREFER_FLOOR; } if (tf_align_corners) { - interpolate_attrs.coordinate_transformation_mode = Interpolate::CoordinateTransformMode::ALIGN_CORNERS; - if (interpolate_attrs.mode == Interpolate::InterpolateMode::NEAREST) { - interpolate_attrs.nearest_mode = Interpolate::NearestMode::ROUND_PREFER_CEIL; + interpolate_attrs.coordinate_transformation_mode = v11::Interpolate::CoordinateTransformMode::ALIGN_CORNERS; + if (interpolate_attrs.mode == v11::Interpolate::InterpolateMode::NEAREST) { + interpolate_attrs.nearest_mode = v11::Interpolate::NearestMode::ROUND_PREFER_CEIL; } } else if (tf_half_pixel_centers) { - if (interpolate_attrs.mode == Interpolate::InterpolateMode::NEAREST) { + if (interpolate_attrs.mode == v11::Interpolate::InterpolateMode::NEAREST) { interpolate_attrs.coordinate_transformation_mode = - Interpolate::CoordinateTransformMode::TF_HALF_PIXEL_FOR_NN; + v11::Interpolate::CoordinateTransformMode::TF_HALF_PIXEL_FOR_NN; } else { - interpolate_attrs.coordinate_transformation_mode = Interpolate::CoordinateTransformMode::HALF_PIXEL; + interpolate_attrs.coordinate_transformation_mode = v11::Interpolate::CoordinateTransformMode::HALF_PIXEL; } } else { - interpolate_attrs.coordinate_transformation_mode = Interpolate::CoordinateTransformMode::ASYMMETRIC; + interpolate_attrs.coordinate_transformation_mode = v11::Interpolate::CoordinateTransformMode::ASYMMETRIC; } - // prepare scales input - auto images_shape = make_shared(images, element::i32); - auto spatial_shape = make_shared(images_shape, - make_shared(element::i64, Shape{1}, std::vector{1}), - make_shared(element::i64, Shape{1}, std::vector{3}), - make_shared(element::i64, Shape{1}, std::vector{1}), - make_shared(element::i64, Shape{1}, std::vector{0})); - auto scales = make_shared(make_shared(size, element::f32), - make_shared(spatial_shape, element::f32)); - // since Interpolate is layout agnostic // we can avoid Transpose operation by specifying axes = {1, 2} for original NHWC layout - auto axes = make_shared(element::i32, Shape{2}, std::vector({1, 2})); + auto axes = make_shared(element::i32, Shape{2}, std::vector({1, 2})); // according to the specification of ResizeBilinear, // it always returns FP32 output type so we immediately align input type for it if (op_type == "ResizeBilinear") { - images = make_shared(images, element::f32); + images = make_shared(images, element::f32); } - auto interpolate = make_shared(images, size, scales, axes, interpolate_attrs); + auto interpolate = make_shared(images, size, axes, interpolate_attrs); set_node_name(node.get_name(), interpolate); return {interpolate}; } diff --git a/src/frontends/tensorflow_common/src/op/max_pool.cpp b/src/frontends/tensorflow_common/src/op/max_pool.cpp index b2a4520249eb78..d64ac1a17fbafe 100644 --- a/src/frontends/tensorflow_common/src/op/max_pool.cpp +++ b/src/frontends/tensorflow_common/src/op/max_pool.cpp @@ -2,12 +2,21 @@ // SPDX-License-Identifier: Apache-2.0 // +#include "openvino/op/max_pool.hpp" + #include "common_op_table.hpp" -#include "openvino/opsets/opset8.hpp" +#include "openvino/op/add.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/divide.hpp" +#include "openvino/op/gather.hpp" +#include "openvino/op/multiply.hpp" +#include "openvino/op/shape_of.hpp" +#include "openvino/op/subtract.hpp" #include "utils.hpp" using namespace std; using namespace ov; +using namespace ov::op; using namespace ov::frontend::tensorflow; namespace ov { @@ -17,21 +26,25 @@ namespace op { OutputVector translate_max_pool_util(const NodeContext& node, size_t spatial_dims_num, - const std::vector& tf_kernel_sizes, - const std::vector& tf_strides) { - default_op_checks(node, 1, {"MaxPool", "MaxPoolV2", "MaxPool3D"}); + const vector& tf_kernel_sizes, + const vector& tf_strides, + element::Type indices_element_type = element::i64, + int64_t axis = 0, + bool set_friendly_name = true, + bool with_indices = false) { + default_op_checks(node, 1, {"MaxPool", "MaxPoolV2", "MaxPool3D", "MaxPoolWithArgmax"}); TENSORFLOW_OP_VALIDATION(node, spatial_dims_num == 2 || spatial_dims_num == 3, - "Only MaxPool, MaxPoolV2 and MaxPool3D are supported."); + "Only MaxPool, MaxPoolV2, MaxPool3D and MaxPoolWithArgmax are supported."); auto input = node.get_input(0); - auto tf_padding_type = node.get_attribute("padding"); - ov::op::PadType auto_pad = convert_tf_padding(node, tf_padding_type); - auto tf_data_format = node.get_attribute("data_format", spatial_dims_num == 2 ? "NHWC" : "NDHWC"); + auto tf_padding_type = node.get_attribute("padding"); + PadType auto_pad = convert_tf_padding(node, tf_padding_type); + auto tf_data_format = node.get_attribute("data_format", spatial_dims_num == 2 ? "NHWC" : "NDHWC"); - auto tf_explicit_paddings = std::vector{}; - if (auto_pad == ov::op::PadType::EXPLICIT) { - tf_explicit_paddings = node.get_attribute>("explicit_paddings", {}); + auto tf_explicit_paddings = vector{}; + if (auto_pad == PadType::EXPLICIT) { + tf_explicit_paddings = node.get_attribute>("explicit_paddings", {}); } bool is_nhwc = true; @@ -48,40 +61,51 @@ OutputVector translate_max_pool_util(const NodeContext& node, } // prepare attributes for OpenVINO MaxPool operation - ov::Strides strides(spatial_dims_num); - ov::Strides dilations = (spatial_dims_num == 2 ? ov::Strides({1, 1}) : ov::Strides({1, 1, 1})); - ov::Shape kernel_sizes(spatial_dims_num); - ov::frontend::tensorflow::convert_nhwc_to_hw(is_nhwc, tf_strides, strides); - ov::frontend::tensorflow::convert_nhwc_to_hw(is_nhwc, tf_kernel_sizes, kernel_sizes); - - ov::CoordinateDiff pads_begin; - ov::CoordinateDiff pads_end; - if (auto_pad == ov::op::PadType::EXPLICIT) { + Strides strides(spatial_dims_num); + Strides dilations = (spatial_dims_num == 2 ? Strides({1, 1}) : Strides({1, 1, 1})); + Shape kernel_sizes(spatial_dims_num); + convert_nhwc_to_hw(is_nhwc, tf_strides, strides); + convert_nhwc_to_hw(is_nhwc, tf_kernel_sizes, kernel_sizes); + + CoordinateDiff pads_begin; + CoordinateDiff pads_end; + if (auto_pad == PadType::EXPLICIT) { fill_explicit_pads_vectors(node, is_nhwc, spatial_dims_num, tf_explicit_paddings, pads_begin, pads_end); } // prepare input to MaxPool - convert_nhwc_to_nchw(is_nhwc, input, ov::Rank(spatial_dims_num + 2)); - - auto max_pool_node = std::make_shared(input, - strides, - dilations, - ov::Shape(pads_begin.begin(), pads_begin.end()), - ov::Shape(pads_end.begin(), pads_end.end()), - kernel_sizes, - ov::op::RoundingType::FLOOR, - auto_pad); + convert_nhwc_to_nchw(is_nhwc, input, Rank(spatial_dims_num + 2)); + + auto max_pool_node = make_shared(input, + strides, + dilations, + Shape(pads_begin.begin(), pads_begin.end()), + Shape(pads_end.begin(), pads_end.end()), + kernel_sizes, + RoundingType::FLOOR, + auto_pad, + indices_element_type, + axis); auto max_pool = max_pool_node->output(0); - ov::frontend::tensorflow::convert_nchw_to_nhwc(is_nhwc, max_pool, ov::Rank(spatial_dims_num + 2)); - ov::frontend::tensorflow::set_node_name(node.get_name(), max_pool.get_node_shared_ptr()); + convert_nchw_to_nhwc(is_nhwc, max_pool, Rank(spatial_dims_num + 2)); + if (set_friendly_name) { + set_node_name(node.get_name(), max_pool.get_node_shared_ptr()); + } else { + set_out_name(node.get_name() + ":0", max_pool); + } + + if (with_indices) { + auto output_indices = max_pool_node->output(1); + return OutputVector{max_pool, output_indices}; + } return {max_pool}; } OutputVector translate_max_pool(const NodeContext& node, size_t spatial_dims_num) { // MaxPool2D and MaxPool3D have ksize and strides as attributes // retrieve attributes - auto strides = node.get_attribute>("strides"); - auto kernel_sizes = node.get_attribute>("ksize"); + auto strides = node.get_attribute>("strides"); + auto kernel_sizes = node.get_attribute>("ksize"); return translate_max_pool_util(node, spatial_dims_num, kernel_sizes, strides); } @@ -104,6 +128,81 @@ OutputVector translate_max_pool_v2(const NodeContext& node) { return translate_max_pool_util(node, 2, ksize_vector, strides_vector); } +OutputVector translate_max_pool_with_argmax(const NodeContext& node) { + // MaxPoolWithArgmax has just one input. ksize and strides are attributes + TENSORFLOW_OP_VALIDATION(node, + node.get_input_size() > 0, + "MaxPoolWithArgmax operation must have at least one input."); + auto include_batch_in_index = node.get_attribute("include_batch_in_index", false); + auto targmax = node.get_attribute("Targmax", element::i64); + auto ksize = node.get_attribute>("ksize"); + auto strides = node.get_attribute>("ksize"); + auto images = node.get_input(0); + auto node_name = node.get_name(); + + // indices from which dimension to count output indices + int64_t axis = include_batch_in_index ? 0 : 1; + + auto max_pool_with_indices = translate_max_pool_util(node, 2, ksize, strides, targmax, axis, false, true); + TENSORFLOW_OP_VALIDATION(node, + max_pool_with_indices.size() == 2, + "[TensorFlow Frontend] internal error: expect two outputs for MaxPoolWithArgmax."); + auto max_pool = max_pool_with_indices[0]; + auto output_indices_nchw = max_pool_with_indices[1]; + + auto tf_data_format = node.get_attribute("data_format", "NHWC"); + Output output_indices; + if (tf_data_format != "NHWC") { + output_indices = output_indices_nchw; + } else { + output_indices = output_indices_nchw; + // adjust output indices to have them for NHWC layout + // now it is computed for NCHW layout + // 1. compute all dimensions N, H, W, C + auto images_shape = make_shared(images, targmax); + auto const_zero = make_shared(element::i32, Shape{1}, 0); + auto const_one = make_shared(element::i32, Shape{1}, 1); + auto const_two = make_shared(element::i32, Shape{1}, 2); + auto const_three = make_shared(element::i32, Shape{1}, 3); + auto N = make_shared(images_shape, const_zero, const_zero); + auto H = make_shared(images_shape, const_one, const_zero); + auto W = make_shared(images_shape, const_two, const_zero); + auto C = make_shared(images_shape, const_three, const_zero); + + // 2. compute complex index for NCHW layout, i.e. n, h, w, c + auto HW = make_shared(H, W); + Output n; + if (include_batch_in_index) { + auto CHW = make_shared(C, HW); + n = make_shared(output_indices_nchw, CHW); + auto nCHW = make_shared(n, CHW); + output_indices_nchw = make_shared(output_indices_nchw, nCHW); + } else { + n = make_shared(targmax, Shape{1}, 0); + } + auto c = make_shared(output_indices_nchw, HW); + auto cHW = make_shared(c, HW); + output_indices_nchw = make_shared(output_indices_nchw, cHW); + auto h = make_shared(output_indices_nchw, W); + auto hW = make_shared(h, W); + auto w = make_shared(output_indices_nchw, hW); + + // transform them into flatten form for NHWC layout + auto WC = make_shared(W, C); + auto HWC = make_shared(H, WC); + output_indices = make_shared(n, HWC); + auto hWC = make_shared(h, WC); + output_indices = make_shared(output_indices, hWC); + auto wC = make_shared(w, C); + output_indices = make_shared(output_indices, wC); + output_indices = make_shared(output_indices, c); + convert_nchw_to_nhwc(true, output_indices, 4); + } + + set_out_name(node_name + ":1", output_indices); + return {max_pool, output_indices}; +} + OutputVector translate_max_pool_op(const NodeContext& node) { if (node.get_op_type() == "MaxPool") { return translate_max_pool(node, 2); @@ -111,6 +210,8 @@ OutputVector translate_max_pool_op(const NodeContext& node) { return translate_max_pool_v2(node); } else if (node.get_op_type() == "MaxPool3D") { return translate_max_pool(node, 3); + } else if (node.get_op_type() == "MaxPoolWithArgmax") { + return translate_max_pool_with_argmax(node); } else { TENSORFLOW_OP_VALIDATION(node, false, "Only MaxPool2D, MaxPoolV2 and MaxPool3D are supported."); } diff --git a/src/frontends/tensorflow_common/src/utils.cpp b/src/frontends/tensorflow_common/src/utils.cpp index 05aca5ad9ba6c6..83c2f6e8796471 100644 --- a/src/frontends/tensorflow_common/src/utils.cpp +++ b/src/frontends/tensorflow_common/src/utils.cpp @@ -42,6 +42,7 @@ PadType convert_tf_padding(const frontend::NodeContext& node, const string& tf_p "MaxPool", "MaxPoolV2", "MaxPool3D", + "MaxPoolWithArgmax", "ExtractImagePatches", "DepthwiseConv2dNative", "AvgPool", @@ -68,8 +69,8 @@ PadType convert_tf_padding(const frontend::NodeContext& node, const string& tf_p return PadType::SAME_LOWER; } } else if (op_type == "Conv2D" || op_type == "Conv3D" || op_type == "MaxPool" || op_type == "MaxPoolV2" || - op_type == "MaxPool3D" || op_type == "ExtractImagePatches" || op_type == "DepthwiseConv2dNative" || - op_type == "AvgPool" || op_type == "AvgPool3D") { + op_type == "MaxPool3D" || op_type == "MaxPoolWithArgmax" || op_type == "ExtractImagePatches" || + op_type == "DepthwiseConv2dNative" || op_type == "AvgPool" || op_type == "AvgPool3D") { if (tf_padding == "SAME") { // According to the formulas for calculating auto_pad values of the // Conv layer in the Operation specification, diff --git a/src/inference/include/ie/vpu/myriad_config.hpp b/src/inference/include/ie/vpu/myriad_config.hpp index 7fc7d774941526..52d490b87d1b86 100644 --- a/src/inference/include/ie/vpu/myriad_config.hpp +++ b/src/inference/include/ie/vpu/myriad_config.hpp @@ -60,7 +60,7 @@ INFERENCE_ENGINE_1_0_DEPRECATED DECLARE_VPU_CONFIG(MYRIAD_PCIE); INFERENCE_ENGINE_1_0_DEPRECATED DECLARE_VPU_CONFIG(MYRIAD_USB); /** - * @brief Optimize vpu plugin execution to maximize throughput. + * @brief Optimize MYRIAD plugin execution to maximize throughput. * This option should be used with integer value which is the requested number of streams. * The only possible values are: * 1 diff --git a/src/plugins/auto/src/auto_compiled_model.cpp b/src/plugins/auto/src/auto_compiled_model.cpp index 3bfdd51628d18e..a827072bf3234b 100644 --- a/src/plugins/auto/src/auto_compiled_model.cpp +++ b/src/plugins/auto/src/auto_compiled_model.cpp @@ -201,7 +201,7 @@ ov::Any AutoCompiledModel::get_property(const std::string& name) const { LOG_WARNING_TAG("deduce optimal infer requset num for auto-batch failed :%s", iie.what()); } real = (std::max)(requests, optimal_batch_size); - } else if (device_info.device_name.find("VPU") != std::string::npos) { + } else if (device_info.device_name.find("NPU") != std::string::npos) { real = 8u; } else { real = upper_bound_streams_num ? 2 * upper_bound_streams_num : default_num_for_tput; diff --git a/src/plugins/auto/src/auto_schedule.cpp b/src/plugins/auto/src/auto_schedule.cpp index 4efcd6e0253ed6..36e9c9f54621a5 100644 --- a/src/plugins/auto/src/auto_schedule.cpp +++ b/src/plugins/auto/src/auto_schedule.cpp @@ -301,10 +301,10 @@ void AutoSchedule::try_to_compile_model(AutoCompileContext& context, const std:: } // need to recompile model, unregister it's priority // there maybe potential issue. - // for example they are dGPU, VPU, iGPU, customer want to compile model with - // configure 0 dGPU, 1 VPU, if dGPU compile failed, - // the result will be not sure, maybe two models are compiled into VPU, - // maybe 0 is compiled to VPU, 1 is compiled to iGPU + // for example they are dGPU, NPU, iGPU, customer want to compile model with + // configure 0 dGPU, 1 NPU, if dGPU compile failed, + // the result will be not sure, maybe two models are compiled into NPU, + // maybe 0 is compiled to NPU, 1 is compiled to iGPU m_plugin->unregister_priority(m_context->m_model_priority, context.m_device_info.unique_name); // remove the current device from device_list auto erase_device = deviceChecker().check_and_return_if_device_in_list(device, device_list, true); diff --git a/src/plugins/auto/src/plugin_config.cpp b/src/plugins/auto/src/plugin_config.cpp index 4fcace66dd3085..0f49680856d1a4 100644 --- a/src/plugins/auto/src/plugin_config.cpp +++ b/src/plugins/auto/src/plugin_config.cpp @@ -8,7 +8,7 @@ namespace auto_plugin { // AUTO will enable the blocklist if // 1.No device priority passed to AUTO/MULTI.(eg. core.compile_model(model, "AUTO", configs);) // 2.No valid device parsed out from device priority (eg. core.compile_model(model, "AUTO:-CPU,-GPU", configs);). -const std::set PluginConfig::device_block_list = {"VPU", "GNA", "notIntelGPU"}; +const std::set PluginConfig::device_block_list = {"NPU", "GNA", "notIntelGPU"}; PluginConfig::PluginConfig() { set_default(); diff --git a/src/plugins/auto/tests/unit/compile_model_metric_test.cpp b/src/plugins/auto/tests/unit/compile_model_metric_test.cpp index 67fac96aabe8dd..05161963605675 100644 --- a/src/plugins/auto/tests/unit/compile_model_metric_test.cpp +++ b/src/plugins/auto/tests/unit/compile_model_metric_test.cpp @@ -192,13 +192,13 @@ TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUES metaDevices.push_back({actualDeviceName, metaConfig, actualCustomerNum, ""}); // enable autoBatch unsigned int gpuOptimalBatchNum = 8; - unsigned int keembayOptimalBatchNum = 1; + unsigned int npuOptimalBatchNum = 1; ov::hint::PerformanceMode mode = ov::hint::PerformanceMode::THROUGHPUT; std::tuple rangeOfStreams = std::make_tuple(1, 3); ON_CALL(*core, get_property(StrEq(ov::test::utils::DEVICE_GPU), StrEq(ov::optimal_batch_size.name()), _)) .WillByDefault(RETURN_MOCK_VALUE(gpuOptimalBatchNum)); ON_CALL(*core, get_property(StrEq(ov::test::utils::DEVICE_KEEMBAY), StrEq(ov::optimal_batch_size.name()), _)) - .WillByDefault(RETURN_MOCK_VALUE(keembayOptimalBatchNum)); + .WillByDefault(RETURN_MOCK_VALUE(npuOptimalBatchNum)); ON_CALL(*core, get_property(_, StrEq(ov::range_for_streams.name()), _)) .WillByDefault(RETURN_MOCK_VALUE(rangeOfStreams)); ON_CALL(*core, get_property(_, StrEq(ov::hint::performance_mode.name()), _)) diff --git a/src/plugins/auto/tests/unit/get_device_list.cpp b/src/plugins/auto/tests/unit/get_device_list.cpp index 50837ae17f1d38..5fc8d4eedb4b43 100644 --- a/src/plugins/auto/tests/unit/get_device_list.cpp +++ b/src/plugins/auto/tests/unit/get_device_list.cpp @@ -7,8 +7,8 @@ using Config = std::map; using namespace ov::mock_auto_plugin; -const std::vector availableDevs = {"CPU", "GPU", "VPU"}; -const std::vector availableDevsWithId = {"CPU", "GPU.0", "GPU.1", "VPU"}; +const std::vector availableDevs = {"CPU", "GPU", "NPU"}; +const std::vector availableDevsWithId = {"CPU", "GPU.0", "GPU.1", "NPU"}; using Params = std::tuple; using ConfigParams = std::tuple< std::vector, // Available devices retrieved from Core @@ -96,8 +96,8 @@ const std::vector testConfigsWithId = {Params{" ", " "}, Params{"CPU,,GPU", "CPU,GPU.0,GPU.1"}, Params{"CPU, ,GPU", "CPU, ,GPU.0,GPU.1"}, Params{"CPU,GPU,GPU.1", "CPU,GPU.0,GPU.1"}, - Params{"CPU,GPU,VPU,INVALID_DEVICE", "CPU,GPU.0,GPU.1,VPU,INVALID_DEVICE"}, - Params{"VPU,GPU,CPU,-GPU.0", "VPU,GPU.1,CPU"}, + Params{"CPU,GPU,NPU,INVALID_DEVICE", "CPU,GPU.0,GPU.1,NPU,INVALID_DEVICE"}, + Params{"NPU,GPU,CPU,-GPU.0", "NPU,GPU.1,CPU"}, Params{"-GPU.0,GPU,CPU", "GPU.1,CPU"}, Params{"-GPU.0,GPU", "GPU.1"}, Params{"-GPU,GPU.0", "GPU.0"}, @@ -131,13 +131,13 @@ const std::vector testConfigs = {Params{" ", " "}, Params{"CPU,GPU,GPU.0", "CPU,GPU"}, Params{"CPU,GPU,GPU.1", "CPU,GPU,GPU.1"}, Params{"CPU,GPU.1,GPU", "CPU,GPU.1,GPU"}, - Params{"CPU,VPU", "CPU,VPU"}, - Params{"CPU,-VPU", "CPU"}, + Params{"CPU,NPU", "CPU,NPU"}, + Params{"CPU,-NPU", "CPU"}, Params{"INVALID_DEVICE", "INVALID_DEVICE"}, Params{"CPU,-INVALID_DEVICE", "CPU"}, Params{"CPU,INVALID_DEVICE", "CPU,INVALID_DEVICE"}, Params{"-CPU,INVALID_DEVICE", "INVALID_DEVICE"}, - Params{"CPU,GPU,VPU", "CPU,GPU,VPU"}}; + Params{"CPU,GPU,NPU", "CPU,GPU,NPU"}}; const std::vector testConfigsWithIdNotInteldGPU = {Params{" ", " "}, Params{"", "CPU,GPU.0"}, @@ -147,8 +147,8 @@ const std::vector testConfigsWithIdNotInteldGPU = {Params{" ", " "}, Params{"CPU,,GPU", "CPU,GPU.0,GPU.1"}, Params{"CPU, ,GPU", "CPU, ,GPU.0,GPU.1"}, Params{"CPU,GPU,GPU.1", "CPU,GPU.0,GPU.1"}, - Params{"CPU,GPU,VPU,INVALID_DEVICE", "CPU,GPU.0,GPU.1,VPU,INVALID_DEVICE"}, - Params{"VPU,GPU,CPU,-GPU.0", "VPU,GPU.1,CPU"}, + Params{"CPU,GPU,NPU,INVALID_DEVICE", "CPU,GPU.0,GPU.1,NPU,INVALID_DEVICE"}, + Params{"NPU,GPU,CPU,-GPU.0", "NPU,GPU.1,CPU"}, Params{"-GPU.0,GPU,CPU", "GPU.1,CPU"}, Params{"-GPU.0,GPU", "GPU.1"}, Params{"-GPU,GPU.0", "GPU.0"}, diff --git a/src/plugins/auto/tests/unit/select_device_failed_test.cpp b/src/plugins/auto/tests/unit/select_device_failed_test.cpp index 5559621260d45d..92afffef4b6f82 100644 --- a/src/plugins/auto/tests/unit/select_device_failed_test.cpp +++ b/src/plugins/auto/tests/unit/select_device_failed_test.cpp @@ -127,7 +127,7 @@ TEST_P(AutoLoadFailedTest, LoadCNNetWork) { metaDevices.push_back(std::move(devInfo)); // set the return value of SelectDevice - // for example if there are three device, if will return GPU on the first call, and then MYRIAD + // for example if there are three device, if will return GPU on the first call, and then NPU // at last CPU ON_CALL(*plugin, select_device(Property(&std::vector::size, Eq(selDevsSize)), _, _)) .WillByDefault(Return(metaDevices[deviceConfigs.size() - selDevsSize])); @@ -181,12 +181,12 @@ TEST_P(AutoLoadFailedTest, LoadCNNetWork) { // { true, false, GENERAL, 3 device, 2, 3, 2} // // there are three devices for loading -// CPU load for accelerator success, but GPU will load faild and then select MYRIAD and load again +// CPU load for accelerator success, but GPU will load faild and then select NPU and load again // LoadExeNetworkImpl will not throw exception and can continue to run, -// it will select twice, first select GPU, second select MYRIAD -// it will load network three times(CPU, GPU, MYRIAD) +// it will select twice, first select GPU, second select NPU +// it will load network three times(CPU, GPU, NPU) // the inference request num is loadSuccessCount * optimalNum, in this test case optimalNum is 2 -// so inference request num is 4 (CPU 2, MYRIAD 2) +// so inference request num is 4 (CPU 2, NPU 2) // const std::vector testConfigs = { ConfigParams{true, diff --git a/src/plugins/hetero/src/compiled_model.cpp b/src/plugins/hetero/src/compiled_model.cpp index 46e2419fd44b7a..7b8bf399286a8b 100644 --- a/src/plugins/hetero/src/compiled_model.cpp +++ b/src/plugins/hetero/src/compiled_model.cpp @@ -11,10 +11,13 @@ #include "ie_plugin_config.hpp" #include "itt.hpp" #include "openvino/op/util/op_types.hpp" +#include "openvino/pass/constant_folding.hpp" +#include "openvino/pass/manager.hpp" #include "openvino/runtime/internal_properties.hpp" #include "openvino/runtime/properties.hpp" #include "openvino/util/common_util.hpp" #include "plugin.hpp" +#include "properties.hpp" #include "xml_parse_utils.h" template @@ -55,6 +58,14 @@ ov::hetero::CompiledModel::CompiledModel(const std::shared_ptr& model if (std::getenv("OPENVINO_HETERO_VISUALIZE")) dumpDotFile = true; + // Calling of ConstantFolding in HETERO plugin is required because + // in some cases topology split is happening after constant subgraph. + // It may cause replacement of Constant by Parameter in such operations + // like Reshape/Transpose/Gather and lead to unexpected dynamism or exception + ov::pass::Manager manager; + manager.register_pass(); + manager.run_passes(model); + ov::SupportedOpsMap queryNetworkResult; auto orderedOps = model->get_ordered_ops(); @@ -664,7 +675,8 @@ ov::Any ov::hetero::CompiledModel::get_property(const std::string& name) const { std::vector ro_properties{ov::model_name, ov::optimal_number_of_infer_requests, ov::execution_devices, - ov::loaded_from_cache}; + ov::loaded_from_cache, + ov::hetero::number_of_submodels}; return ro_properties; }; const auto& to_string_vector = [](const std::vector& properties) { @@ -723,6 +735,8 @@ ov::Any ov::hetero::CompiledModel::get_property(const std::string& name) const { device_names.push_back(comp_model_desc.device); } return decltype(ov::execution_devices)::value_type{device_names}; + } else if (ov::hetero::number_of_submodels == name) { + return decltype(ov::hetero::number_of_submodels)::value_type{m_compiled_submodels.size()}; } return m_cfg.get(name); OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/plugins/hetero/src/properties.hpp b/src/plugins/hetero/src/properties.hpp index 799d07dbe7be1a..8ecd488bff98ca 100644 --- a/src/plugins/hetero/src/properties.hpp +++ b/src/plugins/hetero/src/properties.hpp @@ -13,5 +13,10 @@ namespace hetero { */ static constexpr Property caching_device_properties{"CACHING_DEVICE_PROPERTIES"}; +/** + * @brief Read-only property showing number of compiled submodels + */ +static constexpr Property number_of_submodels{"HETERO_NUMBER_OF_SUBMODELS"}; + } // namespace hetero } // namespace ov diff --git a/src/plugins/hetero/tests/functional/compile_model_tests.cpp b/src/plugins/hetero/tests/functional/compile_model_tests.cpp index 9fb2745f5944ff..bfcd0ca1c8bb90 100644 --- a/src/plugins/hetero/tests/functional/compile_model_tests.cpp +++ b/src/plugins/hetero/tests/functional/compile_model_tests.cpp @@ -42,6 +42,20 @@ TEST_F(HeteroTests, compile_without_device_priorities_throw) { EXPECT_THROW(core.compile_model(model, "HETERO"), ov::Exception); } +TEST_F(HeteroTests, compile_dynamic_model_fail) { + // Change device priority + core.set_property("HETERO", ov::device::priorities("MOCK0,MOCK1")); + auto model = create_model_with_subtract_reshape(true); + EXPECT_THROW(core.compile_model(model, "HETERO"), ov::Exception); +} + +TEST_F(HeteroTests, compile_model_shapeof) { + // Change device priority + core.set_property("HETERO", ov::device::priorities("MOCK0,MOCK1")); + auto model = create_model_with_subtract_shapeof_reshape(); + EXPECT_NO_THROW(core.compile_model(model, "HETERO")); +} + TEST_F(HeteroTests, compile_with_device_properties) { ov::AnyMap config = {ov::device::priorities("MOCK0,MOCK1"), ov::device::properties("MOCK0", ov::num_streams(4), ov::enable_profiling(false)), diff --git a/src/plugins/hetero/tests/functional/hetero_tests.cpp b/src/plugins/hetero/tests/functional/hetero_tests.cpp index f8d1f5ea91c814..4228a5c14ce8e6 100644 --- a/src/plugins/hetero/tests/functional/hetero_tests.cpp +++ b/src/plugins/hetero/tests/functional/hetero_tests.cpp @@ -12,6 +12,8 @@ #include "openvino/core/any.hpp" #include "openvino/core/except.hpp" #include "openvino/opsets/opset11.hpp" +#include "openvino/pass/constant_folding.hpp" +#include "openvino/pass/manager.hpp" #include "openvino/pass/serialize.hpp" #include "openvino/runtime/exec_model_info.hpp" #include "openvino/runtime/internal_properties.hpp" @@ -22,6 +24,7 @@ #include "openvino/runtime/properties.hpp" #include "openvino/util/file_util.hpp" #include "openvino/util/shared_object.hpp" +#include "transformations/init_node_info.hpp" #include "transformations/rt_info/fused_names_attribute.hpp" namespace { @@ -67,8 +70,9 @@ ov::Tensor ov::hetero::tests::HeteroTests::create_and_fill_tensor(const ov::elem OPENVINO_THROW("Cannot generate tensor. Unsupported element type."); } -std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract() { - auto param = std::make_shared(ov::element::i64, ov::Shape{1, 3, 2, 2}); +std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract(bool dynamic) { + int64_t bs = dynamic ? -1 : 1; + auto param = std::make_shared(ov::element::i64, ov::PartialShape{bs, 3, 2, 2}); param->set_friendly_name("input"); auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1, 1, 1}, {1}); const_value->set_friendly_name("const_val"); @@ -81,8 +85,9 @@ std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_sub return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{param}); } -std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract_reshape() { - auto param = std::make_shared(ov::element::i64, ov::Shape{1, 3, 2, 2}); +std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract_reshape(bool dynamic) { + int64_t bs = dynamic ? -1 : 1; + auto param = std::make_shared(ov::element::i64, ov::PartialShape{bs, 3, 2, 2}); param->set_friendly_name("input"); auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1, 1, 1}, {1}); const_value->set_friendly_name("const_val"); @@ -99,8 +104,9 @@ std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_sub return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{param}); } -std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract_reshape_relu() { - auto param = std::make_shared(ov::element::i64, ov::Shape{1, 3, 2, 2}); +std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract_reshape_relu(bool dynamic) { + int64_t bs = dynamic ? -1 : 1; + auto param = std::make_shared(ov::element::i64, ov::PartialShape{bs, 3, 2, 2}); param->set_friendly_name("input"); auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1, 1, 1}, {1}); const_value->set_friendly_name("const_val"); @@ -119,8 +125,9 @@ std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_sub return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{param}); } -std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_reshape() { - auto param = std::make_shared(ov::element::i64, ov::Shape{1, 3, 2, 2}); +std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_reshape(bool dynamic) { + int64_t bs = dynamic ? -1 : 1; + auto param = std::make_shared(ov::element::i64, ov::PartialShape{bs, 3, 2, 2}); param->set_friendly_name("input"); auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1, 1, 1}, {1}); const_value->set_friendly_name("const_val"); @@ -135,6 +142,27 @@ std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_res return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{param}); } +std::shared_ptr ov::hetero::tests::HeteroTests::create_model_with_subtract_shapeof_reshape(bool dynamic) { + int64_t bs = dynamic ? -1 : 1; + auto param = std::make_shared(ov::element::i64, ov::PartialShape{bs, 3, 2, 2}); + param->set_friendly_name("input"); + auto reshape_val0 = ov::opset11::Constant::create(ov::element::i64, ov::Shape{2}, {bs, 12}); + reshape_val0->set_friendly_name("reshape_val0"); + auto reshape0 = std::make_shared(param, reshape_val0, true); + reshape0->set_friendly_name("reshape0"); + auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1}, {1}); + const_value->set_friendly_name("const_val"); + auto subtract = std::make_shared(reshape0, const_value); + subtract->set_friendly_name("sub"); + auto shape_of = std::make_shared(param); + shape_of->set_friendly_name("shape_of"); + auto reshape1 = std::make_shared(subtract, shape_of, true); + reshape1->set_friendly_name("reshape1"); + auto result = std::make_shared(reshape1); + result->set_friendly_name("res"); + return std::make_shared(ov::ResultVector{result}, ov::ParameterVector{param}); +} + // Mock plugins class MockCompiledModel : public ov::ICompiledModel { @@ -386,8 +414,11 @@ class MockCustomRemoteContext : public ov::IRemoteContext { class MockPluginBase : public ov::IPlugin { public: - MockPluginBase(const std::string& name, const std::unordered_set& supported_ops) - : m_supported_ops(supported_ops) { + MockPluginBase(const std::string& name, + const std::unordered_set& supported_ops, + bool dynamism_supported = false) + : m_supported_ops(supported_ops), + m_dynamism_supported(dynamism_supported) { set_device_name(name); } @@ -501,10 +532,24 @@ class MockPluginBase : public ov::IPlugin { auto device_id = properties.count(ov::device::id.name()) ? properties.at(ov::device::id.name()).as() : m_default_device_id; - for (const auto& op : model->get_ordered_ops()) { - if (m_supported_ops.find(op->get_type_info().name) == m_supported_ops.end()) - continue; - res[op->get_friendly_name()] = get_device_name() + "." + device_id; + + auto supported = ov::get_supported_nodes( + model, + [&](std::shared_ptr& model) { + ov::pass::Manager manager; + manager.register_pass(); + manager.register_pass(); + manager.run_passes(model); + }, + [&](const std::shared_ptr& op) { + if (op->is_dynamic() && !m_dynamism_supported) + return false; + if (m_supported_ops.find(op->get_type_info().name) == m_supported_ops.end()) + return false; + return true; + }); + for (auto&& op_name : supported) { + res.emplace(op_name, get_device_name() + "." + device_id); } return res; } @@ -512,6 +557,7 @@ class MockPluginBase : public ov::IPlugin { protected: std::string m_default_device_id = "0"; std::unordered_set m_supported_ops; + bool m_dynamism_supported = false; bool m_profiling = false; bool m_loaded_from_cache{false}; }; @@ -519,7 +565,7 @@ class MockPluginBase : public ov::IPlugin { class MockPluginReshape : public MockPluginBase { public: MockPluginReshape(const std::string& name) - : MockPluginBase(name, {"Parameter", "Result", "Add", "Constant", "Reshape"}) {} + : MockPluginBase(name, {"Parameter", "Result", "Add", "Constant", "Reshape"}, true) {} const ov::Version& get_const_version() override { static const ov::Version version = {CI_BUILD_NUMBER, "openvino_mock_reshape_plugin"}; diff --git a/src/plugins/hetero/tests/functional/hetero_tests.hpp b/src/plugins/hetero/tests/functional/hetero_tests.hpp index b2af29f19472a5..7b6e5f85fad0ee 100644 --- a/src/plugins/hetero/tests/functional/hetero_tests.hpp +++ b/src/plugins/hetero/tests/functional/hetero_tests.hpp @@ -20,10 +20,11 @@ class HeteroTests : public ::testing::Test { void SetUp() override; - std::shared_ptr create_model_with_subtract(); - std::shared_ptr create_model_with_subtract_reshape(); - std::shared_ptr create_model_with_subtract_reshape_relu(); - std::shared_ptr create_model_with_reshape(); + std::shared_ptr create_model_with_subtract(bool dynamic = false); + std::shared_ptr create_model_with_subtract_reshape(bool dynamic = false); + std::shared_ptr create_model_with_subtract_reshape_relu(bool dynamic = false); + std::shared_ptr create_model_with_reshape(bool dynamic = false); + std::shared_ptr create_model_with_subtract_shapeof_reshape(bool dynamic = false); ov::Tensor create_and_fill_tensor(const ov::element::Type& type, const ov::Shape& shape); private: diff --git a/src/plugins/hetero/tests/functional/query_model_tests.cpp b/src/plugins/hetero/tests/functional/query_model_tests.cpp index 9df8c2b110abcf..4563cdd726b7f0 100644 --- a/src/plugins/hetero/tests/functional/query_model_tests.cpp +++ b/src/plugins/hetero/tests/functional/query_model_tests.cpp @@ -37,8 +37,14 @@ TEST_F(HeteroTests, query_model_on_mock1) { EXPECT_EQ(op.second, dev_name); names.erase(op.first); } - EXPECT_EQ(1, names.size()); - EXPECT_EQ("reshape", *names.begin()); + const std::vector unmarked_names = {"reshape_val", "reshape", "res"}; + EXPECT_EQ(unmarked_names.size(), names.size()); + for (auto& name : unmarked_names) { + auto it = names.find(name); + if (it != names.end()) + names.erase(it); + } + EXPECT_EQ(0, names.size()); } TEST_F(HeteroTests, query_model_on_mixed) { @@ -65,3 +71,30 @@ TEST_F(HeteroTests, query_model_on_mixed) { } EXPECT_EQ(0, names.size()); } + +TEST_F(HeteroTests, query_dynamic_model_on_mixed) { + const std::string dev_name0 = "MOCK0.3"; + const std::string dev_name1 = "MOCK1.2"; + ov::AnyMap config = {ov::device::priorities(dev_name0 + "," + dev_name1)}; + const auto model = create_model_with_subtract_reshape(true); + std::set supported_ops_mock0; + for (auto& op : core.query_model(model, dev_name0)) { + if (op.second == dev_name0) + supported_ops_mock0.insert(op.first); + } + const auto supported_ops = core.query_model(model, "HETERO", config); + std::unordered_set names; + for (const auto& op : model->get_ops()) { + names.insert(op->get_friendly_name()); + } + for (const auto& op : supported_ops) { + if (supported_ops_mock0.count(op.first)) + EXPECT_EQ(op.second, dev_name0); + else + EXPECT_EQ(op.second, dev_name1); + names.erase(op.first); + } + EXPECT_EQ(1, names.size()); + // fallback plugin doesn't support dynamism + ASSERT_TRUE(names.count("sub")); +} diff --git a/src/plugins/intel_cpu/thirdparty/mlas b/src/plugins/intel_cpu/thirdparty/mlas index 1d68240b511432..c215a2c97b47ed 160000 --- a/src/plugins/intel_cpu/thirdparty/mlas +++ b/src/plugins/intel_cpu/thirdparty/mlas @@ -1 +1 @@ -Subproject commit 1d68240b5114326604c3f5af47ac1c098e30b254 +Subproject commit c215a2c97b47ed01be7675f75bc463c820ac6e6d diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp index 3bdc74faea71d2..02c86cb80d0af1 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp @@ -20,8 +20,7 @@ struct random_uniform : public primitive_base { random_uniform() : primitive_base("", {}), global_seed(0), op_seed(0), - output_shape{}, - output_format(format::type::any) {} + output_shape{} {} DECLARE_OBJECT_TYPE_SERIALIZATION @@ -36,20 +35,26 @@ struct random_uniform : public primitive_base { */ random_uniform(const primitive_id &id, const std::vector &inputs, const data_types &data_type, const uint64_t global_seed, - const uint64_t op_seed, const tensor output_shape, - const format output_format, + const uint64_t op_seed, const ov::Shape output_shape, const padding &output_padding = padding()) : primitive_base(id, inputs, {output_padding}, {optional_data_type{data_type}}), global_seed(global_seed), op_seed(op_seed), - output_shape(output_shape), - output_format(output_format) {} + output_shape(output_shape) {} + + random_uniform(const primitive_id &id, const std::vector &inputs, + const data_types &data_type, const uint64_t global_seed, + const uint64_t op_seed, const padding &output_padding = padding()) + : primitive_base(id, inputs, {output_padding}, + {optional_data_type{data_type}}), + global_seed(global_seed), + op_seed(op_seed), + output_shape() {} const uint64_t global_seed; const uint64_t op_seed; - const tensor output_shape; - const format output_format; + const ov::Shape output_shape; size_t hash() const override { size_t seed = primitive::hash(); @@ -73,17 +78,13 @@ struct random_uniform : public primitive_base { ob << global_seed; ob << op_seed; ob << output_shape; - ob << make_data(&output_format.value, sizeof(format::type)); } void load(BinaryInputBuffer& ib) override { primitive_base::load(ib); ib >> *const_cast(&global_seed); ib >> *const_cast(&op_seed); - ib >> *const_cast(&output_shape); - format::type tmp_type = format::type::any; - ib >> make_data(&tmp_type, sizeof(format::type)); - *const_cast(&output_format) = format(tmp_type); + ib >> *const_cast(&output_shape); } }; diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/debug_configuration.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/debug_configuration.hpp index ea632ee4ac584b..febf41a557f6e9 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/runtime/debug_configuration.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/debug_configuration.hpp @@ -121,6 +121,7 @@ class debug_configuration { std::vector forced_impl_types; // Force implementation type either ocl or onednn int max_kernels_per_batch; // Maximum number of kernels in a batch during compiling kernels int disable_async_compilation; // Disable async compilation + int disable_winograd_conv; // Disable Winograd conv int disable_dynamic_impl; // Disable dynamic implementation int disable_runtime_buffer_fusing; // Disable runtime buffer fusing int disable_memory_reuse; // Disable memmory reuse among layers diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/memory.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/memory.hpp index 2e6ceedbee7105..647a10581b4b65 100644 --- a/src/plugins/intel_gpu/include/intel_gpu/runtime/memory.hpp +++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/memory.hpp @@ -9,8 +9,6 @@ #include "event.hpp" #include "engine_configuration.hpp" -#include "ngraph/runtime/host_tensor.hpp" - #include #ifdef ENABLE_ONEDNN_FOR_GPU @@ -247,16 +245,4 @@ inline std::vector read_vector(cldnn::memory::ptr mem, const cldnn::stream& s return out_vecs; } -inline std::shared_ptr make_host_tensor(layout l, void* memory_pointer) { - ov::element::Type et = data_type_to_element_type(l.data_type); - - return std::make_shared(et, l.get_shape(), memory_pointer); -} - -inline ov::Tensor make_tensor(layout l, void* memory_pointer) { - ov::element::Type et = data_type_to_element_type(l.data_type); - - return ov::Tensor(et, l.get_shape(), memory_pointer); -} - } // namespace cldnn diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor_accessor.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor_accessor.hpp new file mode 100644 index 00000000000000..1072c1bdf7fe80 --- /dev/null +++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor_accessor.hpp @@ -0,0 +1,89 @@ +// Copyright (C) 2018-2023 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "openvino/runtime/tensor.hpp" +#include "tensor_data_accessor.hpp" + +#include "memory.hpp" +#include "layout.hpp" + +namespace cldnn { + +inline ov::Tensor make_tensor(const layout& l, void* memory_pointer) { + ov::element::Type et = data_type_to_element_type(l.data_type); + + return ov::Tensor(et, l.get_shape(), memory_pointer); +} + +struct TensorsContainer final { + using MemoryMap = std::unordered_map; + using TensorsMap = std::unordered_map; + + TensorsContainer(const cldnn::stream* stream, const std::map& deps_map = {}) + : m_stream(stream) + , m_memories(deps_map.begin(), deps_map.end()) { } + + ~TensorsContainer() { + for (auto& port : m_locked_memories) { + m_memories.at(port)->unlock(*m_stream); + } + } + + void emplace(size_t port, cldnn::memory::ptr mem) { + m_memories.emplace(port, mem); + } + + void emplace(size_t port, const ov::Tensor& tensor) { + auto res = m_tensors.emplace(port, tensor); + OPENVINO_ASSERT(res.first != m_tensors.end()); + } + + template + void emplace(size_t port, std::vector& vector, data_types dt = data_types::i64) { + ov::Shape shape{vector.size()}; + auto tensor = make_tensor({shape, dt, format::bfyx}, static_cast(vector.data())); + m_tensors.emplace(port, tensor); + } + + size_t size() const { return m_tensors.size(); } + ov::Tensor operator[](std::size_t port) const { + if (m_memories.count(port) > 0) { + m_locked_memories.insert(port); + auto mem = m_memories.at(port); + auto ptr = mem->lock(*m_stream, cldnn::mem_lock_type::read); + return make_tensor(mem->get_layout(), ptr); + } else if (m_tensors.count(port) > 0) { + return m_tensors.at(port); + } else { + OPENVINO_THROW("[GPU] Can't get tensor for ", port, " port!\n"); + } + } + +private: + const cldnn::stream* m_stream; + MemoryMap m_memories; + TensorsMap m_tensors; + + mutable std::set m_locked_memories = {}; +}; + +class TensorAccessor final : public ov::ITensorAccessor { +public: + explicit TensorAccessor(const TensorsContainer& container) : m_container(container) { } + + ov::Tensor operator()(size_t port) const override { + return m_container[port]; + } + +private: + const TensorsContainer& m_container; +}; + +inline cldnn::TensorAccessor make_tensor_accessor(const TensorsContainer& c) { + return cldnn::TensorAccessor(c); +} + +} // namespace cldnn diff --git a/src/plugins/intel_gpu/src/graph/CMakeLists.txt b/src/plugins/intel_gpu/src/graph/CMakeLists.txt index efefc017cc6a0e..1f46bdfa82bb48 100644 --- a/src/plugins/intel_gpu/src/graph/CMakeLists.txt +++ b/src/plugins/intel_gpu/src/graph/CMakeLists.txt @@ -33,10 +33,9 @@ target_include_directories(${TARGET_NAME} PUBLIC target_compile_options(${TARGET_NAME} PRIVATE $<$:$,/Os,-Os>>) -target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL) +target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL ov_shape_inference) target_link_libraries(${TARGET_NAME} PRIVATE openvino_intel_gpu_kernels openvino_intel_gpu_runtime - ov_shape_inference openvino::itt openvino::runtime::dev openvino::runtime) diff --git a/src/plugins/intel_gpu/src/graph/arg_max_min.cpp b/src/plugins/intel_gpu/src/graph/arg_max_min.cpp index 28e3d41cae04d4..47303ece86cd82 100644 --- a/src/plugins/intel_gpu/src/graph/arg_max_min.cpp +++ b/src/plugins/intel_gpu/src/graph/arg_max_min.cpp @@ -87,17 +87,17 @@ std::vector arg_max_min_inst::calc_output_layouts(arg_max_min_node const auto& constant_mem = impl_param.memory_deps; if (desc->top_k > 0) { - std::map const_data; + std::unordered_map const_data; auto topk = desc->top_k; - auto top_k_tensor = std::make_shared(ov::element::u32, ov::Shape{1}, static_cast(&topk)); + auto top_k_tensor = ov::Tensor(ov::element::u32, ov::Shape{1}, static_cast(&topk)); const_data = { {1, top_k_tensor} }; output_shapes = ov::op::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); } else if (constant_mem.count(1)) { - std::map const_data; + std::unordered_map const_data; auto target_shape_mem = constant_mem.at(1); cldnn::mem_lock target_shape_lock(target_shape_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(target_shape_mem->get_layout(), target_shape_lock.data())); + const_data.emplace(1, make_tensor(target_shape_mem->get_layout(), target_shape_lock.data())); output_shapes = ov::op::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); } else { diff --git a/src/plugins/intel_gpu/src/graph/batch_to_space.cpp b/src/plugins/intel_gpu/src/graph/batch_to_space.cpp index 59f51491e26212..b09f2bab6b9bbd 100644 --- a/src/plugins/intel_gpu/src/graph/batch_to_space.cpp +++ b/src/plugins/intel_gpu/src/graph/batch_to_space.cpp @@ -112,7 +112,7 @@ std::vector batch_to_space_inst::calc_output_layouts(batch_to_space_node end_shape }; - std::map const_data; + std::unordered_map const_data; if (desc->shape_constant) { auto block_sizes = tensor_to_vec(block_data, input0_format); auto begin_sizes = tensor_to_vec(begin_data, input0_format); @@ -122,9 +122,9 @@ std::vector batch_to_space_inst::calc_output_layouts(batch_to_space_node auto begin_values = static_cast(begin_sizes.data()); auto end_values = static_cast(end_sizes.data()); - auto block_tensor = make_host_tensor({ block_shape, data_types::i32, input0_format }, block_values); - auto begin_tensor = make_host_tensor({ begin_shape, data_types::i32, input0_format }, begin_values); - auto end_tensor = make_host_tensor({ end_shape, data_types::i32, input0_format }, end_values); + auto block_tensor = make_tensor({ block_shape, data_types::i32, input0_format }, block_values); + auto begin_tensor = make_tensor({ begin_shape, data_types::i32, input0_format }, begin_values); + auto end_tensor = make_tensor({ end_shape, data_types::i32, input0_format }, end_values); const_data.emplace(1, block_tensor); const_data.emplace(2, begin_tensor); @@ -140,9 +140,9 @@ std::vector batch_to_space_inst::calc_output_layouts(batch_to_space_node cldnn::mem_lock lock2(begin_mem, impl_param.get_stream()); cldnn::mem_lock lock3(end_mem, impl_param.get_stream()); - auto block_tensor = make_host_tensor(block_mem->get_layout(), lock1.data()); - auto begin_tensor = make_host_tensor(begin_mem->get_layout(), lock2.data()); - auto end_tensor = make_host_tensor(end_mem->get_layout(), lock3.data()); + auto block_tensor = make_tensor(block_mem->get_layout(), lock1.data()); + auto begin_tensor = make_tensor(begin_mem->get_layout(), lock2.data()); + auto end_tensor = make_tensor(end_mem->get_layout(), lock3.data()); const_data.emplace(1, block_tensor); const_data.emplace(2, begin_tensor); diff --git a/src/plugins/intel_gpu/src/graph/border.cpp b/src/plugins/intel_gpu/src/graph/border.cpp index 2f5eef40093c4d..2e662781b01d4a 100644 --- a/src/plugins/intel_gpu/src/graph/border.cpp +++ b/src/plugins/intel_gpu/src/graph/border.cpp @@ -3,6 +3,7 @@ // #include "border_inst.h" +#include "intel_gpu/runtime/tensor_accessor.hpp" #include "pad_shape_inference.hpp" #include "intel_gpu/runtime/error_handler.hpp" @@ -41,85 +42,55 @@ std::vector border_inst::calc_output_layouts(border_node const& /*node*/ output_type = impl_param.get_fused_output_layout().data_type; } + size_t in_rank = input0_layout.get_partial_shape().size(); + ov::op::v1::Pad op; op.set_pad_mode(desc->pad_mode); const bool is_begin_mem = (desc->non_constant_input_mask & border::PAD_NON_CONST_INPUT::BEGIN); const bool is_end_mem = (desc->non_constant_input_mask & border::PAD_NON_CONST_INPUT::END); - layout pads_begin_layout, pads_end_layout; - if (is_begin_mem) { - pads_begin_layout = impl_param.get_input_layout(1); - } - if (is_end_mem) { - pads_end_layout = is_begin_mem ? impl_param.get_input_layout(2) : impl_param.get_input_layout(1); + const size_t begin_mem_idx = is_begin_mem ? 1 : 0; + const size_t end_mem_idx = is_begin_mem ? 2 : 1; + + auto& memory_deps = impl_param.memory_deps; + if ((is_begin_mem && memory_deps.count(begin_mem_idx) == 0) || + (is_end_mem && memory_deps.count(end_mem_idx) == 0)) { + return {layout{ShapeType::dynamic(static_cast(in_rank)), input0_layout.data_type, input0_layout.format}}; } - ShapeType pads_begin_shape = is_begin_mem ? pads_begin_layout.get() : ov::Shape{ desc->pads_begin.size() }; - ShapeType pads_end_shape = is_end_mem ? pads_end_layout.get() : ov::Shape{ desc->pads_end.size() }; - std::vector output_shapes; + int64_t begin_size = desc->pads_begin.size(); + int64_t end_size = desc->pads_end.size(); + + layout pads_begin_layout = is_begin_mem ? impl_param.get_input_layout(begin_mem_idx) : layout({ begin_size }, data_types::i64, format::bfyx); + layout pads_end_layout = is_end_mem ? impl_param.get_input_layout(end_mem_idx) : layout({ end_size }, data_types::i64, format::bfyx); + std::vector input_shapes = { input0_layout.get(), - pads_begin_shape, - pads_end_shape, + pads_begin_layout.get(), + pads_end_layout.get(), }; - auto& memory_deps = impl_param.memory_deps; - std::map const_data; - auto ta = ov::make_tensor_accessor(const_data); - - if ((is_begin_mem && memory_deps.count(1)) && (is_end_mem && memory_deps.count(2))) { - auto pads_begin_mem = memory_deps.at(1); - cldnn::mem_lock pads_begin_lock(pads_begin_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(pads_begin_mem->get_layout(), pads_begin_lock.data())); - - auto pads_end_mem = memory_deps.at(2); - cldnn::mem_lock pads_end_lock(pads_end_mem, impl_param.get_stream()); - const_data.emplace(2, make_host_tensor(pads_end_mem->get_layout(), pads_end_lock.data())); - - output_shapes = ov::op::shape_infer(&op, input_shapes, ta); - } else if ((is_begin_mem || is_end_mem) && memory_deps.count(1)) { - if (is_begin_mem) { - auto pads_begin_mem = memory_deps.at(1); - cldnn::mem_lock pads_begin_lock(pads_begin_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(pads_begin_mem->get_layout(), pads_begin_lock.data())); - - auto pads_end_data = desc->pads_end; - auto pads_end_tensor = make_host_tensor({pads_end_shape, data_types::i64, format::bfyx}, static_cast(pads_end_data.data())); - const_data.emplace(2, pads_end_tensor); - - output_shapes = ov::op::shape_infer(&op, input_shapes, ta); - } else { - auto pads_begin_data = desc->pads_begin; - auto pads_begin_tensor = make_host_tensor({pads_begin_shape, data_types::i64, format::bfyx}, static_cast(pads_begin_data.data())); - const_data.emplace(1, pads_begin_tensor); - - auto pads_end_mem = memory_deps.at(1); - cldnn::mem_lock pads_end_lock(pads_end_mem, impl_param.get_stream()); - const_data.emplace(2, make_host_tensor(pads_end_mem->get_layout(), pads_end_lock.data())); - - output_shapes = ov::op::shape_infer(&op, input_shapes, ta); - } - } else { - std::ptrdiff_t val = desc->pad_value; + TensorsContainer const_data(&impl_param.get_stream()); - auto pads_begin_data = desc->pads_begin; - if (is_begin_mem && desc->pad_mode == ov::op::PadMode::CONSTANT) { - pads_begin_data = {val, val, val, val}; - } - auto pads_begin_tensor = make_host_tensor({pads_begin_shape, data_types::i64, format::bfyx}, static_cast(pads_begin_data.data())); - const_data.emplace(1, pads_begin_tensor); + auto pads_begin_data = desc->pads_begin; + auto pads_end_data = desc->pads_end; - auto pads_end_data = desc->pads_end; - if (is_end_mem && desc->pad_mode == ov::op::PadMode::CONSTANT) { - pads_end_data = {val, val, val, val}; - } - auto pads_end_tensor = make_host_tensor({pads_end_shape, data_types::i64, format::bfyx}, static_cast(pads_end_data.data())); - const_data.emplace(2, pads_end_tensor); + if (is_begin_mem) { + const_data.emplace(1, memory_deps.at(begin_mem_idx)); + } else { + const_data.emplace(1, make_tensor(pads_begin_layout, static_cast(pads_begin_data.data()))); + } - output_shapes = ov::op::shape_infer(&op, input_shapes, ta); + if (is_end_mem) { + const_data.emplace(2, memory_deps.at(end_mem_idx)); + } else { + const_data.emplace(2, make_tensor(pads_end_layout, static_cast(pads_end_data.data()))); } + auto ta = cldnn::make_tensor_accessor(const_data); + std::vector output_shapes = ov::op::shape_infer(&op, input_shapes, ta); + format output_format = format::adjust_to_rank(input0_layout.format, output_shapes[0].size()); return { layout{output_shapes[0], output_type, output_format} }; diff --git a/src/plugins/intel_gpu/src/graph/broadcast.cpp b/src/plugins/intel_gpu/src/graph/broadcast.cpp index bc4eaab28a9816..fdce54766b26dd 100644 --- a/src/plugins/intel_gpu/src/graph/broadcast.cpp +++ b/src/plugins/intel_gpu/src/graph/broadcast.cpp @@ -61,11 +61,11 @@ std::vector broadcast_inst::calc_output_layouts(broadcast_node const& /* auto axes_mapping = desc->axes_mapping.to_vector(); ShapeType axes_mapping_shape = ov::Shape{axes_mapping.size()}; - std::map const_data; + std::unordered_map const_data; if (third_input_needed) { input_shapes.emplace_back(axes_mapping_shape); - auto axes_mapping_tensor = make_host_tensor({axes_mapping_shape, data_types::i64, format::bfyx}, + auto axes_mapping_tensor = make_tensor({axes_mapping_shape, data_types::i64, format::bfyx}, static_cast(axes_mapping.data())); const_data.emplace(2, axes_mapping_tensor); } @@ -74,12 +74,11 @@ std::vector broadcast_inst::calc_output_layouts(broadcast_node const& /* if (constant_mem.count(1)) { auto target_shape_mem = constant_mem.at(1); cldnn::mem_lock target_shape_lock(target_shape_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(target_shape_mem->get_layout(), target_shape_lock.data())); + const_data.emplace(1, make_tensor(target_shape_mem->get_layout(), target_shape_lock.data())); output_shapes = ov::op::v3::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); } else if (impl_param.input_layouts.size() == 1) { // predefined pattern shape - auto target_shape_tensor = make_host_tensor({pattern_shape, data_types::i64, format::bfyx}, - static_cast(target_shape.data())); + auto target_shape_tensor = make_tensor({pattern_shape, data_types::i64, format::bfyx}, static_cast(target_shape.data())); const_data.emplace(1, target_shape_tensor); output_shapes = ov::op::v3::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); } else if (impl_param.input_layouts.size() >= 2) { diff --git a/src/plugins/intel_gpu/src/graph/compilation_context.cpp b/src/plugins/intel_gpu/src/graph/compilation_context.cpp index 76bc86f48994f4..c1f483200c9a38 100644 --- a/src/plugins/intel_gpu/src/graph/compilation_context.cpp +++ b/src/plugins/intel_gpu/src/graph/compilation_context.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // - #include "compilation_context.hpp" #include #include @@ -22,9 +21,10 @@ class CompilationContext : public ICompilationContext { return; auto promise = std::make_shared>(); - futures.emplace_back(promise->get_future()); std::lock_guard lock(_mutex); + futures.emplace_back(promise->get_future()); + if (_task_keys.find(key) == _task_keys.end()) { _task_keys.insert(key); if (_task_executor != nullptr) { diff --git a/src/plugins/intel_gpu/src/graph/crop.cpp b/src/plugins/intel_gpu/src/graph/crop.cpp index 78b993d5d6ed99..f103738baeb864 100644 --- a/src/plugins/intel_gpu/src/graph/crop.cpp +++ b/src/plugins/intel_gpu/src/graph/crop.cpp @@ -56,17 +56,17 @@ std::vector crop_inst::calc_output_layouts(const crop_node& /*node*/, co // TODO: calling shape_infer for all cropped outpus is redundant... Need to optimize. if (desc->op_mode == cldnn::crop_ngraph_op_mode::variadic_split) { - std::map const_data; + std::unordered_map const_data; OPENVINO_ASSERT(impl_param.memory_deps.count(1) > 0, "[GPU] Can't find Crop(ngraph VariadicSplit op mode) axis values memory dependency"); auto axis_values_mem = impl_param.memory_deps.at(1); cldnn::mem_lock axis_values_mem_lock(axis_values_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(axis_values_mem->get_layout(), axis_values_mem_lock.data())); + const_data.emplace(1, make_tensor(axis_values_mem->get_layout(), axis_values_mem_lock.data())); if (impl_param.memory_deps.count(2) > 0) { auto split_length_mem = impl_param.memory_deps.at(2); cldnn::mem_lock split_length_mem_lock(split_length_mem, impl_param.get_stream()); - const_data.emplace(2, make_host_tensor(split_length_mem->get_layout(), split_length_mem_lock.data())); + const_data.emplace(2, make_tensor(split_length_mem->get_layout(), split_length_mem_lock.data())); ov::op::v1::VariadicSplit op; output_shapes = shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); @@ -76,12 +76,12 @@ std::vector crop_inst::calc_output_layouts(const crop_node& /*node*/, co return { layout{out_shape, input0_layout.data_type, input0_layout.format } }; } } else if (desc->op_mode == cldnn::crop_ngraph_op_mode::split) { - std::map const_data; + std::unordered_map const_data; OPENVINO_ASSERT(impl_param.memory_deps.count(1) > 0, "[GPU] Can't find Crop(ngraph Split op mode) axis values memory dependency"); auto axis_values_mem = impl_param.memory_deps.at(1); cldnn::mem_lock axis_values_mem_lock(axis_values_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(axis_values_mem->get_layout(), axis_values_mem_lock.data())); + const_data.emplace(1, make_tensor(axis_values_mem->get_layout(), axis_values_mem_lock.data())); ov::op::v1::Split op; op.set_num_splits(desc->num_splits); diff --git a/src/plugins/intel_gpu/src/graph/gather.cpp b/src/plugins/intel_gpu/src/graph/gather.cpp index daa3416ad3235d..985ac85131dd05 100644 --- a/src/plugins/intel_gpu/src/graph/gather.cpp +++ b/src/plugins/intel_gpu/src/graph/gather.cpp @@ -88,8 +88,8 @@ std::vector gather_inst::calc_output_layouts(gather_node const& /*node*/ int64_t axis = desc->axis; - auto axis_tensor = std::make_shared(ov::element::i64, ov::Shape{1}, static_cast(&axis)); - std::map> const_data = {{2, axis_tensor}}; + auto axis_tensor = ov::Tensor(ov::element::i64, ov::Shape{1}, static_cast(&axis)); + std::unordered_map const_data = {{2, axis_tensor}}; output_shapes = ov::op::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); format output_format = format::adjust_to_rank(input0_layout.format, output_shapes[0].size()); diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/add_required_reorders.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/add_required_reorders.cpp index 5f39d55342b9cd..a11964c38787ae 100644 --- a/src/plugins/intel_gpu/src/graph/graph_optimizer/add_required_reorders.cpp +++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/add_required_reorders.cpp @@ -27,11 +27,14 @@ If not than required reorder is added to the network. /* Add a reorder in between node and usr */ -void add_required_reorders::add_reorder(program& p, program_node* node, program_node* usr) { +void add_required_reorders::add_reorder(program& p, program_node* node, program_node* usr, bool keep_original_dt) { layout reorder_layout = node->get_output_layout(); reorder_layout.format = usr->get_output_layout().format; reorder_layout.data_type = usr->get_output_layout().data_type; + if (keep_original_dt) + reorder_layout.data_type = node->get_output_layout().data_type; + auto new_reorder = std::make_shared(node->id() + "_reorder_" + usr->id(), node->id(), reorder_layout); auto& new_reorder_node = p.get_or_create(new_reorder); new_reorder_node.set_output_layout(reorder_layout, false); @@ -376,8 +379,16 @@ void add_required_reorders::run(program& p) { continue; } - if (usr->get_output_layout() != node.first->get_output_layout()) - add_reorder(p, node.first, usr); + if (usr->get_output_layout() != node.first->get_output_layout()) { + // Preserve original data type to prevent Convolution input data type from changing + // in the following sequence: Node(U8, unsupported format) -> Conv(FP16, bfyx). + // Without this condition, inserted reorder will change Conv's input to FP16, instead of + // expected U8 format. + bool keep_original_dt = false; + if (usr->is_type()) + keep_original_dt = true; + add_reorder(p, node.first, usr, keep_original_dt); + } } } } diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/range.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/range.cpp index a482925dfd8bec..e4318334b17060 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/range.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/range.cpp @@ -46,8 +46,8 @@ struct range_impl : public typed_primitive_impl { auto ev = stream.create_user_event(false); auto params = instance.get_impl_params(); - ov::HostTensorVector input_host_tensors; - ov::HostTensorVector output_host_tensors; + ov::TensorVector input_host_tensors; + ov::TensorVector output_host_tensors; std::vector input_mem_ptrs; for (size_t i = 0; i < instance.dependencies().size(); i++) @@ -58,9 +58,9 @@ struct range_impl : public typed_primitive_impl { cldnn::mem_lock output_lock(output_mem_ptr, stream); for (size_t i = 0; i < input_mem_ptrs.size(); i++) - input_host_tensors.push_back(make_host_tensor(params->input_layouts[i], input_mem_ptrs[i]->lock(stream, mem_lock_type::read))); + input_host_tensors.push_back(make_tensor(params->input_layouts[i], input_mem_ptrs[i]->lock(stream, mem_lock_type::read))); - output_host_tensors.push_back(make_host_tensor(params->output_layouts[0], output_lock.data())); + output_host_tensors.push_back(make_tensor(params->output_layouts[0], output_lock.data())); if (!op) { const auto output_dt = params->get_output_layout().data_type; diff --git a/src/plugins/intel_gpu/src/graph/include/pass_manager.h b/src/plugins/intel_gpu/src/graph/include/pass_manager.h index 2ea466764d5131..de9ec170096d22 100644 --- a/src/plugins/intel_gpu/src/graph/include/pass_manager.h +++ b/src/plugins/intel_gpu/src/graph/include/pass_manager.h @@ -57,7 +57,7 @@ class add_required_reorders : public base_pass { private: void run(program& p) override; - void add_reorder(program& p, program_node* node, program_node* usr); + void add_reorder(program& p, program_node* node, program_node* usr, bool keep_original_dt = false); }; class add_reshape_to_primitives : public base_pass { diff --git a/src/plugins/intel_gpu/src/graph/include/primitive_inst.h b/src/plugins/intel_gpu/src/graph/include/primitive_inst.h index 098b44226aa4dd..3244ad20b49869 100644 --- a/src/plugins/intel_gpu/src/graph/include/primitive_inst.h +++ b/src/plugins/intel_gpu/src/graph/include/primitive_inst.h @@ -8,6 +8,7 @@ #include "intel_gpu/runtime/event.hpp" #include "intel_gpu/runtime/memory.hpp" #include "intel_gpu/runtime/lru_cache.hpp" +#include "intel_gpu/runtime/tensor_accessor.hpp" #include "intel_gpu/graph/network.hpp" #include "intel_gpu/runtime/utils.hpp" #include "program_node.h" diff --git a/src/plugins/intel_gpu/src/graph/include/program_node.h b/src/plugins/intel_gpu/src/graph/include/program_node.h index b455b6e740b937..fb254ba757888d 100644 --- a/src/plugins/intel_gpu/src/graph/include/program_node.h +++ b/src/plugins/intel_gpu/src/graph/include/program_node.h @@ -386,8 +386,16 @@ struct program_node { std::vector& get_fused_primitives() { return fused_prims; } #ifdef ENABLE_ONEDNN_FOR_GPU - const std::shared_ptr& get_onednn_primitive_attributes() const { return onednn_attrs; } - std::shared_ptr& get_onednn_primitive_attributes() { return onednn_attrs; } + const std::shared_ptr& get_onednn_primitive_attributes() const { + if (onednn_attrs == nullptr) + const_cast(this)->init_onednn_primitive_attributes(); + return onednn_attrs; + } + std::shared_ptr& get_onednn_primitive_attributes() { + if (onednn_attrs == nullptr) + init_onednn_primitive_attributes(); + return onednn_attrs; + } const std::vector& get_fused_primitives_onednn() const { return fused_prims_onednn; } std::vector& get_fused_primitives_onednn() { return fused_prims_onednn; } diff --git a/src/plugins/intel_gpu/src/graph/include/random_uniform_inst.h b/src/plugins/intel_gpu/src/graph/include/random_uniform_inst.h index 4768a702d0833b..fa44522d019bee 100644 --- a/src/plugins/intel_gpu/src/graph/include/random_uniform_inst.h +++ b/src/plugins/intel_gpu/src/graph/include/random_uniform_inst.h @@ -9,6 +9,17 @@ namespace cldnn { +template <> +struct typed_program_node : public typed_program_node_base { + using parent = typed_program_node_base; + +public: + using parent::parent; + + program_node& input(size_t index = 0) const { return get_dependency(index); } + std::vector get_shape_infer_dependencies() const override { return {0}; } +}; + using random_uniform_node = typed_program_node; template<> @@ -17,6 +28,8 @@ class typed_primitive_inst : public typed_primitive_inst_base + static std::vector calc_output_layouts(random_uniform_node const& /*node*/, const kernel_impl_params& impl_param); static layout calc_output_layout(random_uniform_node const &node, kernel_impl_params const& impl_param); static std::string to_string(random_uniform_node const &node); diff --git a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp index 00f75f37fb7765..005b9a218233a5 100644 --- a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp +++ b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp @@ -505,6 +505,10 @@ bool should_use_winograd_2x3_s1(const convolution_node& node, return false; // cases when NOT to use winograd + GPU_DEBUG_GET_INSTANCE(debug_config); + GPU_DEBUG_IF(debug_config->disable_winograd_conv == 1) + return false; + auto prim = node.get_primitive(); if (input_layout.data_type != data_types::f16 || input_layout.feature() % 64 != 0 // current algorithm is effective for ifm to be multiply of 64 diff --git a/src/plugins/intel_gpu/src/graph/non_max_suppression.cpp b/src/plugins/intel_gpu/src/graph/non_max_suppression.cpp index 0ed005788965d4..bc156ccc75fda4 100644 --- a/src/plugins/intel_gpu/src/graph/non_max_suppression.cpp +++ b/src/plugins/intel_gpu/src/graph/non_max_suppression.cpp @@ -38,12 +38,12 @@ std::vector non_max_suppression_inst::calc_output_layouts(non_max_suppre }; auto& memory_deps = impl_param.memory_deps; - std::map const_data; + std::unordered_map const_data; if (memory_deps.count(2)) { auto max_output_boxes_per_class_mem = memory_deps.at(2); cldnn::mem_lock max_output_boxes_per_class_lock(max_output_boxes_per_class_mem, impl_param.get_stream()); - auto max_output_boxes_per_class_tensor = make_host_tensor(max_output_boxes_per_class_mem->get_layout(), + auto max_output_boxes_per_class_tensor = make_tensor(max_output_boxes_per_class_mem->get_layout(), max_output_boxes_per_class_lock.data()); const_data.emplace(2, max_output_boxes_per_class_tensor); diff --git a/src/plugins/intel_gpu/src/graph/one_hot.cpp b/src/plugins/intel_gpu/src/graph/one_hot.cpp index 32dd93633bed0c..01116bd987c263 100644 --- a/src/plugins/intel_gpu/src/graph/one_hot.cpp +++ b/src/plugins/intel_gpu/src/graph/one_hot.cpp @@ -67,8 +67,8 @@ std::vector one_hot_inst::calc_output_layouts(const one_hot_node& /*node int64_t depth = desc->depth; - auto depth_tensor = std::make_shared(ov::element::i64, ov::Shape{1}, static_cast(&depth)); - std::map> const_data = { + auto depth_tensor = ov::Tensor(ov::element::i64, ov::Shape{1}, static_cast(&depth)); + std::unordered_map const_data = { {1, depth_tensor} }; std::vector output_shapes = diff --git a/src/plugins/intel_gpu/src/graph/prior_box.cpp b/src/plugins/intel_gpu/src/graph/prior_box.cpp index 191d3cc947dba0..899f0db6f2ba4a 100644 --- a/src/plugins/intel_gpu/src/graph/prior_box.cpp +++ b/src/plugins/intel_gpu/src/graph/prior_box.cpp @@ -440,7 +440,7 @@ std::vector prior_box_inst::calc_output_layouts(prior_box_node const& /* impl_param.get_input_layout(1).get() }; std::vector output_shapes = {ShapeType()}; - std::map const_data; + std::unordered_map const_data; auto& memory_deps = impl_param.memory_deps; @@ -451,7 +451,7 @@ std::vector prior_box_inst::calc_output_layouts(prior_box_node const& /* cldnn::mem_lock output_size_lock(output_size_mem, impl_param.get_stream()); cldnn::mem_lock img_size_lock(img_size_mem, impl_param.get_stream()); - const_data.emplace(0, make_host_tensor(output_size_mem->get_layout(), output_size_lock.data())); + const_data.emplace(0, make_tensor(output_size_mem->get_layout(), output_size_lock.data())); auto p_param = const_cast(&impl_param); if (output_size_mem->get_layout().data_type == cldnn::data_types::i64) { diff --git a/src/plugins/intel_gpu/src/graph/random_uniform.cpp b/src/plugins/intel_gpu/src/graph/random_uniform.cpp index 325f180608ca89..6d665caa4890c0 100644 --- a/src/plugins/intel_gpu/src/graph/random_uniform.cpp +++ b/src/plugins/intel_gpu/src/graph/random_uniform.cpp @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include "random_uniform_inst.h" #include "primitive_type_base.h" -#include -#include -#include +#include "json_object.h" + +#include "random_uniform_shape_inference.hpp" namespace cldnn { GPU_DEFINE_PRIMITIVE_TYPE_ID(random_uniform) @@ -17,9 +17,56 @@ random_uniform_inst::typed_primitive_inst(network& network, random_uniform_node layout random_uniform_inst::calc_output_layout(random_uniform_node const &node, kernel_impl_params const& impl_param) { auto primitive = impl_param.typed_desc(); - return {*primitive->output_data_types[0], primitive->output_format, primitive->output_shape}; + auto format = format::get_default_format(primitive->output_shape.size()); + + return {primitive->output_shape, *primitive->output_data_types[0], format}; } +template +std::vector random_uniform_inst::calc_output_layouts(random_uniform_node const& /*node*/, kernel_impl_params const& impl_param) { + auto desc = impl_param.typed_desc(); + auto output_data_type = desc->output_data_types[0].value_or(impl_param.get_input_layout().data_type); + + std::vector output_shapes; + std::vector input_shapes = { impl_param.get_input_layout(0).get_partial_shape(), + impl_param.get_input_layout(1).get_partial_shape(), + impl_param.get_input_layout(2).get_partial_shape() }; + + auto& memory_deps = impl_param.memory_deps; + std::unordered_map const_data; + + auto run_shape_infer = [&]() { + ov::op::v8::RandomUniform op; + if (memory_deps.count(1) > 0 && memory_deps.count(2) > 0) { + auto min_val = memory_deps.at(1); + cldnn::mem_lock min_val_lock(min_val, impl_param.get_stream()); + const_data.emplace(1, make_tensor(min_val->get_layout(), min_val_lock.data())); + + auto max_val = memory_deps.at(2); + cldnn::mem_lock max_val_lock(max_val, impl_param.get_stream()); + const_data.emplace(2, make_tensor(max_val->get_layout(), max_val_lock.data())); + + return ov::op::v8::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); + } else { + return ov::op::v8::shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); + } + }; + + if (memory_deps.count(0) > 0) { + auto output_shape = memory_deps.at(0); + cldnn::mem_lock output_shape_lock(output_shape, impl_param.get_stream()); + const_data.emplace(0, make_tensor(output_shape->get_layout(), output_shape_lock.data())); + + output_shapes = run_shape_infer(); + } else { + output_shapes = run_shape_infer(); + } + + return { layout{output_shapes[0], output_data_type, format::get_default_format(output_shapes[0].size())} }; +} + +template std::vector random_uniform_inst::calc_output_layouts(random_uniform_node const& node, const kernel_impl_params& impl_param); + std::string random_uniform_inst::to_string(random_uniform_node const &node) { auto node_info = node.desc_to_json(); json_composite random_uniform_info; diff --git a/src/plugins/intel_gpu/src/graph/range.cpp b/src/plugins/intel_gpu/src/graph/range.cpp index c1dae775f19ee2..0b57793bb6650a 100644 --- a/src/plugins/intel_gpu/src/graph/range.cpp +++ b/src/plugins/intel_gpu/src/graph/range.cpp @@ -34,21 +34,21 @@ std::vector range_inst::calc_output_layouts(range_node const& /*node*/, std::vector output_shapes = {ShapeType::dynamic(1)}; std::vector input_shapes = {ov::Shape(), ov::Shape(), ov::Shape()}; - std::map const_data; + std::unordered_map const_data; auto& memory_deps = impl_param.memory_deps; if (memory_deps.count(0) > 0 && memory_deps.count(1) > 0 && memory_deps.count(2) > 0) { auto start_mem = memory_deps.at(0); cldnn::mem_lock start_mem_lock(start_mem, impl_param.get_stream()); - const_data.emplace(0, make_host_tensor(start_mem->get_layout(), start_mem_lock.data())); + const_data.emplace(0, make_tensor(start_mem->get_layout(), start_mem_lock.data())); auto stop_mem = memory_deps.at(1); cldnn::mem_lock stop_mem_lock(stop_mem, impl_param.get_stream()); - const_data.emplace(1, make_host_tensor(stop_mem->get_layout(), stop_mem_lock.data())); + const_data.emplace(1, make_tensor(stop_mem->get_layout(), stop_mem_lock.data())); auto step_mem = memory_deps.at(2); cldnn::mem_lock step_mem_lock(step_mem, impl_param.get_stream()); - const_data.emplace(2, make_host_tensor(step_mem->get_layout(), step_mem_lock.data())); + const_data.emplace(2, make_tensor(step_mem->get_layout(), step_mem_lock.data())); output_shapes = shape_infer(&op, input_shapes, ov::make_tensor_accessor(const_data)); } diff --git a/src/plugins/intel_gpu/src/graph/reduce.cpp b/src/plugins/intel_gpu/src/graph/reduce.cpp index d5a66fb0acb2d0..ee57a7984a4173 100644 --- a/src/plugins/intel_gpu/src/graph/reduce.cpp +++ b/src/plugins/intel_gpu/src/graph/reduce.cpp @@ -107,8 +107,8 @@ std::vector reduce_inst::calc_output_layouts(reduce_node const& /*node*/ std::vector output_shapes = {ShapeType()}; auto axes = desc->axes; - auto axes_tensor = std::make_shared(ov::element::i64, ov::Shape{axes.size()}, axes.data()); - std::map> const_data = {{1, axes_tensor}}; + auto axes_tensor = ov::Tensor(ov::element::i64, ov::Shape{axes.size()}, axes.data()); + std::unordered_map const_data = {{1, axes_tensor}}; auto ta = ov::make_tensor_accessor(const_data); // shape infer by mode diff --git a/src/plugins/intel_gpu/src/graph/reshape.cpp b/src/plugins/intel_gpu/src/graph/reshape.cpp index 2d04188a3c3a7d..9fc276469fb7c8 100644 --- a/src/plugins/intel_gpu/src/graph/reshape.cpp +++ b/src/plugins/intel_gpu/src/graph/reshape.cpp @@ -85,7 +85,7 @@ std::vector reshape_inst::calc_output_layouts(reshape_node const& /*node pattern_shape, }; - std::map const_data; + std::unordered_map const_data; const auto ta = ov::make_tensor_accessor(const_data); auto run_shape_infer = [&](reshape::reshape_mode mode) { @@ -120,13 +120,13 @@ std::vector reshape_inst::calc_output_layouts(reshape_node const& /*node cldnn::mem_lock pattern_lock(pattern_mem, impl_param.get_stream()); auto pattern_ptr = pattern_lock.data(); - auto pattern_tensor = make_host_tensor(pattern_mem->get_layout(), pattern_ptr); + auto pattern_tensor = make_tensor(pattern_mem->get_layout(), pattern_ptr); const_data.emplace(1, pattern_tensor); run_shape_infer(prim->mode); } else { auto pattern_data = prim->output_pattern; - auto pattern_tensor = make_host_tensor({pattern_shape, data_types::i64, format::bfyx}, static_cast(pattern_data.data())); + auto pattern_tensor = make_tensor({pattern_shape, data_types::i64, format::bfyx}, static_cast(pattern_data.data())); const_data.emplace(1, pattern_tensor); run_shape_infer(prim->mode); diff --git a/src/plugins/intel_gpu/src/graph/space_to_batch.cpp b/src/plugins/intel_gpu/src/graph/space_to_batch.cpp index 61fa6d45ed220a..159778951d8b81 100644 --- a/src/plugins/intel_gpu/src/graph/space_to_batch.cpp +++ b/src/plugins/intel_gpu/src/graph/space_to_batch.cpp @@ -101,7 +101,7 @@ std::vector space_to_batch_inst::calc_output_layouts(space_to_batch_node end_shape }; - std::map const_data; + std::unordered_map const_data; if (desc->shape_constant) { auto block_sizes = tensor_to_vec(block_data, input0_format); auto begin_sizes = tensor_to_vec(begin_data, input0_format); @@ -111,9 +111,9 @@ std::vector space_to_batch_inst::calc_output_layouts(space_to_batch_node auto begin_values = static_cast(begin_sizes.data()); auto end_values = static_cast(end_sizes.data()); - auto block_tensor = make_host_tensor({ block_shape, data_types::i32, input0_format }, block_values); - auto begin_tensor = make_host_tensor({ begin_shape, data_types::i32, input0_format }, begin_values); - auto end_tensor = make_host_tensor({ end_shape, data_types::i32, input0_format }, end_values); + auto block_tensor = make_tensor({ block_shape, data_types::i32, input0_format }, block_values); + auto begin_tensor = make_tensor({ begin_shape, data_types::i32, input0_format }, begin_values); + auto end_tensor = make_tensor({ end_shape, data_types::i32, input0_format }, end_values); const_data.emplace(1, block_tensor); const_data.emplace(2, begin_tensor); @@ -129,9 +129,9 @@ std::vector space_to_batch_inst::calc_output_layouts(space_to_batch_node cldnn::mem_lock lock2(begin_mem, impl_param.get_stream()); cldnn::mem_lock lock3(end_mem, impl_param.get_stream()); - auto block_tensor = make_host_tensor(block_mem->get_layout(), lock1.data()); - auto begin_tensor = make_host_tensor(begin_mem->get_layout(), lock2.data()); - auto end_tensor = make_host_tensor(end_mem->get_layout(), lock3.data()); + auto block_tensor = make_tensor(block_mem->get_layout(), lock1.data()); + auto begin_tensor = make_tensor(begin_mem->get_layout(), lock2.data()); + auto end_tensor = make_tensor(end_mem->get_layout(), lock3.data()); const_data.emplace(1, block_tensor); const_data.emplace(2, begin_tensor); diff --git a/src/plugins/intel_gpu/src/graph/strided_slice.cpp b/src/plugins/intel_gpu/src/graph/strided_slice.cpp index 3f334e58ee8d05..2bd2fcd0c483fb 100644 --- a/src/plugins/intel_gpu/src/graph/strided_slice.cpp +++ b/src/plugins/intel_gpu/src/graph/strided_slice.cpp @@ -67,12 +67,12 @@ std::vector strided_slice_inst::calc_output_layouts(strided_slice_node c op.set_shrink_axis_mask(desc->shrink_axis_mask); op.set_ellipsis_mask_mask(desc->ellipsis_mask); - std::map const_data; + std::unordered_map const_data; const auto ta = ov::make_tensor_accessor(const_data); if (!begin_data.empty() && !end_data.empty() && !strides_data.empty()) { - auto begin_tensor = make_host_tensor({ begin_shape, data_types::i64, format::bfyx }, static_cast(begin_data.data())); - auto end_tensor = make_host_tensor({ end_shape, data_types::i64, format::bfyx }, static_cast(end_data.data())); - auto strides_tensor = make_host_tensor({ strides_shape, data_types::i64, format::bfyx }, static_cast(strides_data.data())); + auto begin_tensor = make_tensor({ begin_shape, data_types::i64, format::bfyx }, static_cast(begin_data.data())); + auto end_tensor = make_tensor({ end_shape, data_types::i64, format::bfyx }, static_cast(end_data.data())); + auto strides_tensor = make_tensor({ strides_shape, data_types::i64, format::bfyx }, static_cast(strides_data.data())); const_data.emplace(1, begin_tensor); const_data.emplace(2, end_tensor); @@ -88,9 +88,9 @@ std::vector strided_slice_inst::calc_output_layouts(strided_slice_node c cldnn::mem_lock lock2(end_mem, impl_param.get_stream()); cldnn::mem_lock lock3(strides_mem, impl_param.get_stream()); - auto begin_tensor = make_host_tensor(begin_mem->get_layout(), lock1.data()); - auto end_tensor = make_host_tensor(end_mem->get_layout(), lock2.data()); - auto strides_tensor = make_host_tensor(strides_mem->get_layout(), lock3.data()); + auto begin_tensor = make_tensor(begin_mem->get_layout(), lock1.data()); + auto end_tensor = make_tensor(end_mem->get_layout(), lock2.data()); + auto strides_tensor = make_tensor(strides_mem->get_layout(), lock3.data()); const_data.emplace(1, begin_tensor); const_data.emplace(2, end_tensor); diff --git a/src/plugins/intel_gpu/src/plugin/ops/random_uniform.cpp b/src/plugins/intel_gpu/src/plugin/ops/random_uniform.cpp index 18f7b7cc5089de..916c5520914d53 100644 --- a/src/plugins/intel_gpu/src/plugin/ops/random_uniform.cpp +++ b/src/plugins/intel_gpu/src/plugin/ops/random_uniform.cpp @@ -15,17 +15,33 @@ namespace { void CreateRandomUniformOp(Program &p, const std::shared_ptr &op) { auto inputs = p.GetInputInfo(op); - auto output_shape = op->get_output_shape(0); - cldnn::format outputFormat = cldnn::format::get_default_format(output_shape.size()); - - auto random_uniform_prim = cldnn::random_uniform(layer_type_name_ID(op), - inputs, - cldnn::element_type_to_data_type(op->get_out_type()), - op->get_global_seed(), - op->get_op_seed(), - tensor_from_dims(output_shape), - outputFormat); - p.add_primitive(*op, random_uniform_prim); + auto input_pshape = op->get_input_partial_shape(0); + auto output_pshape = op->get_output_partial_shape(0); + + OPENVINO_ASSERT(input_pshape.is_static(), "[GPU] Dynamic input of RandomUniform leads to dynamic output rank, but GPU doesn't support it yet"); + + if (output_pshape.is_static() && !p.use_new_shape_infer()) { + auto output_shape = output_pshape.get_shape(); + // Extend to 4D shape + output_shape.insert(output_shape.end(), 4 - output_shape.size(), 1ul); + + auto random_uniform_prim = cldnn::random_uniform(layer_type_name_ID(op), + inputs, + cldnn::element_type_to_data_type(op->get_out_type()), + op->get_global_seed(), + op->get_op_seed(), + output_shape); + p.add_primitive(*op, random_uniform_prim); + } else { + OPENVINO_ASSERT(input_pshape.size() == 1, "[GPU] RandomUniform expects 1D input, got ", input_pshape.size()); + + auto random_uniform_prim = cldnn::random_uniform(layer_type_name_ID(op), + inputs, + cldnn::element_type_to_data_type(op->get_out_type()), + op->get_global_seed(), + op->get_op_seed()); + p.add_primitive(*op, random_uniform_prim); + } } } // namespace diff --git a/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp b/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp index 4e83f10924116f..084d0095dd27c3 100644 --- a/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp +++ b/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp @@ -134,9 +134,12 @@ static void print_help_messages() { " For primitives fc, gemm, do, reduce, concat are supported. Separated by space."); message_list.emplace_back("OV_GPU_MaxKernelsPerBatch", "Maximum number of kernels in a batch during compiling kernels"); message_list.emplace_back("OV_GPU_DisableAsyncCompilation", "Disable async compilation"); + message_list.emplace_back("OV_GPU_DisableWinogradConv", "Disable Winograd convolution"); message_list.emplace_back("OV_GPU_DisableDynamicImpl", "Disable dynamic implementation"); message_list.emplace_back("OV_GPU_DisableRuntimeBufferFusing", "Disable runtime buffer fusing"); message_list.emplace_back("OV_GPU_DisableMemoryReuse", "Disable memory reuse"); + message_list.emplace_back("OV_GPU_DisableBuildTimeWeightReorderForDynamicNodes", "Disable build time weight reorder for dynmaic nodes."); + message_list.emplace_back("OV_GPU_DisableRuntimeSkipReorder", "Disable runtime skip reorder."); message_list.emplace_back("OV_GPU_DisablePrimitiveFusing", "Disable primitive fusing"); message_list.emplace_back("OV_GPU_DumpIteration", "Dump n-th execution of network, separated by space."); message_list.emplace_back("OV_GPU_MemPreallocationOptions", "Controls buffer pre-allocation feature. Expects 4 values separated by space in" @@ -188,6 +191,7 @@ debug_configuration::debug_configuration() , serialize_compile(0) , max_kernels_per_batch(0) , disable_async_compilation(0) + , disable_winograd_conv(0) , disable_dynamic_impl(0) , disable_runtime_buffer_fusing(0) , disable_memory_reuse(0) @@ -225,6 +229,7 @@ debug_configuration::debug_configuration() get_gpu_debug_env_var("ForceImplTypes", forced_impl_types_str); get_gpu_debug_env_var("MaxKernelsPerBatch", max_kernels_per_batch); get_gpu_debug_env_var("DisableAsyncCompilation", disable_async_compilation); + get_gpu_debug_env_var("DisableWinogradConv", disable_winograd_conv); get_gpu_debug_env_var("DisableDynamicImpl", disable_dynamic_impl); get_gpu_debug_env_var("DisableRuntimeBufferFusing", disable_runtime_buffer_fusing); get_gpu_debug_env_var("DisableMemoryReuse", disable_memory_reuse); diff --git a/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/random_uniform.cpp b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/random_uniform.cpp new file mode 100644 index 00000000000000..de0a2321658e5e --- /dev/null +++ b/src/plugins/intel_gpu/tests/functional/single_layer_tests/dynamic/random_uniform.cpp @@ -0,0 +1,208 @@ +// Copyright (C) 2018-2023 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/base/ov_subgraph.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" + +using namespace ngraph; +using namespace ov::test; + +namespace GPULayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Input shapes + std::pair, // Min value, Max value + std::pair, // Global seed, operation seed + ElementType, // Network precision + TargetDevice, // Device name + std::map // Additional network configuration +> RandomUnifromDynamicGPUTestParamsSet; + +class RandomUnifromDynamicGPUTest : public testing::WithParamInterface, + virtual public SubgraphBaseTest { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj) { + RandomUnifromDynamicGPUTestParamsSet basicParamsSet = obj.param; + std::ostringstream result; + std::vector input_shapes; + std::pair min_max_values; + std::pair seeds; + ElementType precision; + TargetDevice target_device; + std::map additionalConfig; + std::tie(input_shapes, min_max_values, seeds, precision, target_device, additionalConfig) = basicParamsSet; + + result << "shape="; + for (const auto& shape : input_shapes) { + result << ov::test::utils::partialShape2str({shape.first}) << "_"; + for (const auto& actual_shape : shape.second) { + result << ov::test::utils::partialShape2str({actual_shape}) << "_"; + } + } + result << "precision=" << precision << "_"; + result << "min_max_values=" << min_max_values.first << "_" << min_max_values.second << "_"; + result << "seeds=" << seeds.first << "_" << seeds.second << "_"; + result << "target_device=" << target_device; + return result.str(); + } + +protected: + void init_input_shapes(const std::vector& shapes) { + if (shapes.empty()) { + targetStaticShapes = {{}}; + return; + } + size_t targetStaticShapeSize = shapes.front().second.size(); + for (size_t i = 1; i < shapes.size(); ++i) { + if (targetStaticShapeSize < shapes[i].second.size()) { + targetStaticShapeSize = shapes[i].second.size(); + } + } + targetStaticShapes.resize(targetStaticShapeSize); + + for (const auto& shape : shapes) { + auto dynShape = shape.first; + inputDynamicShapes.push_back(dynShape); + for (size_t i = 0; i < targetStaticShapeSize; ++i) { + targetStaticShapes[i].push_back(i < shape.second.size() ? shape.second.at(i) : shape.second.back()); + } + } + } + + template + void set_tensor_value(T scalar, ov::Tensor& tensor) { + #define CASE(X) \ + case X: { \ + auto *dataPtr = tensor.data::value_type>(); \ + dataPtr[0] = static_cast::value_type>(scalar); \ + break; \ + } + + switch (tensor.get_element_type()) { + CASE(ElementType::boolean) + CASE(ElementType::i8) + CASE(ElementType::i16) + CASE(ElementType::i32) + CASE(ElementType::i64) + CASE(ElementType::u8) + CASE(ElementType::u16) + CASE(ElementType::u32) + CASE(ElementType::u64) + CASE(ElementType::bf16) + CASE(ElementType::f16) + CASE(ElementType::f32) + CASE(ElementType::f64) + CASE(ElementType::u1) + CASE(ElementType::i4) + CASE(ElementType::u4) + default: OPENVINO_THROW("Unsupported element type: ", tensor.get_element_type()); + } + } + + void generate_inputs(const std::vector& targetInputStaticShapes) override { + inputs.clear(); + const auto& funcInputs = function->inputs(); + + auto generate_input = [&](size_t index, ElementType element_type) { + ov::Tensor tensor(element_type, targetInputStaticShapes[index]); + if (index != 0) { + auto scalar_val = index == 1 ? min_max_values.first : min_max_values.second; + set_tensor_value(scalar_val, tensor); + } + inputs.insert({funcInputs[index].get_node_shared_ptr(), tensor}); + }; + + for (size_t i = 0; i < targetInputStaticShapes.size(); ++i) + generate_input(i, funcInputs[i].get_element_type()); + } + + void SetUp() override { + RandomUnifromDynamicGPUTestParamsSet basicParamsSet = this->GetParam(); + std::vector shapes; + ElementType netType; + std::map additionalConfig; + std::pair seeds; + + ov::ParameterVector params; + std::tie(shapes, min_max_values, seeds, netType, targetDevice, additionalConfig) = basicParamsSet; + + init_input_shapes(shapes); + + params = builder::makeDynamicParams(netType, inputDynamicShapes); + + const auto shape_of = std::make_shared(params[0]); + const auto random_uniform = std::make_shared(shape_of, params[1], params[2], netType, seeds.first, seeds.second); + + ov::ResultVector results = {std::make_shared(random_uniform)}; + function = std::make_shared(results, params, "random_uniform_test"); + } + + precisions_map get_ref_precisions_convert_map() override { + // Do not convert reference function from FP16 to FP32 precision, since in case of RandomUniform operation + // data type is matter + return {}; + } + +private: + std::pair min_max_values; +}; + + +TEST_P(RandomUnifromDynamicGPUTest, CompareWithRefs) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + run(); +} + +namespace { +std::map emptyAdditionalConfig; +const std::vector> dynInputShapes = { + { + {{ov::PartialShape::dynamic(4)}, {{1, 2, 3, 4}, {1, 1, 5, 5}, {2, 3, 4, 5}}}, + {{1}, {{1}}}, + {{1}, {{1}}} + }, + { + {{ov::PartialShape::dynamic(3)}, {{1, 2, 3}, {1, 1, 5}, {2, 3, 4}}}, + {{1}, {{1}}}, + {{1}, {{1}}} + }, + { + {{ov::PartialShape::dynamic(2)}, {{1, 2}, {1, 1}, {2, 3}}}, + {{1}, {{1}}}, + {{1}, {{1}}} + }, + { + {{ov::PartialShape::dynamic(1)}, {{1}, {2}, {3}}}, + {{1}, {{1}}}, + {{1}, {{1}}} + }, +}; + +const std::vector> min_max_values = { + {10, 30}, +}; + +const std::vector> seeds = { + {100, 10}, +}; + +const std::vector netPrecisions = { + ElementType::i32, + ElementType::f32, + ElementType::f16, +}; + +const auto testParams_smoke = ::testing::Combine(::testing::ValuesIn(dynInputShapes), + ::testing::ValuesIn(min_max_values), + ::testing::ValuesIn(seeds), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(ov::test::utils::DEVICE_GPU), + ::testing::Values(emptyAdditionalConfig)); + +INSTANTIATE_TEST_SUITE_P(smoke_dynamic_random_uniform, RandomUnifromDynamicGPUTest, + testParams_smoke, RandomUnifromDynamicGPUTest::getTestCaseName); + +} // namespace +} // namespace GPULayerTestsDefinitions diff --git a/src/plugins/intel_gpu/tests/unit/passes/add_required_reorders_test.cpp b/src/plugins/intel_gpu/tests/unit/passes/add_required_reorders_test.cpp index 75a955155ed45a..cb65717800d681 100644 --- a/src/plugins/intel_gpu/tests/unit/passes/add_required_reorders_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/passes/add_required_reorders_test.cpp @@ -116,6 +116,37 @@ TEST(add_required_reorders, eltwise_input_reorder) { ASSERT_EQ(eltwise_node.get_output_layout().format, format::bfzyx); } +TEST(add_required_reorders, prevent_input_dt_changing_for_convs) { + auto& engine = get_test_engine(); + + int input_b = 1, input_f = 16, input_y = 3, input_x = 3; + int output_b = input_b, output_f = 16, output_y = 6, output_x = 6; + + auto input_mem = engine.allocate_memory({ {input_b, input_f, input_y, input_x}, data_types::u8, format::bs_fs_yx_bsv16_fsv32 }); + auto input2_mem = engine.allocate_memory({ {input_b, input_f, input_y, input_x}, data_types::u8, format::bs_fs_yx_bsv16_fsv32 }); + auto weights_mem = engine.allocate_memory({ {16, 16, 1, 1}, data_types::i8, format::bfyx }); + + auto input = input_layout("input", input_mem->get_layout()); + auto input_const = data("input_const", input2_mem); + auto weights = data("weights", weights_mem); + auto eltwise1 = eltwise("eltwise1", input_info("input"), input_info("input_const"), eltwise_mode::sum); + auto conv1 = convolution("conv1", input_info("eltwise1"), "weights", "", 1, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 2, 2 }, false); + auto output_reorder = reorder("reorder", input_info("conv1"), { data_types::f32, format::bfyx, { output_b, output_f, output_y, output_x } }); + + topology topology_test(input, input_const, eltwise1, weights, conv1, output_reorder); + + ExecutionConfig config_test = get_test_default_config(engine); + ov::intel_gpu::ImplementationDesc conv1_impl_test = { format::bfyx, "", impl_types::ocl }; + config_test.set_property(ov::intel_gpu::force_implementations(ov::intel_gpu::ImplForcingMap{ { "conv1", conv1_impl_test } })); + + auto prog = program::build_program(engine, topology_test, config_test, false, true); + program_wrapper::apply_opt_pass(*prog); + + ASSERT_NE(prog, nullptr); + ASSERT_TRUE(prog->has_node("conv1")); + ASSERT_EQ(prog->get_node("conv1").get_input_layout(0).data_type, data_types::u8); +} + TEST(add_required_reorders, skip_adding_reorder_batch_axis_padding) { auto& engine = get_test_engine(); diff --git a/src/plugins/intel_gpu/tests/unit/shape_infer/pad_si_test.cpp b/src/plugins/intel_gpu/tests/unit/shape_infer/pad_si_test.cpp index 8a507ee45e1c7e..4d931f6cdc97b0 100644 --- a/src/plugins/intel_gpu/tests/unit/shape_infer/pad_si_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/shape_infer/pad_si_test.cpp @@ -177,21 +177,28 @@ INSTANTIATE_TEST_SUITE_P(smoke, pad_test_non_constant_input_begin, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 0, 3, 7}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{3, 4, 36, 48}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 0, 3, 7}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {1, -1}, {4, -1}, {8, -1}}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} + }, + { + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 0, 3, 7}, + ov::op::PadMode::EDGE, 1.f, + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {1, 0}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {1, -1}}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx} } })); @@ -234,21 +241,21 @@ INSTANTIATE_TEST_SUITE_P(smoke, pad_test_non_constant_input_end, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 0, 3, 7}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{3, 4, 36, 48}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 0, 3, 7}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {1, -1}, {4, -1}, {8, -1}}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {1, 0}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {1, -1}}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx} } })); @@ -294,21 +301,92 @@ INSTANTIATE_TEST_SUITE_P(smoke, pad_test_non_constant_input_begin_end, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{3, 5, 34, 42}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {}, - ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {2, -1}, {2, -1}, {2, -1}}, data_types::f32, format::bfyx} + ov::op::PadMode::EDGE, 1.f, + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx} }, { layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {}, layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {}, ov::op::PadMode::CONSTANT, 1.f, - layout{ov::PartialShape{{2, -1}, {2, -1}}, data_types::f32, format::bfyx} + layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx} + } + })); + +class pad_test_non_constant_input_begin_end_with_data : public testing::TestWithParam { }; + +TEST_P(pad_test_non_constant_input_begin_end_with_data, shape_infer) { + auto p = GetParam(); + + auto& engine = get_test_engine(); + + auto input0_prim = std::make_shared("input0", p.in_layout); + auto input1_prim = std::make_shared("input1", p.pads_begin_layout); + auto input2_prim = std::make_shared("input2", p.pads_end_layout); + + auto border_prim = std::make_shared("output", + std::vector({input_info("input0"), input_info("input1"), input_info("input2")}), + border::PAD_NON_CONST_INPUT::BEGIN | border::PAD_NON_CONST_INPUT::END, + p.pads_begin_data, + p.pads_end_data, + p.pad_mode, + p.pad_value); + cldnn::program prog(engine); + + auto& input0_node = prog.get_or_create(input0_prim); + auto& input1_node = prog.get_or_create(input1_prim); + auto& input2_node = prog.get_or_create(input2_prim); + auto& border_node = prog.get_or_create(border_prim); + + program_wrapper::add_connection(prog, input0_node, border_node); + program_wrapper::add_connection(prog, input1_node, border_node); + program_wrapper::add_connection(prog, input2_node, border_node); + + auto begin_mem = engine.allocate_memory(p.pads_begin_layout); + auto end_mem = engine.allocate_memory(p.pads_end_layout); + + set_values(begin_mem, p.pads_begin_data); + set_values(end_mem, p.pads_end_data); + auto impl_params = border_node.get_kernel_impl_params(); + impl_params->memory_deps = { + {1, begin_mem}, + {2, end_mem} + }; + + auto res = border_inst::calc_output_layouts(border_node, *impl_params); + + ASSERT_EQ(res.size(), 1); + ASSERT_EQ(res[0], p.expected_layout); +} + +INSTANTIATE_TEST_SUITE_P(smoke, pad_test_non_constant_input_begin_end_with_data, + testing::ValuesIn(std::vector{ + { + layout{ov::PartialShape{1, 3, 32, 40}, data_types::f32, format::bfyx}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 2, 3, 4}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {3, 2, 1, 0}, + ov::op::PadMode::CONSTANT, 1.f, + layout{ov::PartialShape{5, 7, 36, 44}, data_types::f32, format::bfyx} + }, + { + layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {1, 2, 3, 4}, + layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {3, 2, 1, 0}, + ov::op::PadMode::EDGE, 1.f, + layout{ov::PartialShape{{4, -1}, {4, -1}, {4, -1}, {4, -1}}, data_types::f32, format::bfyx} + }, + { + layout{ov::PartialShape{10, 20}, data_types::f32, format::bfyx}, + layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {1, 2}, + layout{ov::PartialShape{2}, data_types::i64, format::bfyx}, {3, 4}, + ov::op::PadMode::EDGE, 1.f, + layout{ov::PartialShape{14, 26}, data_types::f32, format::bfyx} } })); diff --git a/src/plugins/intel_gpu/tests/unit/shape_infer/random_uniform_si_test.cpp b/src/plugins/intel_gpu/tests/unit/shape_infer/random_uniform_si_test.cpp new file mode 100644 index 00000000000000..36a793b7ba3365 --- /dev/null +++ b/src/plugins/intel_gpu/tests/unit/shape_infer/random_uniform_si_test.cpp @@ -0,0 +1,143 @@ +// Copyright (C) 2023 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "test_utils.h" + +#include +#include +#include + +#include "random_uniform_inst.h" + +#include "program_wrapper.h" + +using namespace cldnn; +using namespace ::tests; + +namespace shape_infer_tests { + +struct random_uniform_si_test_params { + ov::PartialShape expected_out_pshape; + data_types out_data_type; + std::pair min_max_vals; +}; + +class random_uniform_si_test : public testing::TestWithParam { }; + +TEST_P(random_uniform_si_test, shape_infer) { + auto p = GetParam(); + auto& engine = get_test_engine(); + + cldnn::program prog(engine); + std::vector> input_prims; + std::vector input_prim_ids; + std::vector input_layouts; + const size_t num_inputs = 3; + + for (size_t idx = 0; idx < num_inputs; idx++) { + auto in_layout = layout{{1}, p.out_data_type, format::bfyx}; + if (idx == 0) { + auto input_pshape = ov::PartialShape{static_cast(p.expected_out_pshape.size())}; + in_layout = layout{input_pshape, data_types::i64, format::bfyx}; + } + input_layouts.push_back(in_layout); + + auto prim_id = "input_" + std::to_string(idx); + auto const_data_prim = std::make_shared(prim_id, in_layout); + input_prims.push_back(const_data_prim); + input_prim_ids.push_back(input_info(prim_id)); + } + + auto random_uniform_prim = std::make_shared("random_uniform", input_prim_ids, p.out_data_type, 0, 0); + auto& random_uniform_node = prog.get_or_create(random_uniform_prim); + + for (auto& iprim : input_prims) { + auto& input_node = prog.get_or_create(iprim); + program_wrapper::add_connection(prog, input_node, random_uniform_node); + } + + auto params = random_uniform_node.get_kernel_impl_params(); + params->memory_deps.clear(); + auto get_mem = [&](size_t idx, float val) -> memory::ptr { + auto in_layout = input_layouts[idx]; + auto allocated_mem = engine.allocate_memory(in_layout); + switch (p.out_data_type) { + case data_types::f16: + set_values(allocated_mem, {float_to_half(val)}); + break; + case data_types::f32: + set_values(allocated_mem, {static_cast::type>(val)}); + break; + case data_types::i32: + set_values(allocated_mem, {static_cast::type>(val)}); + break; + case data_types::i64: + set_values(allocated_mem, {static_cast::type>(val)}); + break; + case data_types::i8: + set_values(allocated_mem, {static_cast::type>(val)}); + break; + case data_types::u8: + set_values(allocated_mem, {static_cast::type>(val)}); + break; + case data_types::bin: + default: + break; + } + return allocated_mem; + }; + + if (p.expected_out_pshape.is_static()) { + auto input_mem = engine.allocate_memory(input_layouts[0]); + set_values(input_mem, p.expected_out_pshape.get_shape()); + params->memory_deps.emplace(0, input_mem); + } + + params->memory_deps.emplace(1, get_mem(1, p.min_max_vals.first)); + params->memory_deps.emplace(2, get_mem(2, p.min_max_vals.second)); + + if (p.min_max_vals.first < p.min_max_vals.second) { + auto res = random_uniform_inst::calc_output_layouts(random_uniform_node, *params); + + auto expected_out_layout = layout{p.expected_out_pshape, p.out_data_type, format::get_default_format(p.expected_out_pshape.size())}; + ASSERT_EQ(res.size(), 1); + ASSERT_EQ(res[0], expected_out_layout); + } else { + ASSERT_ANY_THROW(random_uniform_inst::calc_output_layouts(random_uniform_node, *params)); + } +} + +INSTANTIATE_TEST_SUITE_P(smoke, random_uniform_si_test, + testing::ValuesIn(std::vector{ + {ov::PartialShape{2}, data_types::i32, {0, 10}}, + {ov::PartialShape{2}, data_types::i8, {0, 10}}, + {ov::PartialShape{2}, data_types::u8, {0, 10}}, + {ov::PartialShape{2}, data_types::i64, {0, 10}}, + {ov::PartialShape{2}, data_types::i32, {0, 10}}, + {ov::PartialShape{2}, data_types::f32, {0, 10}}, + {ov::PartialShape{2}, data_types::f16, {0, 10}}, + {ov::PartialShape{2,4}, data_types::i32, {0, 10}}, + {ov::PartialShape{2,4}, data_types::f32, {0, 10}}, + {ov::PartialShape{2,4,3}, data_types::i32, {0, 10}}, + {ov::PartialShape{2,4,3}, data_types::f32, {0, 10}}, + {ov::PartialShape{2,4,3,2}, data_types::i32, {0, 10}}, + {ov::PartialShape{2,4,3,2}, data_types::f32, {0, 10}}, + {ov::PartialShape{2,4,3,1,2}, data_types::i32, {0, 10}}, + {ov::PartialShape{2,4,3,1,2}, data_types::f32, {0, 10}}, + + // Dynamic output shape + {ov::PartialShape::dynamic(1), data_types::f32, {0, 10}}, + {ov::PartialShape::dynamic(2), data_types::f32, {0, 10}}, + {ov::PartialShape::dynamic(3), data_types::f32, {0, 10}}, + {ov::PartialShape::dynamic(4), data_types::f32, {0, 10}}, + {ov::PartialShape::dynamic(5), data_types::f32, {0, 10}}, + + // Incorrect min/max values + {ov::PartialShape{2}, data_types::i32, {20, 20}}, + {ov::PartialShape{2,4,3,1,2}, data_types::i32, {20, 10}}, + {ov::PartialShape::dynamic(1), data_types::f32, {20, 20}}, + {ov::PartialShape::dynamic(5), data_types::f32, {20, 10}}, + })); + +}; // shape_infer_tests diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/random_uniform_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/random_uniform_gpu_test.cpp index f414c915e30b7e..62950ea1985cf5 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/random_uniform_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/random_uniform_gpu_test.cpp @@ -18,8 +18,7 @@ using namespace ::tests; */ template struct RandomUniformParams { - tensor output_tensor; - format f; + ov::Shape output_shape; T min_val; T max_val; uint64_t global_seed; @@ -36,20 +35,20 @@ struct random_uniform_gpu_test : public ::testing::TestWithParam params = testing::TestWithParam >::GetParam(); auto &engine = get_test_engine(); + auto format = format::get_default_format(params.output_shape.size()); auto shape = engine.allocate_memory( - {data_type, params.f, {1, 1, static_cast(params.output_tensor.sizes().size()), 1}}); + {{1, 1, 1, static_cast(params.output_shape.size())}, data_type, format}); auto min_val = engine.allocate_memory(layout(data_type, format::bfyx, {1, 1, 1, 1})); auto max_val = engine.allocate_memory(layout(data_type, format::bfyx, {1, 1, 1, 1})); - set_values(shape, params.output_tensor.sizes()); + set_values(shape, params.output_shape); set_values(min_val, {params.min_val}); set_values(max_val, {params.max_val}); topology topology; topology.add( random_uniform("random_uniform", { input_info("shape"), input_info("min_val"), input_info("max_val") }, data_type, params.global_seed, - params.op_seed, params.output_tensor, - params.f)); + params.op_seed, params.output_shape)); topology.add(input_layout("shape", shape->get_layout())); topology.add(input_layout("min_val", min_val->get_layout())); topology.add(input_layout("max_val", max_val->get_layout())); @@ -78,11 +77,11 @@ struct PrintToStringParamName { template std::string operator()(const testing::TestParamInfo > ¶m) { std::stringstream buf; - buf << " output tensor" << param.param.output_tensor.to_string() - << " min_value " << param.param.min_val - << " max_value " << param.param.max_val - << " global_seed " << param.param.global_seed - << " op_seed " << param.param.op_seed; + buf << "output_tensor_" << param.param.output_shape + << "_min_value_" << param.param.min_val + << "_max_value_" << param.param.max_val + << "_global_seed_" << param.param.global_seed + << "_op_seed_" << param.param.op_seed; return buf.str(); } @@ -91,11 +90,11 @@ struct PrintToStringParamName { template<> std::string PrintToStringParamName::operator()(const testing::TestParamInfo > ¶m) { std::stringstream buf; - buf << " output tensor" << param.param.output_tensor.to_string() - << " min_value " << static_cast(param.param.min_val) - << " max_value " << static_cast(param.param.max_val) - << " global_seed " << param.param.global_seed - << " op_seed " << param.param.op_seed; + buf << "output_tensor_" << param.param.output_shape + << "_min_value_" << static_cast(param.param.min_val) + << "_max_value_" << static_cast(param.param.max_val) + << "_global_seed_" << param.param.global_seed + << "_op_seed_" << param.param.op_seed; return buf.str(); } @@ -124,7 +123,7 @@ TEST_P(random_uniform_gpu_test_f16, random_f16) { INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_int32, random_uniform_gpu_test_i32, ::testing::Values( - RandomUniformParams{tensor(1, 1, 2, 3), format::bfyx, 50, 100, 80, 100, + RandomUniformParams{ov::Shape{1, 1, 3, 2}, 50, 100, 80, 100, std::vector{ 65, 70, 56, 59, 82, 92 @@ -135,7 +134,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_int32, INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_int64, random_uniform_gpu_test_i64, ::testing::Values( - RandomUniformParams{tensor(1, 1, 5, 4, 3), format::bfzyx, -2600, 3700, 755, + RandomUniformParams{ov::Shape{1, 1, 3, 4, 5}, -2600, 3700, 755, 951, { 2116L, -1581L, 2559L, -339L, -1660L, 519L, 90L, @@ -151,11 +150,17 @@ INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_int64, ), PrintToStringParamName()); - INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_f32, random_uniform_gpu_test_f32, ::testing::Values( - RandomUniformParams{tensor(1, 1, 3, 3), format::bfyx, 0.0, 1.0, 150, 10, + RandomUniformParams{ov::Shape{1, 1, 3, 3}, 0.0, 1.0, 150, 10, + { + 0.7011236, 0.30539632, 0.93931055, + 0.9456035, 0.11694777, 0.50770056, + 0.5197197, 0.22727466, 0.991374 + } + }, + RandomUniformParams{ov::Shape{3, 3}, 0.0, 1.0, 150, 10, { 0.7011236, 0.30539632, 0.93931055, 0.9456035, 0.11694777, 0.50770056, @@ -165,11 +170,10 @@ INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_f32, ), PrintToStringParamName()); - INSTANTIATE_TEST_SUITE_P(smoke_random_uniform_f16, random_uniform_gpu_test_f16, ::testing::Values( - RandomUniformParams{tensor(1, 1, 3, 2, 4), format::bfzyx, half_t(-1.5), + RandomUniformParams{ov::Shape{1, 1, 4, 2, 3}, half_t(-1.5), half_t(-1.0), 150, 10, {half_t(-1.19726562), half_t(-1.09667969), half_t(-1.08398438), half_t(-1.30859375), diff --git a/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp b/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp index bcf27f17fed6ae..bdde3438192bd6 100644 --- a/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp +++ b/src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp @@ -17,7 +17,7 @@ inline const std::string get_plugin_lib_name_by_device(const std::string& device { "HETERO", "openvino_hetero_plugin" }, { "BATCH", "openvino_auto_batch_plugin" }, { "MULTI", "openvino_auto_plugin" }, - { "VPU", "openvino_intel_vpu_plugin" }, + { "NPU", "openvino_intel_npu_plugin" }, { "CPU", "openvino_intel_cpu_plugin" }, { "GNA", "openvino_intel_gna_plugin" }, { "GPU", "openvino_intel_gpu_plugin" }, diff --git a/src/tests/functional/plugin/conformance/test_runner/conformance_infra/src/main.cpp b/src/tests/functional/plugin/conformance/test_runner/conformance_infra/src/main.cpp index e321cec288acf2..b501519c15bbce 100644 --- a/src/tests/functional/plugin/conformance/test_runner/conformance_infra/src/main.cpp +++ b/src/tests/functional/plugin/conformance/test_runner/conformance_infra/src/main.cpp @@ -22,7 +22,7 @@ void RegisterTestCustomQueries(void) { std::map& extTestQueries = *::PostgreSQLLink::get_ext_test_queries(); std::map& extTestNames = *::PostgreSQLLink::get_ext_test_names(); - std::string testName("checkPluginImplementation"); + std::string testName("checkPluginImplementationCompileModel"); extTestQueries[testName + "_ON_START"] = "OpImplCheck_CheckPluginImpl($__test_id, '$opName', '$opSet', " "'$targetDevice', '$targetDeviceArch', '$targetDeviceName', '$config', $__is_temp)"; diff --git a/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/read_ir/read_ir_tests.cpp b/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/read_ir/read_ir_tests.cpp index 062861c9a35e74..8a0092bc0204e5 100644 --- a/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/read_ir/read_ir_tests.cpp +++ b/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/read_ir/read_ir_tests.cpp @@ -17,15 +17,16 @@ using namespace ov::test::subgraph; namespace { -TEST_P(ReadIRTest, ReadIR) { +TEST_P(ReadIRTest, Inference) { run(); } -TEST_P(ReadIRTest, QueryModel) { +// temporarty disable to provide correct numbers for release +TEST_P(ReadIRTest, DISABLED_QueryModel) { query_model(); } -TEST_P(ReadIRTest, ImportExport) { +TEST_P(ReadIRTest, DISABLED_ImportExport) { import_export(); } diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp index bca975fe636433..9ee6d25fc06c72 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp @@ -5,6 +5,7 @@ #pragma once #include "openvino/core/model.hpp" +#include "transformations/convert_precision.hpp" #include "common_test_utils/test_common.hpp" #include "functional_test_utils/ov_plugin_cache.hpp" @@ -69,6 +70,7 @@ class SubgraphBaseTest : public ov::test::TestsCommon { virtual std::vector calculate_refs(); virtual std::vector get_plugin_outputs(); + virtual precisions_map get_ref_precisions_convert_map(); friend void core_configuration(SubgraphBaseTest* test); }; diff --git a/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp b/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp index 3e49a6d3b06820..e1ac460de2e586 100644 --- a/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp +++ b/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp @@ -261,14 +261,12 @@ void SubgraphBaseTest::infer() { inferRequest.infer(); } -std::vector SubgraphBaseTest::calculate_refs() { - using InputsMap = std::map, ov::Tensor>; - - auto functionToProcess = functionRefs->clone(); +precisions_map SubgraphBaseTest::get_ref_precisions_convert_map() { //TODO: remove this conversions as soon as function interpreter fully support bf16 and f16 precisions_map precisions = { { ngraph::element::bf16, ngraph::element::f32 } }; + auto convert_added = false; for (const auto ¶m : function->get_parameters()) { for (size_t i = 0; i < param->get_output_size(); i++) { @@ -281,11 +279,21 @@ std::vector SubgraphBaseTest::calculate_refs() { } } } + if (!convert_added) { precisions.insert({ ngraph::element::f16, ngraph::element::f32}); } + + return precisions; +} + +std::vector SubgraphBaseTest::calculate_refs() { + using InputsMap = std::map, ov::Tensor>; + + auto functionToProcess = functionRefs->clone(); + precisions_map convert_precisions = get_ref_precisions_convert_map(); pass::Manager manager; - manager.register_pass(precisions); + manager.register_pass(convert_precisions); manager.run_passes(functionToProcess); functionToProcess->validate_nodes_and_infer_types(); diff --git a/src/tests/functional/shared_test_classes/src/single_layer/random_uniform.cpp b/src/tests/functional/shared_test_classes/src/single_layer/random_uniform.cpp index 122bb7d438d1bc..f4f97a53e3c8c0 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/random_uniform.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/random_uniform.cpp @@ -63,13 +63,15 @@ void RandomUniformLayerTest::SetUp() { std::string targetName; std::tie(output_shape, randomUniformParams, global_seed, op_seed, targetDevice) = this->GetParam(); const auto precision = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(randomUniformParams.precision); - auto out_shape_ = std::make_shared(ov::element::i64, - ov::Shape{output_shape.size()}, - output_shape); + + // Use Parameter as input with desired precision to properly configure execution configuration + // in CoreConfiguration() function + auto input = std::make_shared(precision, output_shape); + auto shape_of = std::make_shared(input); auto min_value = createConstant(randomUniformParams.precision, randomUniformParams.min_value); auto max_value = createConstant(randomUniformParams.precision, randomUniformParams.max_value); - auto random_uniform = std::make_shared(out_shape_, + auto random_uniform = std::make_shared(shape_of, min_value, max_value, precision, @@ -77,7 +79,7 @@ void RandomUniformLayerTest::SetUp() { op_seed); ngraph::ResultVector results{std::make_shared(random_uniform)}; - function = std::make_shared(results, ngraph::ParameterVector{}, "random_uniform"); + function = std::make_shared(results, ngraph::ParameterVector{input}, "random_uniform"); } void RandomUniformLayerTest::ConvertRefsParams() { diff --git a/src/tests/test_utils/common_test_utils/CMakeLists.txt b/src/tests/test_utils/common_test_utils/CMakeLists.txt index 5fd7af8ce5d28e..a03a69b6120e32 100644 --- a/src/tests/test_utils/common_test_utils/CMakeLists.txt +++ b/src/tests/test_utils/common_test_utils/CMakeLists.txt @@ -85,7 +85,7 @@ function(add_common_utils ADD_TARGET_NAME) endfunction() -# Keep old name so that library can be used from VPU repo +# Keep old name so that library can be used from NPU repo set(TARGET_NAME commonTestUtils) set(NEW_TARGET_NAME common_test_utils) diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/common_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/common_utils.hpp index 57f5852e887fc3..f639a1b2192633 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/common_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/common_utils.hpp @@ -196,7 +196,7 @@ size_t getVmRSSInKB(); } // namespace test } // namespace ov -// openvino_contrib and vpu repo use CommonTestUtils:: +// openvino_contrib and NPU repo use CommonTestUtils:: // so we need to add these names to CommonTestUtils namespace namespace CommonTestUtils { using ov::test::utils::vec2str; diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp index e9c554f02fa2bb..7141cd85790921 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp @@ -483,7 +483,7 @@ OPENVINO_SUPPRESS_DEPRECATED_END } // namespace ov -// openvino_contrib and vpu repo use CommonTestUtils:: +// openvino_contrib and NPU repo use CommonTestUtils:: // so we need to add these names to CommonTestUtils namespace namespace CommonTestUtils { using ov::test::utils::ie_abs; diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp index 28ba2d44a359d4..cb97b06a530e19 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp @@ -365,7 +365,7 @@ class MockPlugin : public ov::IPlugin { } // namespace ov -// vpu repo uses CommonTestUtils:: +// NPU repo uses CommonTestUtils:: // so we need to add these names to CommonTestUtils namespace namespace CommonTestUtils { using ov::test::utils::fileExists; diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_common.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_common.hpp index f832f32dbbb29a..1480e6bbd5d589 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_common.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_common.hpp @@ -18,7 +18,7 @@ class TestsCommon; // Temporal WA for applications.ai.vpu-accelerators.vpux-plugin repo // It requires to have TestCommon name in CommonTestUtils namespace -// Need to change namespace in VPU repo and then remove this WA +// Need to change namespace in NPU repo and then remove this WA namespace CommonTestUtils { using ov::test::TestsCommon; } // namespace CommonTestUtils diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_constants.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_constants.hpp index 4e8c11e3ad3a20..3b1b8327c744b6 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_constants.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_constants.hpp @@ -50,7 +50,7 @@ const unsigned int maxFileNameLength = 140; } // namespace test } // namespace ov -// openvino_contrib and vpu repo use CommonTestUtils:: +// openvino_contrib and NPU repo use CommonTestUtils:: // so we need to add these names to CommonTestUtils namespace namespace CommonTestUtils { using ov::test::utils::DEVICE_AUTO; diff --git a/src/tests/test_utils/common_test_utils/src/test_constants.cpp b/src/tests/test_utils/common_test_utils/src/test_constants.cpp index c9338438075467..7018d0283f1548 100644 --- a/src/tests/test_utils/common_test_utils/src/test_constants.cpp +++ b/src/tests/test_utils/common_test_utils/src/test_constants.cpp @@ -12,8 +12,8 @@ const char *DEVICE_AUTO = "AUTO"; const char *DEVICE_CPU = "CPU"; const char *DEVICE_GNA = "GNA"; const char *DEVICE_GPU = "GPU"; +const char *DEVICE_KEEMBAY = "NPU"; const char *DEVICE_BATCH = "BATCH"; -const char *DEVICE_KEEMBAY = "VPU"; const char *DEVICE_MULTI = "MULTI"; const char *DEVICE_TEMPLATE = "TEMPLATE"; const char *DEVICE_HETERO = "HETERO"; diff --git a/src/tests/test_utils/functional_test_utils/include/functional_test_utils/crash_handler.hpp b/src/tests/test_utils/functional_test_utils/include/functional_test_utils/crash_handler.hpp index b59d4b8646f4fd..f8cc7858452797 100644 --- a/src/tests/test_utils/functional_test_utils/include/functional_test_utils/crash_handler.hpp +++ b/src/tests/test_utils/functional_test_utils/include/functional_test_utils/crash_handler.hpp @@ -36,7 +36,7 @@ class CrashHandler { } // namespace test } // namespace ov -// openvino_contrib and vpu repo use CommonTestUtils:: +// openvino_contrib and NPU repo use CommonTestUtils:: // so we need to add these names to CommonTestUtils namespace namespace CommonTestUtils { using ov::test::utils::env; diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py b/src/tests/test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py index 1a7a32b114b28f..c75a1e5607dbe8 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/merge_xmls.py @@ -67,7 +67,7 @@ def aggregate_test_results(aggregated_results: SubElement, xml_reports: list, continue xml_results = xml_root.find("results") xml_timestamp = xml_root.get("timestamp") - if aggregated_timestamp is None or xml_timestamp < aggregated_timestamp: + if aggregated_timestamp is None or xml_timestamp > aggregated_timestamp: aggregated_timestamp = xml_timestamp for xml_device_entry in xml_results: if merge_device_suffix and "." in xml_device_entry.tag: diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/rename_conformance_ir.py b/src/tests/test_utils/functional_test_utils/layer_tests_summary/rename_conformance_ir.py index 9347617afee3ae..0cf63c5ce1e216 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/rename_conformance_ir.py +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/rename_conformance_ir.py @@ -24,7 +24,6 @@ if PY_OPENVINO in os.listdir(ov_bin_path): env = os.environ py_ov = os.path.join(ov_bin_path, PY_OPENVINO) - py_ov = os.path.join(py_ov, find_latest_dir(py_ov)) env = set_env_variable(env, "PYTHONPATH", py_ov) env = set_env_variable(env, LD_LIB_PATH_NAME, ov_bin_path) diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html b/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html index 80efaabbdb250f..e440458b2704ed 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/template/report_template.html @@ -32,7 +32,7 @@

Operations coverage summary: Tag: {{report_tag}} | Version: {{report_version Passrates are based on relative weights each subgraphs! You can check absolute value in `General passrate` row!
- Relative Passrate could be from 0 to 200% now! Relative weight of operation is calculated once for current set of models, but there are more then one tests per model. + Relative Passrate could be from 0 to 100% (Inference only)! Relative weight of operation is calculated once for current set of models, but there are more then one tests per model.
Status: diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/utils/constants.py b/src/tests/test_utils/functional_test_utils/layer_tests_summary/utils/constants.py index a5cef0ce3ebf9f..825e599d52ea07 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/utils/constants.py +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/utils/constants.py @@ -28,7 +28,7 @@ LD_LIB_PATH_NAME = "PATH" if IS_WIN else "LD_LIBRARY_PATH" OPENVINO_NAME = 'openvino' -PY_OPENVINO = "python_api" +PY_OPENVINO = "python" DEBUG_DIR = "Debug" RELEASE_DIR = "Release" diff --git a/tests/layer_tests/mo_python_api_tests/test_mo_convert_pytorch.py b/tests/layer_tests/mo_python_api_tests/test_mo_convert_pytorch.py index 5e6cdc765c9db0..ae48f1ce1ae7f2 100644 --- a/tests/layer_tests/mo_python_api_tests/test_mo_convert_pytorch.py +++ b/tests/layer_tests/mo_python_api_tests/test_mo_convert_pytorch.py @@ -74,6 +74,7 @@ def __init__(self): ) def forward(self, x, y=None, z=None): + logits = None if y is None: logits = self.linear_relu_stack(x + z) if z is None: @@ -87,7 +88,7 @@ def make_ref_pt_model_one_input(shape, dtype=np.float32): shape = PartialShape(shape) param1 = ov.opset8.parameter(shape, name="input_0", dtype=dtype) relu = ov.opset8.relu(param1) - if dtype != np.float32: + if dtype not in [np.float32, Type.dynamic]: relu = ov.opset8.convert(relu, np.float32) sigm = ov.opset8.sigmoid(relu) @@ -106,9 +107,13 @@ def make_ref_pt_model_two_inputs(shape, dtype=np.float32): shape = PartialShape(shape) param1 = ov.opset8.parameter(shape, name="input_0", dtype=dtype) param2 = ov.opset8.parameter(shape, name="input_1", dtype=dtype) - mul = ov.opset8.multiply(param1, param2) + if dtype == Type.dynamic: + cl = ov.opset8.convert_like(param2, param1) + mul = ov.opset8.multiply(param1, cl) + else: + mul = ov.opset8.multiply(param1, param2) relu = ov.opset8.relu(mul) - if dtype != np.float32: + if dtype not in [np.float32, Type.dynamic]: relu = ov.opset8.convert(relu, np.float32) sigm = ov.opset8.sigmoid(relu) @@ -277,7 +282,7 @@ def scripted_fn(x: torch.Tensor, y: torch.Tensor): return torch.sigmoid(torch.relu(x * y)) inp_shape = PartialShape([Dimension(1, -1), Dimension(-1, 5), 10]) - ref_model = make_ref_pt_model_two_inputs(inp_shape) + ref_model = make_ref_pt_model_two_inputs(inp_shape, dtype=Type.dynamic) return scripted_fn, ref_model, {'input': [(inp_shape), (inp_shape)]} @@ -292,7 +297,7 @@ def create_pytorch_nn_module_layout_list(tmp_dir): ref_model.inputs[1].node.layout = Layout('nhwc') return pt_model, ref_model, { - 'input_shape': [shape, shape], 'layout': ['nchw', Layout('nhwc')], 'use_convert_model_from_mo': True + 'input': [(shape, np.float32), (shape, np.float32)], 'layout': ['nchw', Layout('nhwc')], 'use_convert_model_from_mo': True } @@ -307,30 +312,7 @@ def create_pytorch_nn_module_layout_list_case2(tmp_dir): ref_model.inputs[1].node.layout = Layout('nhwc') return pt_model, ref_model, { - 'input_shape': [shape, shape], 'layout': ('nchw', Layout('nhwc')), 'use_convert_model_from_mo': True} - - -def create_pytorch_nn_module_mean_list(tmp_dir): - pt_model = make_pt_model_two_inputs() - shape = [1, 10, 10, 3] - - shape = PartialShape(shape) - param1 = ov.opset8.parameter(shape) - param2 = ov.opset8.parameter(shape) - const1 = ov.opset8.constant([[[[-0.0, -0.0, -0.0]]]], dtype=np.float32) - const2 = ov.opset8.constant([[[[-0.0, -0.0, -0.0]]]], dtype=np.float32) - add1 = ov.opset8.add(param1, const1) - add2 = ov.opset8.add(param2, const2) - mul = ov.opset8.multiply(add1, add2) - relu = ov.opset8.relu(mul) - sigm = ov.opset8.sigmoid(relu) - - parameter_list = [param1, param2] - ref_model = Model([sigm], parameter_list, "test") - - return pt_model, ref_model, { - 'input_shape': [shape, shape], 'mean_values': [[0, 0, 0], [0, 0, 0]], 'compress_to_fp16': False, - 'use_convert_model_from_mo': True} + 'input': [(shape, np.float32), (shape, np.float32)], 'layout': ('nchw', Layout('nhwc')), 'use_convert_model_from_mo': True} def create_pytorch_nn_module_mean_list_compression_disabled(tmp_dir): @@ -351,7 +333,7 @@ def create_pytorch_nn_module_mean_list_compression_disabled(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input_shape': [shape, shape], 'mean_values': [[0, 0, 0], [0, 0, 0]], + return pt_model, ref_model, {'input': [(shape, np.float32), (shape, np.float32)], 'mean_values': [[0, 0, 0], [0, 0, 0]], 'compress_to_fp16': False, 'use_convert_model_from_mo': True} @@ -375,7 +357,7 @@ def create_pytorch_nn_module_mean_list_compression_default(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input_shape': [shape, shape], 'mean_values': [[0, 0, 0], [0, 0, 0]], + return pt_model, ref_model, {'input': [(shape, np.float32), (shape, np.float32)], 'mean_values': [[0, 0, 0], [0, 0, 0]], 'use_convert_model_from_mo': True} @@ -403,32 +385,10 @@ def create_pytorch_nn_module_mean_list_compression_enabled(tmp_dir): ref_model = Model([sigm], parameter_list, "test") return pt_model, ref_model, { - 'input_shape': [shape, shape], 'mean_values': [[0, 0, 0], [0, 0, 0]], + 'input': [(shape, np.float32), (shape, np.float32)], 'mean_values': [[0, 0, 0], [0, 0, 0]], 'compress_to_fp16': True, 'use_convert_model_from_mo': True} -def create_pytorch_nn_module_scale_list(tmp_dir): - pt_model = make_pt_model_two_inputs() - shape = [1, 10, 10, 3] - - shape = PartialShape(shape) - param1 = ov.opset8.parameter(shape) - param2 = ov.opset8.parameter(shape) - const1 = ov.opset8.constant([[[[1, 1, 1]]]], dtype=np.float32) - const2 = ov.opset8.constant([[[[1, 1, 1]]]], dtype=np.float32) - sub1 = ov.opset8.multiply(param1, const1) - sub2 = ov.opset8.multiply(param2, const2) - mul = ov.opset8.multiply(sub1, sub2) - relu = ov.opset8.relu(mul) - sigm = ov.opset8.sigmoid(relu) - - parameter_list = [param1, param2] - ref_model = Model([sigm], parameter_list, "test") - - return pt_model, ref_model, {'input_shape': [shape, shape], 'scale_values': [[1, 1, 1], [1, 1, 1]], 'compress_to_fp16': False, - 'use_convert_model_from_mo': True} - - def create_pytorch_nn_module_scale_list_compression_disabled(tmp_dir): pt_model = make_pt_model_two_inputs() shape = [1, 10, 10, 3] @@ -447,7 +407,8 @@ def create_pytorch_nn_module_scale_list_compression_disabled(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input_shape': [shape, shape], 'scale_values': [[1, 1, 1], [1, 1, 1]], + return pt_model, ref_model, {'input': [(shape, np.float32), (shape, np.float32)], + 'scale_values': [[1, 1, 1], [1, 1, 1]], 'compress_to_fp16': False, 'use_convert_model_from_mo': True} @@ -471,7 +432,8 @@ def create_pytorch_nn_module_scale_list_compression_default(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input_shape': [shape, shape], 'scale_values': [[1, 1, 1], [1, 1, 1]], + return pt_model, ref_model, {'input': [(shape, np.float32), (shape, np.float32)], + 'scale_values': [[1, 1, 1], [1, 1, 1]], 'use_convert_model_from_mo': True} @@ -497,13 +459,14 @@ def create_pytorch_nn_module_scale_list_compression_enabled(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input_shape': [shape, shape], 'scale_values': [[1, 1, 1], [1, 1, 1]], + return pt_model, ref_model, {'input': [(shape, np.float32), (shape, np.float32)], + 'scale_values': [[1, 1, 1], [1, 1, 1]], 'compress_to_fp16': True, 'use_convert_model_from_mo': True} def create_pytorch_nn_module_shapes_list_static(tmp_dir): pt_model = make_pt_model_two_inputs() - ref_model = make_ref_pt_model_two_inputs([1, 3, 20, 20]) + ref_model = make_ref_pt_model_two_inputs([1, 3, 20, 20], dtype=Type.dynamic) return pt_model, ref_model, {'input': [[1, 3, 20, 20], [1, 3, 20, 20]]} @@ -521,10 +484,11 @@ def create_pytorch_nn_module_shapes_list_dynamic(tmp_dir): [-1, 3, 20, Dimension(-1, 20)]] param1 = ov.opset8.parameter(PartialShape( - inp_shapes[0]), name="x", dtype=np.float32) + inp_shapes[0]), name="x", dtype=Type.dynamic) param2 = ov.opset8.parameter(PartialShape( - inp_shapes[1]), name="y", dtype=np.float32) - mul = ov.opset8.multiply(param1, param2) + inp_shapes[1]), name="y", dtype=Type.dynamic) + cl = ov.opset8.convert_like(param2, param1) + mul = ov.opset8.multiply(param1, cl) relu = ov.opset8.relu(mul) sigm = ov.opset8.sigmoid(relu) @@ -548,13 +512,13 @@ def create_pytorch_nn_module_shapes_list_dynamic_via_input(tmp_dir): parameter_list = [param1, param2] ref_model = Model([sigm], parameter_list, "test") - return pt_model, ref_model, {'input': [(inp_shapes[0],), (inp_shapes[1],)]} + return pt_model, ref_model, {'input': [(inp_shapes[0], Type.f32), (inp_shapes[1], Type.f32)]} def create_pytorch_nn_module_shapes_list_dynamic_single_input(tmp_dir): pt_model = make_pt_model_one_input() inp_shapes = [[Dimension(-1), 3, 20, Dimension(20, -1)]] - ref_model = make_ref_pt_model_one_input(inp_shapes[0]) + ref_model = make_ref_pt_model_one_input(inp_shapes[0], dtype=Type.dynamic) return pt_model, ref_model, {'input': inp_shapes} @@ -568,7 +532,7 @@ def create_pytorch_nn_module_shapes_list_dynamic_single_input_via_input(tmp_dir) def create_pytorch_nn_module_shapes_list_static_single_input(tmp_dir): pt_model = make_pt_model_one_input() inp_shapes = [[1, 3, 20, 20]] - ref_model = make_ref_pt_model_one_input(inp_shapes[0]) + ref_model = make_ref_pt_model_one_input(inp_shapes[0], dtype=Type.dynamic) return pt_model, ref_model, {'input': inp_shapes} @@ -735,20 +699,6 @@ def create_pytorch_module_with_optional_inputs_case3(tmp_dir): return net, ref_model, {"example_input": example_input, "input": [[3, 3, 3, 3], [3, 3, 3, 3]]} -def create_pytorch_module_with_optional_inputs_case4(tmp_dir): - net = make_pt_model_with_optional_input() - ref_model = make_ref_pt_model_with_optional_inputs( - [3, 3, 3, 3], z_exist=True) - return net, ref_model, {"input": [("x", [3, 3, 3, 3]), ("z", [3, 3, 3, 3])]} - - -def create_pytorch_module_with_optional_inputs_case5(tmp_dir): - net = make_pt_model_with_optional_input() - ref_model = make_ref_pt_model_with_optional_inputs( - [1, 3, -1, -1], z_exist=True) - return net, ref_model, {"input": [("x",[1, 3, -1, -1]), ("z", [1, 3, -1, -1])]} - - def create_pytorch_module_with_compressed_int8_constant_compress_to_fp16_default(tmp_dir): import torch import torch.nn.functional as F @@ -1013,11 +963,9 @@ class TestMoConvertPyTorch(CommonMOConvertTest): create_pytorch_jit_script_function, create_pytorch_nn_module_layout_list, create_pytorch_nn_module_layout_list_case2, - create_pytorch_nn_module_mean_list, create_pytorch_nn_module_mean_list_compression_default, create_pytorch_nn_module_mean_list_compression_disabled, create_pytorch_nn_module_mean_list_compression_enabled, - create_pytorch_nn_module_scale_list, create_pytorch_nn_module_scale_list_compression_default, create_pytorch_nn_module_scale_list_compression_disabled, create_pytorch_nn_module_scale_list_compression_enabled, @@ -1039,8 +987,6 @@ class TestMoConvertPyTorch(CommonMOConvertTest): create_pytorch_module_with_optional_inputs_case1, create_pytorch_module_with_optional_inputs_case2, create_pytorch_module_with_optional_inputs_case3, - create_pytorch_module_with_optional_inputs_case4, - create_pytorch_module_with_optional_inputs_case5, create_pytorch_nn_module_with_scalar_input, create_pytorch_module_with_compressed_int8_constant, create_pytorch_module_with_compressed_int8_constant_compress_to_fp16_default, diff --git a/tests/layer_tests/pytorch_tests/test_flatten.py b/tests/layer_tests/pytorch_tests/test_flatten.py index 1702d3bf525038..31345dc749df52 100644 --- a/tests/layer_tests/pytorch_tests/test_flatten.py +++ b/tests/layer_tests/pytorch_tests/test_flatten.py @@ -27,7 +27,9 @@ def forward(self, x): return aten_flatten(dim0, dim1), ref_net, "aten::flatten" - @pytest.mark.parametrize("dim0,dim1", [[0, 1], + @pytest.mark.parametrize("dim0,dim1", [[0, -1], + [-2, -1], + [0, 1], [0, 2], [0, 3], [1, 2], diff --git a/tests/layer_tests/pytorch_tests/test_native_multi_head_attention.py b/tests/layer_tests/pytorch_tests/test_native_multi_head_attention.py index 95304109604b97..41e737dba6221d 100644 --- a/tests/layer_tests/pytorch_tests/test_native_multi_head_attention.py +++ b/tests/layer_tests/pytorch_tests/test_native_multi_head_attention.py @@ -31,13 +31,13 @@ def __init__(self, mask, need_weights, average_attn_weights) -> None: # Float masks raise a warning in PyTorch and are (incorrectly) converted to bool, # which later returns NaNs as MHA's output if mask == 0: - self.mask = torch.from_numpy(np.random.randint(0, 2, (SEQ_LENGTH, SEQ_LENGTH)).astype(np.bool)) + self.mask = torch.from_numpy(np.random.randint(0, 2, (SEQ_LENGTH, SEQ_LENGTH)).astype("bool")) self.mask_type = 0 elif mask == 1: - self.mask = torch.from_numpy(np.random.randint(0, 2, (BATCH_SIZE, SEQ_LENGTH)).astype(np.bool)) + self.mask = torch.from_numpy(np.random.randint(0, 2, (BATCH_SIZE, SEQ_LENGTH)).astype("bool")) self.mask_type = 1 elif mask == 2: - self.mask = torch.from_numpy(np.random.randint(0, 2, (BATCH_SIZE, NUM_HEADS, SEQ_LENGTH, SEQ_LENGTH)).astype(np.bool)) + self.mask = torch.from_numpy(np.random.randint(0, 2, (BATCH_SIZE, NUM_HEADS, SEQ_LENGTH, SEQ_LENGTH)).astype("bool")) self.mask_type = 2 else: self.mask = None diff --git a/tests/layer_tests/tensorflow_tests/test_tf_MaxPoolWithArgmax.py b/tests/layer_tests/tensorflow_tests/test_tf_MaxPoolWithArgmax.py new file mode 100644 index 00000000000000..bb39a94594b91a --- /dev/null +++ b/tests/layer_tests/tensorflow_tests/test_tf_MaxPoolWithArgmax.py @@ -0,0 +1,75 @@ +# Copyright (C) 2018-2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +import numpy as np +import pytest +import tensorflow as tf +from common.tf_layer_test_class import CommonTFLayerTest + + +class TestMaxPoolWithArgmax(CommonTFLayerTest): + def _prepare_input(self, inputs_info): + assert 'input' in inputs_info + input_shape = inputs_info['input'] + inputs_data = {} + inputs_data['input'] = np.random.randint(-5, 5, input_shape).astype(self.input_type) + return inputs_data + + def create_max_pool_with_argmax_net(self, input_shape, ksize, strides, input_type, padding, targmax, + include_batch_in_index, with_second_output): + self.input_type = input_type + tf.compat.v1.reset_default_graph() + # Create the graph and model + with tf.compat.v1.Session() as sess: + input = tf.compat.v1.placeholder(input_type, input_shape, 'input') + max_pool_with_argmax = tf.raw_ops.MaxPoolWithArgmax(input=input, ksize=ksize, strides=strides, + padding=padding, Targmax=targmax, + include_batch_in_index=include_batch_in_index + ) + tf.identity(max_pool_with_argmax[0], name='max_pool') + if with_second_output: + tf.identity(max_pool_with_argmax[1], name='output_indices') + tf.compat.v1.global_variables_initializer() + tf_net = sess.graph_def + + return tf_net, None + + test_data_basic = [ + dict(input_shape=[1, 25, 24, 3], + ksize=[1, 1, 1, 1], strides=[1, 1, 1, 1]), + dict(input_shape=[1, 10, 20, 3], + ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1]), + ] + + @pytest.mark.parametrize("params", test_data_basic) + @pytest.mark.parametrize("input_type", [ + np.float32, np.int32 + ]) + @pytest.mark.parametrize("padding", [ + 'VALID', 'SAME' + ]) + @pytest.mark.parametrize("targmax", [ + tf.int32, tf.int64 + ]) + @pytest.mark.parametrize("include_batch_in_index", [ + True, False + ]) + @pytest.mark.parametrize("with_second_output", [ + pytest.param( + True, + marks=pytest.mark.skip(reason="117415: TransposeSinking crash") + ), + False + ]) + @pytest.mark.precommit_tf_fe + @pytest.mark.nightly + def test_max_pool_with_argmax_basic(self, params, input_type, padding, targmax, + include_batch_in_index, with_second_output, + ie_device, precision, ir_version, temp_dir, + use_new_frontend, use_old_api): + self._test( + *self.create_max_pool_with_argmax_net(**params, input_type=input_type, padding=padding, targmax=targmax, + include_batch_in_index=include_batch_in_index, + with_second_output=with_second_output), + ie_device, precision, ir_version, temp_dir=temp_dir, + use_new_frontend=use_new_frontend, use_old_api=use_old_api) diff --git a/tests/time_tests/.automation/auto_plugin_test_config.yml b/tests/time_tests/.automation/auto_plugin_test_config.yml index 27cb4f05c74ed5..0a884da23815fa 100644 --- a/tests/time_tests/.automation/auto_plugin_test_config.yml +++ b/tests/time_tests/.automation/auto_plugin_test_config.yml @@ -1,392 +1,392 @@ - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf @@ -394,280 +394,280 @@ name: AUTO name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: AUTO:CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: AUTO:GPU,CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf diff --git a/tests/time_tests/.automation/desktop_test_config.yml b/tests/time_tests/.automation/desktop_test_config.yml index 30149dd929d0c5..a21ebe0d201a8d 100644 --- a/tests/time_tests/.automation/desktop_test_config.yml +++ b/tests/time_tests/.automation/desktop_test_config.yml @@ -1,448 +1,448 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf \ No newline at end of file diff --git a/tests/time_tests/.automation/desktop_test_config_cache.yml b/tests/time_tests/.automation/desktop_test_config_cache.yml index 94a2c8bedc9453..a24be9412896ce 100644 --- a/tests/time_tests/.automation/desktop_test_config_cache.yml +++ b/tests/time_tests/.automation/desktop_test_config_cache.yml @@ -1,7 +1,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx @@ -9,7 +9,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16 framework: onnx @@ -17,7 +17,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx @@ -25,7 +25,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml + path: ${NPU_MODELS_PKG}/resnet-50-pytorch/onnx/FP16-INT8/resnet-50-pytorch.xml name: resnet-50-pytorch precision: FP16-INT8 framework: onnx @@ -33,7 +33,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe @@ -41,7 +41,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16/mobilenet-v2.xml name: mobilenet-v2 precision: FP16 framework: caffe @@ -49,7 +49,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe @@ -57,7 +57,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml + path: ${NPU_MODELS_PKG}/mobilenet-v2/caffe/FP16-INT8/mobilenet-v2.xml name: mobilenet-v2 precision: FP16-INT8 framework: caffe @@ -65,7 +65,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf @@ -73,7 +73,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16 framework: tf @@ -81,7 +81,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf @@ -89,7 +89,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/faster-rcnn-resnet101-coco-sparse-60-0001/tf/FP16-INT8/faster-rcnn-resnet101-coco-sparse-60-0001.xml name: faster-rcnn-resnet101-coco-sparse-60-0001 precision: FP16-INT8 framework: tf @@ -97,7 +97,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf @@ -105,7 +105,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16/googlenet-v1.xml name: googlenet-v1 precision: FP16 framework: tf @@ -113,7 +113,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf @@ -121,7 +121,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml + path: ${NPU_MODELS_PKG}/googlenet-v1/tf/FP16-INT8/googlenet-v1.xml name: googlenet-v1 precision: FP16-INT8 framework: tf @@ -129,7 +129,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf @@ -137,7 +137,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16/googlenet-v3.xml name: googlenet-v3 precision: FP16 framework: tf @@ -145,7 +145,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf @@ -153,7 +153,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml + path: ${NPU_MODELS_PKG}/googlenet-v3/tf/FP16-INT8/googlenet-v3.xml name: googlenet-v3 precision: FP16-INT8 framework: tf @@ -161,7 +161,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe @@ -169,7 +169,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16/ssd512.xml name: ssd512 precision: FP16 framework: caffe @@ -177,7 +177,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe @@ -185,7 +185,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml + path: ${NPU_MODELS_PKG}/ssd512/caffe/FP16-INT8/ssd512.xml name: ssd512 precision: FP16-INT8 framework: caffe @@ -193,7 +193,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf @@ -201,7 +201,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16 framework: tf @@ -209,7 +209,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf @@ -217,7 +217,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-0001/tf/FP16-INT8/yolo-v2-ava-0001.xml name: yolo-v2-ava-0001 precision: FP16-INT8 framework: tf @@ -225,7 +225,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf @@ -233,7 +233,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16 framework: tf @@ -241,7 +241,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf @@ -249,7 +249,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-35-0001/tf/FP16-INT8/yolo-v2-ava-sparse-35-0001.xml name: yolo-v2-ava-sparse-35-0001 precision: FP16-INT8 framework: tf @@ -257,7 +257,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf @@ -265,7 +265,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16 framework: tf @@ -273,7 +273,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf @@ -281,7 +281,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-ava-sparse-70-0001/tf/FP16-INT8/yolo-v2-ava-sparse-70-0001.xml name: yolo-v2-ava-sparse-70-0001 precision: FP16-INT8 framework: tf @@ -289,7 +289,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf @@ -297,7 +297,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16 framework: tf @@ -305,7 +305,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf @@ -313,7 +313,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-0001/tf/FP16-INT8/yolo-v2-tiny-ava-0001.xml name: yolo-v2-tiny-ava-0001 precision: FP16-INT8 framework: tf @@ -321,7 +321,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf @@ -329,7 +329,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16 framework: tf @@ -337,7 +337,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf @@ -345,7 +345,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-30-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-30-0001.xml name: yolo-v2-tiny-ava-sparse-30-0001 precision: FP16-INT8 framework: tf @@ -353,7 +353,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf @@ -361,7 +361,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16 framework: tf @@ -369,7 +369,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf @@ -377,7 +377,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/yolo-v2-tiny-ava-sparse-60-0001/tf/FP16-INT8/yolo-v2-tiny-ava-sparse-60-0001.xml name: yolo-v2-tiny-ava-sparse-60-0001 precision: FP16-INT8 framework: tf @@ -385,7 +385,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe @@ -393,7 +393,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16/squeezenet1.1.xml name: squeezenet1.1 precision: FP16 framework: caffe @@ -401,7 +401,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe @@ -409,7 +409,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml + path: ${NPU_MODELS_PKG}/squeezenet1.1/caffe/FP16-INT8/squeezenet1.1.xml name: squeezenet1.1 precision: FP16-INT8 framework: caffe @@ -417,7 +417,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf @@ -425,7 +425,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16 framework: tf @@ -433,7 +433,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf @@ -441,7 +441,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-0001/tf/FP16-INT8/icnet-camvid-ava-0001.xml name: icnet-camvid-ava-0001 precision: FP16-INT8 framework: tf @@ -449,7 +449,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf @@ -457,7 +457,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16 framework: tf @@ -465,7 +465,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf @@ -473,7 +473,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-30-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-30-0001.xml name: icnet-camvid-ava-sparse-30-0001 precision: FP16-INT8 framework: tf @@ -481,7 +481,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf @@ -489,7 +489,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16 framework: tf @@ -497,7 +497,7 @@ - device: name: CPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf @@ -505,7 +505,7 @@ - device: name: GPU model: - path: ${VPUX_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml + path: ${NPU_MODELS_PKG}/icnet-camvid-ava-sparse-60-0001/tf/FP16-INT8/icnet-camvid-ava-sparse-60-0001.xml name: icnet-camvid-ava-sparse-60-0001 precision: FP16-INT8 framework: tf diff --git a/tests/time_tests/test_runner/test_timetest.py b/tests/time_tests/test_runner/test_timetest.py index a090161394fe9b..f7d7600b28115b 100644 --- a/tests/time_tests/test_runner/test_timetest.py +++ b/tests/time_tests/test_runner/test_timetest.py @@ -43,7 +43,7 @@ def test_timetest(instance, executable, niter, cl_cache_dir, model_cache, model_ :param niter: number of times to run executable :param cl_cache_dir: directory to store OpenCL cache :param cpu_cache: flag to enable model CPU cache - :param vpu_compiler: flag to change VPU compiler type + :param npu_compiler: flag to change NPU compiler type :param perf_hint: performance hint (optimize device for latency or throughput settings) :param model_cache_dir: directory to store IE model cache :param test_info: custom `test_info` field of built-in `request` pytest fixture diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake index 3b9d9dc5b0fe4f..47b23885e95efe 100644 --- a/thirdparty/dependencies.cmake +++ b/thirdparty/dependencies.cmake @@ -572,14 +572,14 @@ endif() # if(ENABLE_SAMPLES) - # Note: VPU requires 3.9.0 version, because it contains 'nlohmann::ordered_json' + # Note: NPU requires 3.9.0 version, because it contains 'nlohmann::ordered_json' find_package(nlohmann_json 3.9.0 QUIET) if(nlohmann_json_FOUND) # conan and vcpkg create imported target nlohmann_json::nlohmann_json else() add_subdirectory(thirdparty/json EXCLUDE_FROM_ALL) - # this is required only because of VPU plugin reused this + # this is required only because of NPU plugin reused this openvino_developer_export_targets(COMPONENT openvino_common TARGETS nlohmann_json) # for nlohmann library versions older than v3.0.0 diff --git a/thirdparty/open_model_zoo b/thirdparty/open_model_zoo index 4035972e8a3dbb..7353ea15fc0ba5 160000 --- a/thirdparty/open_model_zoo +++ b/thirdparty/open_model_zoo @@ -1 +1 @@ -Subproject commit 4035972e8a3dbbac90d22df5cf741f6cbbca1ea2 +Subproject commit 7353ea15fc0ba57d4bcdd7aaf9c4cde454ca447b diff --git a/tools/benchmark_tool/openvino/tools/benchmark/utils/constants.py b/tools/benchmark_tool/openvino/tools/benchmark/utils/constants.py index d9e3ca2ae71802..1fb45e1f4a2ae3 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/utils/constants.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/utils/constants.py @@ -1,7 +1,7 @@ # Copyright (C) 2018-2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -VPU_DEVICE_NAME = 'VPU' +NPU_DEVICE_NAME = 'NPU' CPU_DEVICE_NAME = 'CPU' GPU_DEVICE_NAME = 'GPU' HETERO_DEVICE_NAME = 'HETERO' @@ -22,7 +22,7 @@ DEVICE_DURATION_IN_SECS = { CPU_DEVICE_NAME: 60, GPU_DEVICE_NAME: 60, - VPU_DEVICE_NAME: 60, + NPU_DEVICE_NAME: 60, GNA_DEVICE_NAME: 60, UNKNOWN_DEVICE_TYPE: 120 } diff --git a/tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py b/tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py index b42fa131225077..7cb46d92300640 100644 --- a/tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py +++ b/tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py @@ -30,7 +30,7 @@ def get_pytorch_decoder(model, input_shape, example_inputs, args): "NNCF models produced by nncf<2.6 are not supported directly. Please export to ONNX first.") except: pass - inputs = prepare_torch_inputs(example_inputs, input_shape, args.get("input"), allow_none=True) + inputs = prepare_torch_inputs(example_inputs) decoder = TorchScriptPythonDecoder(model, example_input=inputs) args['input_model'] = decoder args["framework"] = "pytorch" @@ -151,36 +151,7 @@ def to_torch_tensor(tensor): "Got {}".format(type(tensor))) -def get_torch_dtype(dtype): - import torch - ov_str_to_torch = { - "boolean": torch.bool, - "f16": torch.float16, - "f32": torch.float32, - "f64": torch.float64, - "i8": torch.int8, - "i16": torch.int16, - "i32": torch.int32, - "i64": torch.int64, - "u8": torch.uint8, - } - if dtype is None: - return torch.float - if isinstance(dtype, torch.dtype): - return dtype - if isinstance(dtype, (type, np.dtype)): - dtype = get_element_type_str(dtype) - if isinstance(dtype, Type): - dtype = dtype.get_type_name() - if isinstance(dtype, str): - str_dtype = ov_str_to_torch.get(dtype) - if str_dtype is None: - raise Error(f"Unexpected data type '{dtype}' for input") - return str_dtype - raise Error(f"Unexpected data type for input. Supported torch.dtype, numpy.dtype, ov.Type and str. Got {type(dtype)}") - - -def prepare_torch_inputs(example_inputs, input_shape, input_info=None, allow_none=False): +def prepare_torch_inputs(example_inputs): import torch inputs = None if example_inputs is not None: @@ -201,29 +172,7 @@ def prepare_torch_inputs(example_inputs, input_shape, input_info=None, allow_non inputs[name] = to_torch_tensor(tensor) else: inputs = to_torch_tensor(inputs) - elif input_info is not None or input_shape is not None: - input_info = input_to_input_cut_info(input_info) or [] - input_shape_to_input_cut_info(input_shape, input_info) - inputs = [] - inputs_with_names = {} - for inp in input_info: - shape = inp.shape - if shape is None: - if not allow_none: - raise Error("Please provide input_shape or example_input for all inputs converting PyTorch model.") - inputs = None - break - dtype = get_torch_dtype(inp.type) - static_shape = get_static_shape(shape, dynamic_value=1) - input_tensor = torch.zeros(static_shape, dtype=dtype) # pylint: disable=no-member - if inp.name is not None: - inputs_with_names[inp.name] = input_tensor - inputs.append(input_tensor) - if isinstance(inputs, list): - inputs = tuple(inputs) - if inputs is not None and len(inputs) == len(inputs_with_names): - inputs = inputs_with_names else: - if not allow_none: - raise Error("Please provide input_shape or example_input for converting PyTorch model.") + # No example_input were provided, decoder will use scripting + return None return inputs diff --git a/tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py b/tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py index 3bb6c928f3a10f..89c5ce11ae520b 100644 --- a/tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py +++ b/tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py @@ -30,7 +30,7 @@ def get_pytorch_decoder(model, example_inputs, args): "NNCF models produced by nncf<2.6 are not supported directly. Please export to ONNX first.") except: pass - inputs = prepare_torch_inputs(example_inputs, args.get("input"), allow_none=True) + inputs = prepare_torch_inputs(example_inputs) decoder = TorchScriptPythonDecoder(model, example_input=inputs) args['input_model'] = decoder args["example_input"] = inputs @@ -150,36 +150,7 @@ def to_torch_tensor(tensor): "Got {}".format(type(tensor))) -def get_torch_dtype(dtype): - import torch - ov_str_to_torch = { - "boolean": torch.bool, - "f16": torch.float16, - "f32": torch.float32, - "f64": torch.float64, - "i8": torch.int8, - "i16": torch.int16, - "i32": torch.int32, - "i64": torch.int64, - "u8": torch.uint8, - } - if dtype is None: - return torch.float - if isinstance(dtype, torch.dtype): - return dtype - if isinstance(dtype, (type, np.dtype)): - dtype = get_element_type_str(dtype) - if isinstance(dtype, Type): - dtype = dtype.get_type_name() - if isinstance(dtype, str): - str_dtype = ov_str_to_torch.get(dtype) - if str_dtype is None: - raise Error(f"Unexpected data type '{dtype}' for input") - return str_dtype - raise Error(f"Unexpected data type for input. Supported torch.dtype, numpy.dtype, ov.Type and str. Got {type(dtype)}") - - -def prepare_torch_inputs(example_inputs, input_info=None, allow_none=False): +def prepare_torch_inputs(example_inputs): import torch inputs = None if example_inputs is not None: @@ -200,28 +171,7 @@ def prepare_torch_inputs(example_inputs, input_info=None, allow_none=False): inputs[name] = to_torch_tensor(tensor) else: inputs = to_torch_tensor(inputs) - elif input_info is not None: - input_info = input_to_input_cut_info(input_info) or [] - inputs = [] - inputs_with_names = {} - for inp in input_info: - shape = inp.shape - if shape is None: - if not allow_none: - raise Error("Please provide shape in `input` or `example_input` for all inputs converting PyTorch model.") - inputs = None - break - dtype = get_torch_dtype(inp.type) - static_shape = get_static_shape(shape, dynamic_value=1) - input_tensor = torch.zeros(static_shape, dtype=dtype) # pylint: disable=no-member - if inp.name is not None: - inputs_with_names[inp.name] = input_tensor - inputs.append(input_tensor) - if isinstance(inputs, list): - inputs = tuple(inputs) - if inputs is not None and len(inputs) == len(inputs_with_names): - inputs = inputs_with_names else: - if not allow_none: - raise Error("Please provide shapes `input` or `example_input` for converting PyTorch model.") + # No example_input were provided, decoder will use scripting + return None return inputs diff --git a/tools/pot/README_dev.md b/tools/pot/README_dev.md index 785e409edd416f..d524ec5bb59d89 100644 --- a/tools/pot/README_dev.md +++ b/tools/pot/README_dev.md @@ -13,7 +13,7 @@ Post-Training Optimization Tool includes standalone command-line tool and Python * Per-channel quantization for Convolutional and Fully-Connected layers. * Multiple domains: Computer Vision, Recommendation Systems. * Ability to implement custom calibration pipeline via supported [API](openvino/tools/pot/api/README.md). -* Compression for different HW targets such as CPU, GPU, VPU. +* Compression for different HW targets such as CPU, GPU, NPU. * Post-training sparsity. ## Usage diff --git a/tools/pot/docs/BestPractices.md b/tools/pot/docs/BestPractices.md index ab15576a06d8b8..bee4d8fbcadca5 100644 --- a/tools/pot/docs/BestPractices.md +++ b/tools/pot/docs/BestPractices.md @@ -14,7 +14,7 @@ the fastest and easiest way to get a quantized model. It requires only some unan .. note:: - POT uses inference on the CPU during model optimization. It means that ability to infer the original floating-point model is essential for model optimization. In case of the 8-bit quantization, it is recommended to run POT on the same CPU architecture when optimizing for CPU or VNNI-based CPU when quantizing for a non-CPU device, such as GPU, VPU, or GNA. It should help to avoid the impact of the :doc:`saturation issue ` that occurs on AVX and SSE-based CPU devices. + POT uses inference on the CPU during model optimization. It means that ability to infer the original floating-point model is essential for model optimization. In case of the 8-bit quantization, it is recommended to run POT on the same CPU architecture when optimizing for CPU or VNNI-based CPU when quantizing for a non-CPU device, such as GPU, NPU, or GNA. It should help to avoid the impact of the :doc:`saturation issue ` that occurs on AVX and SSE-based CPU devices. Improving accuracy after the Default Quantization @@ -32,7 +32,7 @@ Parameters of the Default Quantization algorithm with basic settings are present # the quantization scheme. For the CPU: # performance - symmetric quantization of weights and activations. # mixed - symmetric weights and asymmetric activations. - # accuracy - the same as "mixed" for CPU, GPU, and GNA devices; asymmetric weights and activations for VPU device. + # accuracy - the same as "mixed" for CPU, GPU, and GNA devices; asymmetric weights and activations for NPU device. "stat_subset_size": 300 # Size of the subset to calculate activations statistics that can be used # for quantization parameters calculation. } diff --git a/tools/pot/docs/DefaultQuantizationUsage.md b/tools/pot/docs/DefaultQuantizationUsage.md index 674d08ba815fc3..ec2edbacca6742 100644 --- a/tools/pot/docs/DefaultQuantizationUsage.md +++ b/tools/pot/docs/DefaultQuantizationUsage.md @@ -90,7 +90,7 @@ Default Quantization algorithm has mandatory and optional parameters which are d * ``"target_device"`` - the following options are available: - * ``"ANY"`` (or ``"CPU"``) - default option to quantize models for CPU, GPU, or VPU + * ``"ANY"`` (or ``"CPU"``) - default option to quantize models for CPU, GPU, or NPU * ``"CPU_SPR"`` - to quantize models for CPU SPR (4th Generation Intel® Xeon® Scalable processor family) * ``"GNA"``, ``"GNA3"``, ``"GNA3.5"`` - to quantize models for GNA devices respectively. diff --git a/tools/pot/openvino/tools/pot/algorithms/quantization/README.md b/tools/pot/openvino/tools/pot/algorithms/quantization/README.md index 0444889bf4494e..3b8b9f352e5761 100644 --- a/tools/pot/openvino/tools/pot/algorithms/quantization/README.md +++ b/tools/pot/openvino/tools/pot/algorithms/quantization/README.md @@ -2,9 +2,9 @@ ## Introduction -The primary optimization feature of the Post-training Optimization Tool (POT) is the uniform integer quantization which allows substantially increasing inference performance and reducing the model size. Different HW platforms can support different integer precisions and POT is designed to support all of them, for example, 8-bit for CPU, GPU, VPU, 16-bit for GNA. Moreover, POT makes the specification of HW settings transparent for the user by introducing a concept of the `target_device` parameter. +The primary optimization feature of the Post-training Optimization Tool (POT) is the uniform integer quantization which allows substantially increasing inference performance and reducing the model size. Different HW platforms can support different integer precisions and POT is designed to support all of them, for example, 8-bit for CPU, GPU, NPU, 16-bit for GNA. Moreover, POT makes the specification of HW settings transparent for the user by introducing a concept of the `target_device` parameter. -> **NOTE**: There is a special `target_device: "ANY"` which leads to portable quantized models compatible with CPU, GPU, and VPU devices. GNA-quantized models are compatible only with CPU. +> **NOTE**: There is a special `target_device: "ANY"` which leads to portable quantized models compatible with CPU, GPU, and NPU devices. GNA-quantized models are compatible only with CPU. During the quantization process, the POT tool runs inference of the optimizing model to estimate quantization parameters for input activations of the quantizable operation. It means that a calibration dataset is required to perform quantization. This dataset may have or not have annotation depending on the quantization algorithm that is used. diff --git a/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware/algorithm.py b/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware/algorithm.py index d08c970f1af7b5..b1c29d88872bc7 100644 --- a/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware/algorithm.py +++ b/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware/algorithm.py @@ -17,7 +17,7 @@ def __init__(self, config, engine): algos_by_devices = { 'ANY': 'AccuracyAwareCommon', 'CPU': 'AccuracyAwareCommon', - 'VPU': 'AccuracyAwareCommon', + 'NPU': 'AccuracyAwareCommon', 'GPU': 'AccuracyAwareCommon', 'GNA': 'AccuracyAwareGNA', 'GNA3': 'AccuracyAwareGNA', diff --git a/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware_common/mixed_precision.py b/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware_common/mixed_precision.py index 70011eb9cccc56..c99e9733fae6db 100644 --- a/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware_common/mixed_precision.py +++ b/tools/pot/openvino/tools/pot/algorithms/quantization/accuracy_aware_common/mixed_precision.py @@ -31,11 +31,11 @@ def __init__(self, config, engine): self.original_quantization_config.weights.bits = 8 self.original_quantization_config.activations.bits = 8 self._config.convert_to_mixed_preset = False - self._restrict_for_vpu = True + self._restrict_for_npu = True self._engine.calculate_metrics = True def _can_set_fq_to_low_bitwidth(self, node): - if self._restrict_for_vpu: + if self._restrict_for_npu: return (nu.get_node_output(node, 0)[0].type == 'Convolution') and \ ('group' not in nu.get_node_output(node, 0)[0]) return nu.get_node_output(node, 0)[0].type in OPERATIONS_WITH_WEIGHTS diff --git a/tools/pot/openvino/tools/pot/algorithms/quantization/fake_quantize_configuration.py b/tools/pot/openvino/tools/pot/algorithms/quantization/fake_quantize_configuration.py index 4642201b558d94..35733a07b84163 100644 --- a/tools/pot/openvino/tools/pot/algorithms/quantization/fake_quantize_configuration.py +++ b/tools/pot/openvino/tools/pot/algorithms/quantization/fake_quantize_configuration.py @@ -528,7 +528,7 @@ def _get_node_valuable_descendant(node): def change_configurations_by_model_type(model, config, fq_configuration, hardware_config): - if config['model_type'] == 'transformer' and config['target_device'] in ['ANY', 'CPU', 'CPU_SPR', 'GPU', 'VPU']: + if config['model_type'] == 'transformer' and config['target_device'] in ['ANY', 'CPU', 'CPU_SPR', 'GPU', 'NPU']: change_configurations_by_model_type_transformer(model, fq_configuration, hardware_config) diff --git a/tools/pot/openvino/tools/pot/algorithms/quantization/utils.py b/tools/pot/openvino/tools/pot/algorithms/quantization/utils.py index 9ad333a72bfcf5..be69ad8bc637a2 100644 --- a/tools/pot/openvino/tools/pot/algorithms/quantization/utils.py +++ b/tools/pot/openvino/tools/pot/algorithms/quantization/utils.py @@ -21,7 +21,7 @@ 'GNA3': 'gna3.json', 'GNA3.5': 'gna3.json', 'GPU': 'gpu.json', # Same as cpu.json but without LSTM/GRUSequence quantization - 'VPU': 'vpu.json', + 'NPU': 'npu.json', 'CPU_SPR': 'cpu.json'} diff --git a/tools/pot/openvino/tools/pot/configs/config.py b/tools/pot/openvino/tools/pot/configs/config.py index 9c55cbd8e4901a..0b5b41adc30bbf 100644 --- a/tools/pot/openvino/tools/pot/configs/config.py +++ b/tools/pot/openvino/tools/pot/configs/config.py @@ -347,7 +347,7 @@ def _configure_algo_params(self): aliases = {'symmetric': 'performance', 'asymmetric': 'accuracy'} preset = aliases.get(preset, preset) presets_aliases_by_device = { - 'VPU': {'accuracy': 'accuracy'}, + 'NPU': {'accuracy': 'accuracy'}, 'GNA': {'accuracy': 'accuracy', 'mixed': 'accuracy'}, 'GNA3': {'accuracy': 'accuracy', 'mixed': 'accuracy'}, 'GNA3.5': {'accuracy': 'accuracy', 'mixed': 'accuracy'}, diff --git a/tools/pot/openvino/tools/pot/graph/vpu_patterns.py b/tools/pot/openvino/tools/pot/graph/npu_patterns.py similarity index 92% rename from tools/pot/openvino/tools/pot/graph/vpu_patterns.py rename to tools/pot/openvino/tools/pot/graph/npu_patterns.py index 5da9861a34ecbc..44a7012f19286d 100644 --- a/tools/pot/openvino/tools/pot/graph/vpu_patterns.py +++ b/tools/pot/openvino/tools/pot/graph/npu_patterns.py @@ -4,7 +4,7 @@ from openvino.tools.pot.graph.pattern_utils import get_clamp_mult_const_pattern, \ get_softmax_reshape_transpose_gather_matmul_pattern -def get_vpu_ignored_patterns(): +def get_npu_ignored_patterns(): return { 'blocks': [get_softmax_reshape_transpose_gather_matmul_pattern()], 'activations': [get_clamp_mult_const_pattern()], diff --git a/tools/pot/openvino/tools/pot/graph/utils.py b/tools/pot/openvino/tools/pot/graph/utils.py index 30844760d58348..1358c74ae9f2fc 100644 --- a/tools/pot/openvino/tools/pot/graph/utils.py +++ b/tools/pot/openvino/tools/pot/graph/utils.py @@ -10,7 +10,7 @@ from openvino.tools.pot.version import get_version from .cpu_patterns import get_cpu_ignored_patterns, get_cpu_spr_ignored_patterns from .gpu_patterns import get_gpu_ignored_patterns -from .vpu_patterns import get_vpu_ignored_patterns +from .npu_patterns import get_npu_ignored_patterns from .gna_patterns import get_gna_ignored_patterns, get_gna3_ignored_patterns from .special_operations import QUANTIZE_AGNOSTIC_OPERATIONS from .node_utils import get_all_node_outputs, get_input_shape @@ -19,7 +19,7 @@ 'ANY': get_cpu_ignored_patterns(), 'CPU': get_cpu_ignored_patterns(), 'GPU': get_gpu_ignored_patterns(), - 'VPU': get_vpu_ignored_patterns(), + 'NPU': get_npu_ignored_patterns(), 'GNA': get_gna_ignored_patterns(), 'GNA3': get_gna3_ignored_patterns(), 'GNA3.5': get_gna3_ignored_patterns(), diff --git a/tools/pot/tests/test_target_device.py b/tools/pot/tests/test_target_device.py index d42d294c8aedbc..2e6a8e429b1aa1 100644 --- a/tools/pot/tests/test_target_device.py +++ b/tools/pot/tests/test_target_device.py @@ -7,7 +7,7 @@ DEVICE = [ 'CPU', 'GPU', - 'VPU' + 'NPU' ]