diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index c076c5156da039..2b77ba5282f350 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -27,11 +27,15 @@ runs: name: Install 'actions/setup-python@v4' dependencies shell: bash run: apt-get update && apt-get install -y ca-certificates software-properties-common + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup sudo and python3 shell: bash run: apt-get update && apt-get install -y sudo python3 # Needed for the deadsnakes action + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input - if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }} name: Setup Python ${{ inputs.version }} diff --git a/.github/components.yml b/.github/components.yml index a71c1890c91460..8fa3a1f256d09a 100644 --- a/.github/components.yml +++ b/.github/components.yml @@ -214,7 +214,8 @@ IE_Tests: MO: revalidate: - - POT + - PyTorch_FE + - TF_FE build: - Python_API diff --git a/.github/workflows/job_cxx_unit_tests.yml b/.github/workflows/job_cxx_unit_tests.yml index e2c1cfc0fa70f4..dd911edaa80341 100644 --- a/.github/workflows/job_cxx_unit_tests.yml +++ b/.github/workflows/job_cxx_unit_tests.yml @@ -1,4 +1,4 @@ -name: Samples +name: C++ Unit Tests on: workflow_call: diff --git a/.github/workflows/job_onnx_models_tests.yml b/.github/workflows/job_onnx_models_tests.yml index 1fbc0c11fe960c..07d8d12d48a386 100644 --- a/.github/workflows/job_onnx_models_tests.yml +++ b/.github/workflows/job_onnx_models_tests.yml @@ -103,4 +103,4 @@ jobs: python3 -m pip install pytest-xdist[psutil] pytest-forked - name: ONNX Models Tests - run: python3 -m pytest --backend="CPU" --model_zoo_dir="${MODELS_SHARE_PATH}" ${INSTALL_TEST_DIR}/onnx/tests/tests_python/test_zoo_models.py -v -n 12 --forked -k 'not _cuda' --model_zoo_xfail + run: python3 -m pytest --backend="CPU" --model_zoo_dir="${MODELS_SHARE_PATH}" ${INSTALL_TEST_DIR}/onnx/tests/tests_python/test_zoo_models.py -v -n auto --forked -k 'not _cuda' --model_zoo_xfail diff --git a/.github/workflows/job_openvino_js.yml b/.github/workflows/job_openvino_js.yml new file mode 100644 index 00000000000000..b36b48a3b718bc --- /dev/null +++ b/.github/workflows/job_openvino_js.yml @@ -0,0 +1,61 @@ +name: OpenVINO JS API + +on: + workflow_call: + inputs: + runner: + description: 'Machine on which the tests would run' + type: string + required: true + container: + description: 'JSON to be converted to the value of the "container" configuration for the job' + type: string + required: false + default: '{"image": null}' + +jobs: + JS_API: + name: OpenVINO JS API + timeout-minutes: 10 + runs-on: ${{ inputs.runner }} + container: ${{ fromJSON(inputs.container) }} + defaults: + run: + shell: bash + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + OPENVINO_JS_DIR: ${{ github.workspace }}/openvino/src/bindings/js + OPENVINO_JS_LIBS_DIR: ${{ github.workspace }}/openvino/src/bindings/js/node/bin + NODE_VERSION: 18 + steps: + - name: Fetch OpenVINO JS sources + uses: actions/checkout@v4 + with: + sparse-checkout: | + src/bindings/js + path: 'openvino' + + # Needed as ${{ github.workspace }} is not working correctly when using Docker + - name: Setup Variables + run: | + echo "OPENVINO_JS_DIR=$GITHUB_WORKSPACE/openvino/src/bindings/js" >> "$GITHUB_ENV" + echo "OPENVINO_JS_LIBS_DIR=$GITHUB_WORKSPACE/openvino/src/bindings/js/node/bin" >> "$GITHUB_ENV" + + - name: Download OpenVINO JS package + uses: actions/download-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.OPENVINO_JS_LIBS_DIR }} + + - name: Setup Node ${{ env.NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Configure OpenVINO JS API + working-directory: ${{ env.OPENVINO_JS_DIR }}/node + run: npm i + + - name: Test OpenVINO JS API + working-directory: ${{ env.OPENVINO_JS_DIR }}/node + run: npm run test diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b514e6bf36d329..4c7701fc444292 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -65,6 +65,7 @@ jobs: OPENVINO_REPO: /__w/openvino/openvino/openvino OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib INSTALL_DIR: /__w/openvino/openvino/openvino_install + INSTALL_DIR_JS: /__w/openvino/openvino/openvino_install/js INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install DEVELOPER_PACKAGE_DIR: /__w/openvino/openvino/developer_package_install BUILD_DIR: /__w/openvino/openvino/openvino_build @@ -222,6 +223,15 @@ jobs: -B ${BUILD_DIR} cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} + - name: CMake configure, build and install - OpenVINO JS API + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + run: + cmake -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${OPENVINO_REPO} -B ${BUILD_DIR} + + cmake --build ${BUILD_DIR} --parallel + + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_JS} -P ${BUILD_DIR}/cmake_install.cmake + # # Upload build artifacts # @@ -234,6 +244,14 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz if-no-files-found: 'error' + - name: Upload openvino js package + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: actions/upload-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.INSTALL_DIR_JS }} + if-no-files-found: 'error' + - name: Upload openvino developer package if: ${{ always() }} uses: actions/upload-artifact@v3 @@ -275,6 +293,15 @@ jobs: image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04' affected-components: ${{ needs.smart_ci.outputs.affected_components }} + JS_API: + name: OpenVINO JS API + needs: [ Build, Smart_CI ] + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: ./.github/workflows/job_openvino_js.yml + with: + runner: 'aks-linux-4-cores-16gb' + container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}' + Conformance: needs: [ Build, Smart_CI ] timeout-minutes: ${{ matrix.TEST_TYPE == 'API' && 5 || 15 }} diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.yml index e6838cc78a224f..e069352e07b4e3 100644 --- a/.github/workflows/linux_arm64.yml +++ b/.github/workflows/linux_arm64.yml @@ -67,6 +67,7 @@ jobs: OPENVINO_REPO: /__w/openvino/openvino/openvino OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib INSTALL_DIR: /__w/openvino/openvino/openvino_install + INSTALL_DIR_JS: /__w/openvino/openvino/openvino_install/js INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install DEVELOPER_PACKAGE_DIR: /__w/openvino/openvino/developer_package_install BUILD_DIR: /__w/openvino/openvino/openvino_build @@ -221,6 +222,20 @@ jobs: -B ${BUILD_DIR} cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} + - name: CMake configure, build and install - OpenVINO JS API + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + run: | + cmake \ + -DCPACK_GENERATOR=NPM \ + -DENABLE_SYSTEM_TBB=OFF -UTBB* \ + -DENABLE_INTEL_GPU=OFF \ + -S ${OPENVINO_REPO} \ + -B ${BUILD_DIR} + + cmake --build ${BUILD_DIR} --parallel + + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_JS} -P ${BUILD_DIR}/cmake_install.cmake + # # Upload build artifacts # @@ -241,6 +256,14 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz if-no-files-found: 'error' + - name: Upload openvino js package + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: actions/upload-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.INSTALL_DIR_JS }} + if-no-files-found: 'error' + - name: Upload openvino debian packages if: ${{ 'false' }} uses: actions/upload-artifact@v3 @@ -275,6 +298,15 @@ jobs: image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04' affected-components: ${{ needs.smart_ci.outputs.affected_components }} + JS_API: + name: OpenVINO JS API + needs: [ Build, Smart_CI ] + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: ./.github/workflows/job_openvino_js.yml + with: + runner: 'aks-linux-16-cores-arm' + container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}' + ONNX_Runtime: name: ONNX Runtime Integration if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 2a59d9de4d50b2..c61fe6a4a9cc83 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -73,6 +73,7 @@ jobs: OPENVINO_REPO: ${{ github.workspace }}/openvino OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib INSTALL_DIR: ${{ github.workspace }}/openvino_install + INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install BUILD_DIR: ${{ github.workspace }}/build steps: @@ -190,6 +191,17 @@ jobs: -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} + - name: CMake configure, build and install - OpenVINO JS API + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + run: | + cmake \ + -DCPACK_GENERATOR=NPM \ + -S ${{ env.OPENVINO_REPO }} \ + -B ${{ env.BUILD_DIR }} + + cmake --build ${{ env.BUILD_DIR }} --parallel + + cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR_JS }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake # # Upload build artifacts # @@ -210,6 +222,14 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz if-no-files-found: 'error' + - name: Upload openvino js package + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: actions/upload-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.INSTALL_DIR_JS }} + if-no-files-found: 'error' + Samples: needs: [ Build, Smart_CI ] if: fromJSON(needs.smart_ci.outputs.affected_components).samples @@ -218,6 +238,14 @@ jobs: runner: 'macos-13' affected-components: ${{ needs.smart_ci.outputs.affected_components }} + JS_API: + name: OpenVINO JS API + needs: [ Build, Smart_CI ] + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: ./.github/workflows/job_openvino_js.yml + with: + runner: 'macos-13' + CXX_Unit_Tests: name: C++ unit tests needs: [ Build, Smart_CI ] diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.yml index ea96b26c465a7e..02d494c7c16522 100644 --- a/.github/workflows/mac_arm64.yml +++ b/.github/workflows/mac_arm64.yml @@ -72,6 +72,7 @@ jobs: OPENVINO_REPO: ${{ github.workspace }}/openvino OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib INSTALL_DIR: ${{ github.workspace }}/openvino_install + INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/js INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install BUILD_DIR: ${{ github.workspace }}/build steps: @@ -189,6 +190,17 @@ jobs: -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} + - name: CMake configure, build and install - OpenVINO JS API + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + run: | + cmake \ + -DCPACK_GENERATOR=NPM \ + -S ${{ env.OPENVINO_REPO }} \ + -B ${{ env.BUILD_DIR }} + + cmake --build ${{ env.BUILD_DIR }} --parallel + + cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR_JS }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake # # Upload build artifacts # @@ -209,6 +221,14 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz if-no-files-found: 'error' + - name: Upload openvino js package + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: actions/upload-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.INSTALL_DIR_JS }} + if-no-files-found: 'error' + Samples: needs: Build uses: ./.github/workflows/job_samples_tests.yml @@ -216,6 +236,14 @@ jobs: runner: 'macos-13-xlarge' affected-components: ${{ needs.smart_ci.outputs.affected_components }} + JS_API: + name: OpenVINO JS API + needs: [ Build, Smart_CI ] + if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: ./.github/workflows/job_openvino_js.yml + with: + runner: 'macos-13-xlarge' + CXX_Unit_Tests: name: C++ unit tests needs: [ Build, Smart_CI ] diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 49d6da1d090a7c..da4528fe77322e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -54,6 +54,7 @@ jobs: OPENVINO_REPO: "${{ github.workspace }}\\openvino" OPENVINO_CONTRIB_REPO: "${{ github.workspace }}\\openvino_contrib" INSTALL_DIR: "${{ github.workspace }}\\openvino_install" + INSTALL_DIR_JS: "${{ github.workspace }}\\openvino_install\\js" INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install" BUILD_DIR: "${{ github.workspace }}\\openvino_build" # TODO: specify version of compiler here @@ -194,6 +195,16 @@ jobs: -B ${{ env.BUILD_DIR }} cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + - name: CMake configure, build and install - OpenVINO JS API + if: ${{ 'false' }} # 128689 + # if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + run: + cmake -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} + + cmake --build ${{ env.BUILD_DIR }} --parallel + + cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR_JS }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + - name: Upload openvino package uses: actions/upload-artifact@v3 with: @@ -208,6 +219,15 @@ jobs: path: ${{ env.BUILD_DIR }}/openvino_tests.zip if-no-files-found: 'error' + - name: Upload openvino js package + if: ${{ 'false' }} # 128689 + # if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + uses: actions/upload-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.INSTALL_DIR_JS }} + if-no-files-found: 'error' + Samples: needs: [Build, Smart_CI] if: fromJSON(needs.smart_ci.outputs.affected_components).samples @@ -289,6 +309,51 @@ jobs: path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml if-no-files-found: 'error' + JS_API: + name: JS API + needs: [ Build, Smart_CI ] + defaults: + run: + shell: pwsh + runs-on: 'aks-win-4-cores-8gb' + env: + OPENVINO_JS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js" + OPENVINO_JS_LIBS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js\\node\\bin" + if: ${{ 'false' }} # 128689 + # if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API + + steps: + - name: Fetch OpenVINO JS sources + uses: actions/checkout@v4 + with: + sparse-checkout: | + src/bindings/js + path: 'openvino' + + - name: Download OpenVINO js package + uses: actions/download-artifact@v3 + with: + name: openvino_js_package + path: ${{ env.OPENVINO_JS_LIBS_DIR }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Configure OpenVINO JS + working-directory: ${{ env.OPENVINO_JS_DIR }}/node + run: npm i + + - name: Test OpenVINO JS + working-directory: ${{ env.OPENVINO_JS_DIR }}/node + run: npm test + + - name: Test OpenVINO JS (cmd) + shell: cmd + working-directory: ${{ env.OPENVINO_JS_DIR }}/node + run: call npm test + Python_Unit_Tests: name: Python unit tests needs: [Build, Smart_CI] diff --git a/CMakeLists.txt b/CMakeLists.txt index 82277e5c875cfb..549f7c40a2a6e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,11 @@ if(POLICY CMP0091) cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY endif() +# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() + project(OpenVINO DESCRIPTION "OpenVINO toolkit") find_package(OpenVINODeveloperScripts REQUIRED diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86ca1d88b5c6d7..7faaa08d4792e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,7 +61,7 @@ product better. [./docs/dev](https://github.com/openvinotoolkit/openvino/tree/master/docs/dev) folder. * **User documentation** is built from several sources and published at - [docs.openvino.ai](docs.openvino.ai), which is the recommended place for reading + [docs.openvino.ai](https://docs.openvino.ai/), which is the recommended place for reading these documents. Use the files maintained in this repository only for editing purposes. * The easiest way to help with documentation is to review it and provide feedback on the @@ -69,7 +69,7 @@ product better. or think more information should be added, you can reach out to any of the documentation contributors to discuss the potential changes. - You can also create a Pull Request directly, following the [editor's guide](./docs/CONTRIBUTING_DOCS.md). + You can also create a Pull Request directly, following the [editor's guide](./CONTRIBUTING_DOCS.md). ### Promote and Support OpenVINO @@ -151,4 +151,4 @@ We'll make sure to review your Pull Request as soon as possible and provide you ## License By contributing to the OpenVINO project, you agree that your contributions will be -licensed under the terms stated in the [LICENSE](./LICENSE.md) file. +licensed under the terms stated in the [LICENSE](./LICENSE) file. diff --git a/CONTRIBUTING_PR.md b/CONTRIBUTING_PR.md index df0d4ec87bd248..a6717b5336e60d 100644 --- a/CONTRIBUTING_PR.md +++ b/CONTRIBUTING_PR.md @@ -56,7 +56,7 @@ Regardless of the automated tests, you should ensure the quality of your changes ## Need Additional Help? Check these Articles -* [How to create a fork](https://help.github.com/articles/fork-a-rep) +* [How to create a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) * [Install Git](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) * If you want to add a new sample, please have a look at the Guide for contributing to C++/C/Python IE samples and add the license statement at the top of new files for diff --git a/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake b/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake index fc9abc64b9e4cc..82b556cad6c5a6 100644 --- a/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake +++ b/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake @@ -206,6 +206,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0025 NEW) set(CMAKE_POLICY_DEFAULT_CMP0026 NEW) # CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name set(CMAKE_POLICY_DEFAULT_CMP0042 NEW) +# CMake 3.1+: Simplify variable reference and escape sequence evaluation. +set(CMAKE_POLICY_DEFAULT_CMP0053 NEW) # CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`. set(CMAKE_POLICY_DEFAULT_CMP0068 NEW) # CMake 3.12+: find_package() uses _ROOT variables. diff --git a/cmake/developer_package/api_validator/api_validator.cmake b/cmake/developer_package/api_validator/api_validator.cmake index 4eeb9e1e5e0b7e..090a8f84fbcc65 100644 --- a/cmake/developer_package/api_validator/api_validator.cmake +++ b/cmake/developer_package/api_validator/api_validator.cmake @@ -3,15 +3,15 @@ # if(WIN32) - set(PROGRAMFILES_ENV "ProgramFiles(X86)") + set(PROGRAMFILES_ENV "ProgramFiles\(X86\)") # check that PROGRAMFILES_ENV is defined, because in case of cross-compilation for Windows # we don't have such variable - if(DEFINED ENV{PROGRAMFILES_ENV}) + if(DEFINED ENV{${PROGRAMFILES_ENV}}) file(TO_CMAKE_PATH $ENV{${PROGRAMFILES_ENV}} PROGRAMFILES) set(WDK_PATHS "${PROGRAMFILES}/Windows Kits/10/bin/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}/x64" - "${PROGRAMFILES}/Windows Kits/10/bin/x64") + "${PROGRAMFILES}/Windows Kits/10/bin/x64") message(STATUS "Trying to find apivalidator in: ") foreach(wdk_path IN LISTS WDK_PATHS) @@ -19,9 +19,9 @@ if(WIN32) endforeach() find_host_program(ONECORE_API_VALIDATOR - NAMES apivalidator - PATHS ${WDK_PATHS} - DOC "ApiValidator for OneCore compliance") + NAMES apivalidator + PATHS ${WDK_PATHS} + DOC "ApiValidator for OneCore compliance") if(ONECORE_API_VALIDATOR) message(STATUS "Found apivalidator: ${ONECORE_API_VALIDATOR}") diff --git a/cmake/developer_package/packaging/npm.cmake b/cmake/developer_package/packaging/npm.cmake index 3d3c74e34d54ac..16be623ff5e7ea 100644 --- a/cmake/developer_package/packaging/npm.cmake +++ b/cmake/developer_package/packaging/npm.cmake @@ -25,38 +25,10 @@ macro(ov_npm_cpack_set_dirs) set(OV_CPACK_DEVREQDIR .) set(OV_CPACK_PYTHONDIR .) - if(WIN32) - set(OV_CPACK_LIBRARYDIR .) - set(OV_CPACK_RUNTIMEDIR .) - set(OV_CPACK_ARCHIVEDIR .) - elseif(APPLE) - set(OV_CPACK_LIBRARYDIR .) - set(OV_CPACK_RUNTIMEDIR .) - set(OV_CPACK_ARCHIVEDIR .) - else() - set(OV_CPACK_LIBRARYDIR .) - set(OV_CPACK_RUNTIMEDIR .) - set(OV_CPACK_ARCHIVEDIR .) - endif() - set(OV_CPACK_LIBRARYDIR .) set(OV_CPACK_ARCHIVEDIR .) set(OV_CPACK_PLUGINSDIR .) - set(OV_CPACK_IE_CMAKEDIR .) - set(OV_CPACK_NGRAPH_CMAKEDIR .) - set(OV_CPACK_OPENVINO_CMAKEDIR .) - set(OV_CPACK_DOCDIR .) - set(OV_CPACK_LICENSESDIR licenses) - set(OV_CPACK_PYTHONDIR .) - - # non-native stuff - set(OV_CPACK_SHAREDIR .) - set(OV_CPACK_SAMPLESDIR .) - set(OV_CPACK_DEVREQDIR .) - unset(OV_CPACK_SHAREDIR) - - # skipped during debian packaging - set(OV_CPACK_WHEELSDIR .) + set(OV_CPACK_RUNTIMEDIR .) endmacro() ov_npm_cpack_set_dirs() diff --git a/cmake/features.cmake b/cmake/features.cmake index 2a970e5720cea1..7fdd8e0bd4c4ca 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -193,6 +193,9 @@ ov_dependent_option (ENABLE_SYSTEM_SNAPPY "Enables use of system version of Snap ov_dependent_option (ENABLE_PYTHON_PACKAGING "Enables packaging of Python API in APT / YUM" OFF "ENABLE_PYTHON;UNIX" OFF) +ov_dependent_option (ENABLE_JS "Enables JS API building" ON + "NOT WIN32" OFF) + ov_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF) if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND) diff --git a/docs/dev/build_windows.md b/docs/dev/build_windows.md index b6321785c38970..bd326803513767 100644 --- a/docs/dev/build_windows.md +++ b/docs/dev/build_windows.md @@ -55,7 +55,7 @@ Supported configurations: ```sh pip install -r \src\bindings\python\src\compatibility\openvino\requirements-dev.txt ``` - 2. Second, enable the `-DENABLE_PYTHON=ON` in the CMake (Step #4) option above. To specify an exact Python version, use the following options (requires cmake 3.16 and higher): + 2. Second, enable the `-DENABLE_PYTHON=ON` in the CMake (Step #3) option above. To specify an exact Python version, use the following options (requires cmake 3.16 and higher): ```sh -DPython3_EXECUTABLE="C:\Program Files\Python11\python.exe" ``` diff --git a/docs/requirements.txt b/docs/requirements.txt index 77b88045445dd5..34a15149c88d29 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -13,7 +13,7 @@ imagesize==1.2.0 importlib-metadata==4.4.0 iniconfig==1.1.1 ipython==8.10.0 -Jinja2==3.1.2 +Jinja2==3.1.3 lxml>=4.9.2 MarkupSafe==2.1.1 mistune==2.0.3 diff --git a/samples/python/benchmark/bert_benchmark/bert_benchmark.py b/samples/python/benchmark/bert_benchmark/bert_benchmark.py index b15bbd48b34c84..f81eac29387182 100755 --- a/samples/python/benchmark/bert_benchmark/bert_benchmark.py +++ b/samples/python/benchmark/bert_benchmark/bert_benchmark.py @@ -57,7 +57,7 @@ def main(): sst2_sentences = sst2['validation']['sentence'] # Warm up encoded_warm_up = dict(tokenizer('Warm up sentence is here.', return_tensors='np')) - for _ in ireqs: + for _ in range(len(ireqs)): ireqs.start_async(encoded_warm_up) ireqs.wait_all() # Benchmark diff --git a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py index 0573642fb2fdaa..ce9431e3e5121d 100755 --- a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py +++ b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py @@ -52,7 +52,7 @@ def main(): for model_input in compiled_model.inputs: fill_tensor_random(ireq.get_tensor(model_input)) # Warm up - for _ in ireqs: + for _ in range(len(ireqs)): ireqs.start_async() ireqs.wait_all() # Benchmark for seconds_to_run seconds and at least niter iterations diff --git a/src/bindings/js/CMakeLists.txt b/src/bindings/js/CMakeLists.txt index 329a86c2fa6bee..20bf139a54a893 100644 --- a/src/bindings/js/CMakeLists.txt +++ b/src/bindings/js/CMakeLists.txt @@ -2,6 +2,10 @@ # SPDX-License-Identifier: Apache-2.0 # +if(NOT ENABLE_JS) + return() +endif() + project(OpenVINO_JS_API) add_subdirectory(node) diff --git a/src/bindings/js/node/CMakeLists.txt b/src/bindings/js/node/CMakeLists.txt index cc8918155f16d0..fffceb56799a96 100644 --- a/src/bindings/js/node/CMakeLists.txt +++ b/src/bindings/js/node/CMakeLists.txt @@ -2,10 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # -if(WIN32) - return() -endif() - if(CMAKE_VERSION VERSION_LESS 3.14) message(WARNING "JS API is not available with CMake version less than 3.14, skipping") return() diff --git a/src/plugins/intel_gna/CMakeLists.txt b/src/plugins/intel_gna/CMakeLists.txt index ce51c8fc88a156..c2103b670a2341 100644 --- a/src/plugins/intel_gna/CMakeLists.txt +++ b/src/plugins/intel_gna/CMakeLists.txt @@ -31,7 +31,6 @@ if(ENABLE_AVX2 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") add_compile_definitions(HAVE_AVX2=1) endif() - find_package(libGNA REQUIRED CONFIG PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake" @@ -51,14 +50,14 @@ ov_add_plugin(NAME ${TARGET_NAME} # Enable support of CC for the plugin ov_mark_target_as_cc(${TARGET_NAME}) -target_link_libraries(${TARGET_NAME} PRIVATE inference_engine_legacy - Threads::Threads libGNA) +target_link_libraries(${TARGET_NAME} PRIVATE inference_engine_legacy Threads::Threads libGNA) + target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) +target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $) -target_compile_definitions(${TARGET_NAME} - PRIVATE - _NO_MKL_ - ) +target_compile_definitions(${TARGET_NAME} PRIVATE _NO_MKL_) + +ov_set_threading_interface_for(${TARGET_NAME}) # must be called after all target_link_libraries ov_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) @@ -80,6 +79,7 @@ target_compile_definitions(${TARGET_NAME}_test_static USE_STATIC_IE) target_link_libraries(${TARGET_NAME}_test_static PUBLIC inference_engine_s inference_engine_transformations libGNA::API) + target_include_directories(${TARGET_NAME}_test_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src @@ -87,6 +87,12 @@ target_include_directories(${TARGET_NAME}_test_static PRIVATE $) +target_include_directories(${TARGET_NAME}_test_static SYSTEM + PUBLIC + $) + +ov_set_threading_interface_for(${TARGET_NAME}_test_static) + set_target_properties(${TARGET_NAME} ${TARGET_NAME}_test_static PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})