* Moved and merged mo/ and extensions/ into openvino/tools/mo
* edited imports
* edited docs to use mo script from entry_point
* edited MO transformations list loading and setup.py
* changed full path -> 'mo' entry point in docs (leftovers)
* corrected package_BOM
* updated resolving --transformation_config in cli_parser.py
* pkgutil-style __init__.py, added summarize_graph into entry points
* updated DOCs for the new --transformations_config
* fix select
* updated install instructions, fixed setup.py for windows and python_version < 3.8
* fixed typo in requirements.txt
* resolved conflicts
* removed creating custom __init__.py from setup.py
* corrected folder with caffe proto
* corrected loading user defined extensions
* fix openvino.tools.mo import in serialize.py
* corrected layer tests for new namespace
* fix in get_testdata.py
* moved model-optimizer into tools/
* renamed import in POT
* corrected mo.yml
* correct CMakeLists.txt for the newest tools/mo
* corrected find_ie_version.py
* docs and openvino-dev setup.py update for the newest tools/mo
* miscellaneous leftovers and fixes
* corrected CI files, pybind11_add_module in CMakeLists.txt and use of tools/mo path instead of tools/model_optimizer
* add_subdirectory pybind11 for tools/mo
* POT path fix
* updated setupvars.sh setupvars.bat
* Revert "updated setupvars.sh setupvars.bat"
This reverts commit c011142340.
* removed model-optimizer env variables from setupvars
* updated CMakeLists.txt to pack MO properly with tests component
* corrected left imports, corrected loading requirements for layer tests
* mo doc typo correction
* minor corrections in docs; removed summarize_graph from entry_points
* get_started_windows.md, MonoDepth_how_to.md corrections, mo path corrections
91 lines
2.8 KiB
CMake
91 lines
2.8 KiB
CMake
# Copyright (C) 2018-2021 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
# C++ tools
|
|
#
|
|
|
|
add_subdirectory(compile_tool)
|
|
|
|
#
|
|
# Python tools
|
|
#
|
|
|
|
# install deployment_manager
|
|
|
|
ie_cpack_add_component(deployment_manager REQUIRED)
|
|
|
|
install(DIRECTORY deployment_manager
|
|
DESTINATION tools
|
|
COMPONENT deployment_manager
|
|
USE_SOURCE_PERMISSIONS)
|
|
|
|
# outbound requirements.txt files for openvino-dev package
|
|
|
|
set(REQUIREMENTS_IN "${CMAKE_CURRENT_SOURCE_DIR}/requirements_dev.in")
|
|
set(EXTRAS_LIST _ caffe kaldi mxnet onnx pytorch tensorflow tensorflow2)
|
|
ie_cpack_add_component(openvino_dev_req_files)
|
|
|
|
foreach(EXTRAS ${EXTRAS_LIST})
|
|
if(${EXTRAS} STREQUAL "_")
|
|
set(REQUIREMENTS_OUT "requirements.txt")
|
|
set(EXTRAS "")
|
|
else()
|
|
set(REQUIREMENTS_OUT "requirements_${EXTRAS}.txt")
|
|
set(EXTRAS "[${EXTRAS}]")
|
|
endif()
|
|
configure_file(${REQUIREMENTS_IN} ${REQUIREMENTS_OUT})
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${REQUIREMENTS_OUT}
|
|
DESTINATION tools
|
|
COMPONENT openvino_dev_req_files
|
|
EXCLUDE_FROM_ALL)
|
|
endforeach()
|
|
|
|
# copy benchmark_app scripts
|
|
|
|
if(ENABLE_PYTHON)
|
|
find_package(PythonInterp 3 REQUIRED)
|
|
set(PYTHON_VERSION python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
|
|
|
if(WIN32)
|
|
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$<CONFIG>/python_api/${PYTHON_VERSION}/openvino)
|
|
else()
|
|
set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/python_api/${PYTHON_VERSION}/openvino)
|
|
endif()
|
|
|
|
# creates a copy inside bin directory for developers to have ability running python benchmark_app
|
|
add_custom_target(python_tools_benchmark ALL
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_tool/openvino/tools/benchmark
|
|
${PYTHON_BRIDGE_OUTPUT_DIRECTORY}/tools/benchmark
|
|
)
|
|
|
|
# install BA tool for tests
|
|
install(FILES benchmark_tool/README.md
|
|
benchmark_tool/requirements.txt
|
|
DESTINATION tools/benchmark_tool
|
|
COMPONENT tests
|
|
EXCLUDE_FROM_ALL)
|
|
|
|
install(PROGRAMS benchmark_tool/benchmark_app.py
|
|
DESTINATION tools/benchmark_tool
|
|
COMPONENT tests
|
|
EXCLUDE_FROM_ALL)
|
|
|
|
# install openvino/tools/benchmark as a python package
|
|
install(DIRECTORY benchmark_tool/openvino/tools/benchmark
|
|
DESTINATION python/${PYTHON_VERSION}/openvino/tools
|
|
USE_SOURCE_PERMISSIONS
|
|
COMPONENT tests
|
|
EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
add_subdirectory(mo)
|
|
|
|
# build and install openvino-dev wheel
|
|
|
|
if(ENABLE_WHEEL)
|
|
add_subdirectory(openvino_dev)
|
|
endif()
|