From 1a6aace5fdddc71ad031f69d4affc93b90215e49 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 7 Sep 2021 12:43:33 +0300 Subject: [PATCH] Merge tools and inference_engine/tools folders (#7359) * Merge tools folders * Fixed docs * Moved deployment_manager * Fixed path to benchmark_tool docs * python_tools -> python_tools_benchmark --- CODEOWNERS | 1 - docs/IE_DG/Intro_to_Performance.md | 2 +- docs/IE_DG/Model_caching_overview.md | 2 +- docs/IE_DG/Tools_Overview.md | 4 +- docs/index.md | 8 ++-- inference-engine/CMakeLists.txt | 1 - inference-engine/tools/CMakeLists.txt | 5 --- inference-engine/tools/package_BOM.txt | 6 --- scripts/CMakeLists.txt | 8 ---- tools/CMakeLists.txt | 38 ++++++++++++++----- .../compile_tool/CMakeLists.txt | 0 .../tools => tools}/compile_tool/README.md | 0 .../tools => tools}/compile_tool/main.cpp | 0 .../cross_check_tool/README.md | 0 .../cross_check_tool/__init__.py | 0 .../cross_check_tool/cross_check_tool.py | 0 .../cross_check_tool/requirements.txt | 0 .../tools => tools}/cross_check_tool/utils.py | 0 .../deployment_manager/configs/darwin.json | 0 .../deployment_manager/configs/linux.json | 0 .../deployment_manager/configs/windows.json | 0 .../deployment_manager/deployman/config.py | 0 .../deployment_manager/deployman/logger.py | 0 .../deployment_manager/deployman/main.py | 0 .../deployment_manager/deployman/ui.py | 0 .../deployment_manager/deployment_manager.py | 0 26 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 inference-engine/tools/CMakeLists.txt delete mode 100644 inference-engine/tools/package_BOM.txt rename {inference-engine/tools => tools}/compile_tool/CMakeLists.txt (100%) rename {inference-engine/tools => tools}/compile_tool/README.md (100%) rename {inference-engine/tools => tools}/compile_tool/main.cpp (100%) rename {inference-engine/tools => tools}/cross_check_tool/README.md (100%) rename {inference-engine/tools => tools}/cross_check_tool/__init__.py (100%) rename {inference-engine/tools => tools}/cross_check_tool/cross_check_tool.py (100%) rename {inference-engine/tools => tools}/cross_check_tool/requirements.txt (100%) rename {inference-engine/tools => tools}/cross_check_tool/utils.py (100%) rename {scripts => tools}/deployment_manager/configs/darwin.json (100%) rename {scripts => tools}/deployment_manager/configs/linux.json (100%) rename {scripts => tools}/deployment_manager/configs/windows.json (100%) rename {scripts => tools}/deployment_manager/deployman/config.py (100%) rename {scripts => tools}/deployment_manager/deployman/logger.py (100%) rename {scripts => tools}/deployment_manager/deployman/main.py (100%) rename {scripts => tools}/deployment_manager/deployman/ui.py (100%) rename {scripts => tools}/deployment_manager/deployment_manager.py (100%) diff --git a/CODEOWNERS b/CODEOWNERS index 92a821790eaf5e..bc7beb0841ef38 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -44,7 +44,6 @@ azure-pipelines.yml @openvinotoolkit/openvino-admins /inference-engine/tests/functional/plugin/myriad/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers /inference-engine/tests/unit/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers /inference-engine/tests/unit/engines/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers -/inference-engine/tools/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers /inference-engine/scripts/run_tests_myriad_multistick.sh @openvinotoolkit/openvino-ie-vpu-maintainers # IE GNA: diff --git a/docs/IE_DG/Intro_to_Performance.md b/docs/IE_DG/Intro_to_Performance.md index 48d1ea5c56cff0..ca360d0d06f1c0 100644 --- a/docs/IE_DG/Intro_to_Performance.md +++ b/docs/IE_DG/Intro_to_Performance.md @@ -34,7 +34,7 @@ Refer to the [Benchmark App](../../inference-engine/samples/benchmark_app/README ## Using Caching API for first inference latency optimization Since with the 2021.4 release, Inference Engine provides an ability to enable internal caching of loaded networks. This can significantly reduce load network latency for some devices at application startup. -Internally caching uses plugin's Export/ImportNetwork flow, like it is done for [Compile tool](../../inference-engine/tools/compile_tool/README.md), using the regular ReadNetwork/LoadNetwork API. +Internally caching uses plugin's Export/ImportNetwork flow, like it is done for [Compile tool](../../tools/compile_tool/README.md), using the regular ReadNetwork/LoadNetwork API. Refer to the [Model Caching Overview](Model_caching_overview.md) for more detailed explanation. ## Using Async API diff --git a/docs/IE_DG/Model_caching_overview.md b/docs/IE_DG/Model_caching_overview.md index 10d3d6cf99e302..d480d7626d9859 100644 --- a/docs/IE_DG/Model_caching_overview.md +++ b/docs/IE_DG/Model_caching_overview.md @@ -20,7 +20,7 @@ As described in [Inference Engine Developer Guide](Deep_Learning_Inference_Engin Step #5 can potentially perform several time-consuming device-specific optimizations and network compilations, and such delays can lead to bad user experience on application startup. To avoid this, some devices offer -Import/Export network capability, and it is possible to either use [Compile tool](../../inference-engine/tools/compile_tool/README.md) +Import/Export network capability, and it is possible to either use [Compile tool](../../tools/compile_tool/README.md) or enable model caching to export compiled network automatically. Reusing cached networks can significantly reduce load network time. diff --git a/docs/IE_DG/Tools_Overview.md b/docs/IE_DG/Tools_Overview.md index f0741105387617..0d408ebf1d3bb4 100644 --- a/docs/IE_DG/Tools_Overview.md +++ b/docs/IE_DG/Tools_Overview.md @@ -9,8 +9,8 @@ The OpenVINO™ toolkit installation includes the following tools: |[Accuracy Checker Tool](@ref omz_tools_accuracy_checker) | `/deployment_tools/tools/open_model_zoo/tools/accuracy_checker`| |[Post-Training Optimization Tool](@ref pot_README) | `/deployment_tools/tools/post_training_optimization_toolkit`| |[Model Downloader](@ref omz_tools_downloader) | `/deployment_tools/tools/model_downloader`| -|[Cross Check Tool](../../inference-engine/tools/cross_check_tool/README.md) | `/deployment_tools/tools/cross_check_tool`| -|[Compile Tool](../../inference-engine/tools/compile_tool/README.md) | `/deployment_tools/inference_engine/lib/intel64/`| +|[Cross Check Tool](../../tools/cross_check_tool/README.md) | `/deployment_tools/tools/cross_check_tool`| +|[Compile Tool](../../tools/compile_tool/README.md) | `/deployment_tools/inference_engine/lib/intel64/`| ## See Also diff --git a/docs/index.md b/docs/index.md index 4f1012b5353adb..f767109e61692b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,7 +45,7 @@ Useful documents for model optimization: ### Running and Tuning Inference The other core component of OpenVINO™ is the [Inference Engine](IE_DG/Deep_Learning_Inference_Engine_DevGuide.md), which manages the loading and compiling of the optimized neural network model, runs inference operations on input data, and outputs the results. Inference Engine can execute synchronously or asynchronously, and its plugin architecture manages the appropriate compilations for execution on multiple Intel® devices, including both workhorse CPUs and specialized graphics and video processing platforms (see below, Packaging and Deployment). -You can use OpenVINO™ Tuning Utilities with the Inference Engine to trial and test inference on your model. The Benchmark utility uses an input model to run iterative tests for throughput or latency measures, and the [Cross Check Utility](../inference-engine/tools/cross_check_tool/README.md) compares performance of differently configured inferences. +You can use OpenVINO™ Tuning Utilities with the Inference Engine to trial and test inference on your model. The Benchmark utility uses an input model to run iterative tests for throughput or latency measures, and the [Cross Check Utility](../tools/cross_check_tool/README.md) compares performance of differently configured inferences. For a full browser-based studio integrating these other key tuning utilities, try the [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction). ![](img/OV-diagram-step3.png) @@ -81,7 +81,7 @@ The Inference Engine's plug-in architecture can be extended to meet other specia * [Deployment Manager Guide](./install_guides/deployment-manager-tool.md) -## OpenVINO™ Toolkit Components +## OpenVINO™ Toolkit Components Intel® Distribution of OpenVINO™ toolkit includes the following components: @@ -90,8 +90,8 @@ Intel® Distribution of OpenVINO™ toolkit includes the following components: - [Inference Engine Samples](IE_DG/Samples_Overview.md): A set of simple console applications demonstrating how to use the Inference Engine in your applications. - [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction): A web-based graphical environment that allows you to easily use various sophisticated OpenVINO™ toolkit components. - [Post-training Optimization Tool](@ref pot_README): A tool to calibrate a model and then execute it in the INT8 precision. -- Additional Tools: A set of tools to work with your models including [Benchmark App](../inference-engine/tools/benchmark_tool/README.md), [Cross Check Tool](../inference-engine/tools/cross_check_tool/README.md), [Compile tool](../inference-engine/tools/compile_tool/README.md). -- [Open Model Zoo](@ref omz_models_group_intel) +- Additional Tools: A set of tools to work with your models including [Benchmark App](../tools/benchmark_tool/README.md), [Cross Check Tool](../tools/cross_check_tool/README.md), [Compile tool](../tools/compile_tool/README.md). +- [Open Model Zoo](@ref omz_models_group_intel) - [Demos](@ref omz_demos): Console applications that provide robust application templates to help you implement specific deep learning scenarios. - Additional Tools: A set of tools to work with your models including [Accuracy Checker Utility](@ref omz_tools_accuracy_checker) and [Model Downloader](@ref omz_tools_downloader). - [Documentation for Pretrained Models](@ref omz_models_group_intel): Documentation for pre-trained models that are available in the [Open Model Zoo repository](https://github.com/openvinotoolkit/open_model_zoo). diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt index 69a71eb55b5be2..fdefac633c77c1 100644 --- a/inference-engine/CMakeLists.txt +++ b/inference-engine/CMakeLists.txt @@ -12,7 +12,6 @@ if(ENABLE_PYTHON) add_subdirectory(ie_bridges/python) endif() -add_subdirectory(tools) add_subdirectory(samples) openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils) diff --git a/inference-engine/tools/CMakeLists.txt b/inference-engine/tools/CMakeLists.txt deleted file mode 100644 index 9112658ce5ea37..00000000000000 --- a/inference-engine/tools/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2018-2021 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -add_subdirectory(compile_tool) diff --git a/inference-engine/tools/package_BOM.txt b/inference-engine/tools/package_BOM.txt deleted file mode 100644 index b1d58875c4819e..00000000000000 --- a/inference-engine/tools/package_BOM.txt +++ /dev/null @@ -1,6 +0,0 @@ -cross_check_tool/__init__.py -cross_check_tool/utils.py -cross_check_tool/requirements.txt -cross_check_tool/README.md -cross_check_tool/cross_check_tool.py -compile_tool/README.md \ No newline at end of file diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 6cf6e02c1c44b9..ac094ce648b46b 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -47,14 +47,6 @@ if(UNIX) COMPONENT install_dependencies) endif() -# install DeploymentManager - -ie_cpack_add_component(deployment_manager REQUIRED) -install(DIRECTORY deployment_manager/ - DESTINATION deployment_tools/tools/deployment_manager - COMPONENT deployment_manager - USE_SOURCE_PERMISSIONS) - # install files for demo ie_cpack_add_component(demo_scripts DEPENDS core) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index fc468719d16f2c..4d52674546e73f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,19 +1,35 @@ # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 + cmake_minimum_required(VERSION 3.13) -project(python_tools) +project(OpenVINO_Tools DESCRIPTION "OpenVINO toolkit Development Tools") if(NOT DEFINED OpenVINO_SOURCE_DIR) find_package(InferenceEngineDeveloperPackage QUIET) + set(python_tools_only ON) +endif() + +# C++ tools + +if(NOT python_tools_only) + add_subdirectory(compile_tool) endif() +# Python tools + +# install deployment_manager + +ie_cpack_add_component(deployment_manager REQUIRED) +install(DIRECTORY deployment_manager/ + DESTINATION deployment_tools/tools/deployment_manager + COMPONENT deployment_manager + USE_SOURCE_PERMISSIONS) + if(ENABLE_PYTHON) find_package(PythonInterp 3 REQUIRED) set(PYTHON_VERSION python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) - set(TARGET_NAME "python_tools") - if(WIN32) set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$/python_api/${PYTHON_VERSION}/openvino) else() @@ -21,24 +37,28 @@ if(ENABLE_PYTHON) endif() # creates a copy inside bin directory for developers to have ability running python benchmark_app - add_custom_target(${TARGET_NAME} ALL + add_custom_target(python_tools_benchmark ALL COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools - COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenVINO_SOURCE_DIR}/tools/benchmark_tool/openvino/tools/benchmark ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_tool/openvino/tools/benchmark + ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark ) ie_cpack_add_component(python_tools_${PYTHON_VERSION}) ie_cpack_add_component(python_tools) + # install cross_check_tool tool + install(DIRECTORY cross_check_tool + DESTINATION deployment_tools/tools + COMPONENT python_tools) + + # install benchmark_app tool install(FILES benchmark_tool/benchmark_app.py benchmark_tool/README.md benchmark_tool/requirements.txt DESTINATION deployment_tools/tools/benchmark_tool COMPONENT python_tools) - install(DIRECTORY ../inference-engine/tools/cross_check_tool - DESTINATION deployment_tools/tools - COMPONENT python_tools) - + # install openvino/tools/benchmark as a python package install(DIRECTORY benchmark_tool/openvino/tools/benchmark DESTINATION python/${PYTHON_VERSION}/openvino/tools USE_SOURCE_PERMISSIONS diff --git a/inference-engine/tools/compile_tool/CMakeLists.txt b/tools/compile_tool/CMakeLists.txt similarity index 100% rename from inference-engine/tools/compile_tool/CMakeLists.txt rename to tools/compile_tool/CMakeLists.txt diff --git a/inference-engine/tools/compile_tool/README.md b/tools/compile_tool/README.md similarity index 100% rename from inference-engine/tools/compile_tool/README.md rename to tools/compile_tool/README.md diff --git a/inference-engine/tools/compile_tool/main.cpp b/tools/compile_tool/main.cpp similarity index 100% rename from inference-engine/tools/compile_tool/main.cpp rename to tools/compile_tool/main.cpp diff --git a/inference-engine/tools/cross_check_tool/README.md b/tools/cross_check_tool/README.md similarity index 100% rename from inference-engine/tools/cross_check_tool/README.md rename to tools/cross_check_tool/README.md diff --git a/inference-engine/tools/cross_check_tool/__init__.py b/tools/cross_check_tool/__init__.py similarity index 100% rename from inference-engine/tools/cross_check_tool/__init__.py rename to tools/cross_check_tool/__init__.py diff --git a/inference-engine/tools/cross_check_tool/cross_check_tool.py b/tools/cross_check_tool/cross_check_tool.py similarity index 100% rename from inference-engine/tools/cross_check_tool/cross_check_tool.py rename to tools/cross_check_tool/cross_check_tool.py diff --git a/inference-engine/tools/cross_check_tool/requirements.txt b/tools/cross_check_tool/requirements.txt similarity index 100% rename from inference-engine/tools/cross_check_tool/requirements.txt rename to tools/cross_check_tool/requirements.txt diff --git a/inference-engine/tools/cross_check_tool/utils.py b/tools/cross_check_tool/utils.py similarity index 100% rename from inference-engine/tools/cross_check_tool/utils.py rename to tools/cross_check_tool/utils.py diff --git a/scripts/deployment_manager/configs/darwin.json b/tools/deployment_manager/configs/darwin.json similarity index 100% rename from scripts/deployment_manager/configs/darwin.json rename to tools/deployment_manager/configs/darwin.json diff --git a/scripts/deployment_manager/configs/linux.json b/tools/deployment_manager/configs/linux.json similarity index 100% rename from scripts/deployment_manager/configs/linux.json rename to tools/deployment_manager/configs/linux.json diff --git a/scripts/deployment_manager/configs/windows.json b/tools/deployment_manager/configs/windows.json similarity index 100% rename from scripts/deployment_manager/configs/windows.json rename to tools/deployment_manager/configs/windows.json diff --git a/scripts/deployment_manager/deployman/config.py b/tools/deployment_manager/deployman/config.py similarity index 100% rename from scripts/deployment_manager/deployman/config.py rename to tools/deployment_manager/deployman/config.py diff --git a/scripts/deployment_manager/deployman/logger.py b/tools/deployment_manager/deployman/logger.py similarity index 100% rename from scripts/deployment_manager/deployman/logger.py rename to tools/deployment_manager/deployman/logger.py diff --git a/scripts/deployment_manager/deployman/main.py b/tools/deployment_manager/deployman/main.py similarity index 100% rename from scripts/deployment_manager/deployman/main.py rename to tools/deployment_manager/deployman/main.py diff --git a/scripts/deployment_manager/deployman/ui.py b/tools/deployment_manager/deployman/ui.py similarity index 100% rename from scripts/deployment_manager/deployman/ui.py rename to tools/deployment_manager/deployman/ui.py diff --git a/scripts/deployment_manager/deployment_manager.py b/tools/deployment_manager/deployment_manager.py similarity index 100% rename from scripts/deployment_manager/deployment_manager.py rename to tools/deployment_manager/deployment_manager.py