From 071d615444655913bb4a39231ac8fe0036235f78 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Wed, 6 Nov 2024 16:03:12 +0200 Subject: [PATCH 1/9] Updated build documentation --- .../intel_npu/tools/protopipe/README.md | 86 ++++++++----------- 1 file changed, 36 insertions(+), 50 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 00849ad8bddc9a..a25098b5134bf8 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -515,67 +515,53 @@ Iteration : ## How to build ### Prerequisites -1. Clone `npu-plugin` repository -2. Build OpenCV G-API with OpenVINO/ONNXRT support +1. Build OpenCV G-API with OpenVINO/ONNXRT support #### Build OpenCV G-API with OpenVINO/ONNXRT support -1. Clone OpenCV repo: +1. Clone and build [OpenVINO](https://github.com/openvinotoolkit/openvino) from sources + ``` + mkdir build && cd build + cmake ../ -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_PLUGINS_XML=ON \ + -DCMAKE_INSTALL_PREFIX=install \ + -DENABLE_DEBUG_CAPS=ON \ + -DENABLE_NPU_DEBUG_CAPS=ON .. + + cmake --build . --config Release --target install --parallel + ``` +2. Init OpenVINO enviroment + ``` + source /setupvars.sh + ``` +3. Clone OpenCV repo: ``` git clone https://github.com/opencv/opencv - cd opencv && git checkout 78195bc3df + cd opencv && git checkout 3919f33e21 + ``` +4. Build OpenCV G-API: + ``` + mkdir -p build && cd build + cmake ../ -DBUILD_LIST=gapi \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_OPENVINO=ON + cmake --build . --config Release --target opencv_gapi --parallel + ``` + If ONNX support is needed build OpenCV G-API with ONNX support: ``` -2. Build OpenCV G-API: - ``` mkdir -p build && cd build cmake ../ -DBUILD_LIST=gapi \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_OPENVINO=ON \ - -DOpenVINO_DIR= \ -DWITH_ONNX=ON \ -DORT_INSTALL_DIR= cmake --build . --config Release --target opencv_gapi --parallel - ``` -### In-plugin build - -1. Clone and build [OpenVINO](https://github.com/openvinotoolkit/openvino) from sources -2. Build OpenCV G-API with OpenVINO / ONNXRT support -3. Clone `npu-plugin` repository - ``` - git clone https://github.com/openvinotoolkit/npu_plugin - git submodule update --init --recursive - ``` -4. Build `Protopipe` as part of the `npu-plugin` build: - ``` - mkdir build && cd build - cmake ../ -DOpenCV_DIR= -DOpenVINODeveloperPackage_DIR= - cmake --build . --config Release --target protopipe --parallel - ``` - -### Standalone build -1. Build `yaml-cpp` - ``` - mkdir -p yaml-cpp_build cd && yaml-cpp_build - cmake ..//thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install - cmake --build . --config Release --target install --parallel - ``` -2. Build `gflags` - ``` - git clone https://github.com/gflags/gflags - cd gflags - mkdir -p gflags_build cd && gflags_build - cmake ../ -DCMAKE_INSTALL_PREFIX=install - cmake --build . --config Release --target install --parallel - ``` -3. Build `Protopipe` - ``` - mkdir -b protopipe_build && cd protopipe_build - cmake /tools/protopipe/ \ - -DOpenCV_DIR= \ - -Dgflags_DIR= \ - -DOpenVINO_DIR= \ - - cmake --build . --config Release --target protopipe --parallel - ``` + ``` +5. Build protopipe + ``` + cd + mkdir src/plugins/intel_npu/tools/protopipe/build && cd src/plugins/intel_npu/tools/protopipe/build + cmake ../ -DOpenCV_DIR=/home/sneaga/work/opencv/build -DCMAKE_BUILD_TYPE=Release + cmake --build . --target protopipe --parallel + ``` ### Verify the installation **Note**: Make sure `opencv_*` libraries are visible in the environment: - Windows: From c2e7a7560f56cffd10d57fe72a1782195d9d05b1 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Tue, 12 Nov 2024 14:41:33 +0200 Subject: [PATCH 2/9] Added back Standalone build --- .../intel_npu/tools/protopipe/README.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index a25098b5134bf8..5ae258ecf6e9a9 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -559,9 +559,34 @@ Iteration : ``` cd mkdir src/plugins/intel_npu/tools/protopipe/build && cd src/plugins/intel_npu/tools/protopipe/build - cmake ../ -DOpenCV_DIR=/home/sneaga/work/opencv/build -DCMAKE_BUILD_TYPE=Release + cmake ../ -DOpenCV_DIR= -DCMAKE_BUILD_TYPE=Release cmake --build . --target protopipe --parallel ``` +### Standalone build +1. Build `yaml-cpp` + ``` + mkdir -p yaml-cpp_build && cd yaml-cpp_build + cmake /src/plugins/intel_npu/thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install + cmake --build . --config Release --target install --parallel + ``` +2. Build `gflags` + ``` + git clone https://github.com/gflags/gflags + cd gflags + mkdir -p gflags_build && cd gflags_build + cmake ../ -DCMAKE_INSTALL_PREFIX=install + cmake --build . --config Release --target install --parallel + ``` +3. Build `Protopipe` + ``` + mkdir -p protopipe_build && cd protopipe_build + cmake /src/plugins/intel_npu/tools/protopipe \ + -DOpenCV_DIR= \ + -Dyaml_cpp_DIR= \ + -Dgflags_DIR= \ + + cmake --build . --config Release --target protopipe --parallel + ``` ### Verify the installation **Note**: Make sure `opencv_*` libraries are visible in the environment: - Windows: From dee8c406074465371023a5b098e7e8c31d375b4a Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Mon, 18 Nov 2024 14:42:15 +0200 Subject: [PATCH 3/9] Updated protopipe standalone build documentation --- src/plugins/intel_npu/tools/protopipe/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 5ae258ecf6e9a9..8b429878da596f 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -582,7 +582,7 @@ Iteration : mkdir -p protopipe_build && cd protopipe_build cmake /src/plugins/intel_npu/tools/protopipe \ -DOpenCV_DIR= \ - -Dyaml_cpp_DIR= \ + -Dyaml-cpp_DIR= \ -Dgflags_DIR= \ cmake --build . --config Release --target protopipe --parallel From ac40ad727db037ee08e8c1aa85c91de5c6bb555f Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Fri, 6 Dec 2024 16:04:12 +0200 Subject: [PATCH 4/9] Changes after review --- .../intel_npu/tools/protopipe/README.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 8b429878da596f..29ef3f3350af8f 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -516,10 +516,9 @@ Iteration : ## How to build ### Prerequisites 1. Build OpenCV G-API with OpenVINO/ONNXRT support -#### Build OpenCV G-API with OpenVINO/ONNXRT support -1. Clone and build [OpenVINO](https://github.com/openvinotoolkit/openvino) from sources +- Clone and build [OpenVINO](https://github.com/openvinotoolkit/openvino) from sources ``` - mkdir build && cd build + mkdir "build" && cd "build" cmake ../ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_PLUGINS_XML=ON \ -DCMAKE_INSTALL_PREFIX=install \ @@ -528,18 +527,19 @@ Iteration : cmake --build . --config Release --target install --parallel ``` -2. Init OpenVINO enviroment +- Init OpenVINO enviroment ``` - source /setupvars.sh + source "/setupvars.sh" ``` -3. Clone OpenCV repo: +2. Build OpenCV +- Clone OpenCV repo: ``` git clone https://github.com/opencv/opencv cd opencv && git checkout 3919f33e21 ``` -4. Build OpenCV G-API: +- Build OpenCV G-API: ``` - mkdir -p build && cd build + mkdir -p "build" && cd "build" cmake ../ -DBUILD_LIST=gapi \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_OPENVINO=ON @@ -547,7 +547,7 @@ Iteration : ``` If ONNX support is needed build OpenCV G-API with ONNX support: ``` - mkdir -p build && cd build + mkdir -p "build" && cd "build" cmake ../ -DBUILD_LIST=gapi \ -DCMAKE_BUILD_TYPE=Release \ -DWITH_OPENVINO=ON \ @@ -555,17 +555,18 @@ Iteration : -DORT_INSTALL_DIR= cmake --build . --config Release --target opencv_gapi --parallel ``` -5. Build protopipe +#### Build Protopipe inside openVino +1. Build protopipe ``` cd - mkdir src/plugins/intel_npu/tools/protopipe/build && cd src/plugins/intel_npu/tools/protopipe/build + mkdir "src/plugins/intel_npu/tools/protopipe/build" && cd "src/plugins/intel_npu/tools/protopipe/build" cmake ../ -DOpenCV_DIR= -DCMAKE_BUILD_TYPE=Release - cmake --build . --target protopipe --parallel + cmake --build . --target protopipe --parallel --config Release ``` ### Standalone build 1. Build `yaml-cpp` ``` - mkdir -p yaml-cpp_build && cd yaml-cpp_build + mkdir -p "yaml-cpp_build" && cd "yaml-cpp_build" cmake /src/plugins/intel_npu/thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install cmake --build . --config Release --target install --parallel ``` @@ -573,13 +574,13 @@ Iteration : ``` git clone https://github.com/gflags/gflags cd gflags - mkdir -p gflags_build && cd gflags_build + mkdir -p "gflags_build" && cd "gflags_build" cmake ../ -DCMAKE_INSTALL_PREFIX=install cmake --build . --config Release --target install --parallel ``` 3. Build `Protopipe` ``` - mkdir -p protopipe_build && cd protopipe_build + mkdir -p "protopipe_build" && cd "protopipe_build" cmake /src/plugins/intel_npu/tools/protopipe \ -DOpenCV_DIR= \ -Dyaml-cpp_DIR= \ From 61ab0a32339b1243d799dab3eb2c66792ea3e6e8 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Mon, 9 Dec 2024 10:02:22 +0200 Subject: [PATCH 5/9] Changes after code review --- src/plugins/intel_npu/tools/protopipe/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 29ef3f3350af8f..251100b611d1a7 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -555,7 +555,7 @@ Iteration : -DORT_INSTALL_DIR= cmake --build . --config Release --target opencv_gapi --parallel ``` -#### Build Protopipe inside openVino +### Build Protopipe inside OpenVino 1. Build protopipe ``` cd From 28f15efe555de03cb14b36d9178f5f2f48cd7f58 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Mon, 9 Dec 2024 16:56:58 +0200 Subject: [PATCH 6/9] Changes after code review --- .../intel_npu/tools/protopipe/README.md | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 251100b611d1a7..270fe518badbff 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -519,17 +519,17 @@ Iteration : - Clone and build [OpenVINO](https://github.com/openvinotoolkit/openvino) from sources ``` mkdir "build" && cd "build" - cmake ../ -DCMAKE_BUILD_TYPE=Release \ - -DENABLE_PLUGINS_XML=ON \ - -DCMAKE_INSTALL_PREFIX=install \ - -DENABLE_DEBUG_CAPS=ON \ + cmake ../ -DCMAKE_BUILD_TYPE=Release ^ + -DENABLE_PLUGINS_XML=ON ^ + -DCMAKE_INSTALL_PREFIX=install ^ + -DENABLE_DEBUG_CAPS=ON ^ -DENABLE_NPU_DEBUG_CAPS=ON .. cmake --build . --config Release --target install --parallel ``` - Init OpenVINO enviroment ``` - source "/setupvars.sh" + "/setupvars.sh" ``` 2. Build OpenCV - Clone OpenCV repo: @@ -540,51 +540,50 @@ Iteration : - Build OpenCV G-API: ``` mkdir -p "build" && cd "build" - cmake ../ -DBUILD_LIST=gapi \ - -DCMAKE_BUILD_TYPE=Release \ + cmake .. -DBUILD_LIST=gapi ^ + -DCMAKE_BUILD_TYPE=Release ^ -DWITH_OPENVINO=ON cmake --build . --config Release --target opencv_gapi --parallel ``` If ONNX support is needed build OpenCV G-API with ONNX support: ``` mkdir -p "build" && cd "build" - cmake ../ -DBUILD_LIST=gapi \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_OPENVINO=ON \ - -DWITH_ONNX=ON \ - -DORT_INSTALL_DIR= + cmake .. -DBUILD_LIST=gapi ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DWITH_OPENVINO=ON ^ + -DWITH_ONNX=ON ^ + -DORT_INSTALL_DIR= cmake --build . --config Release --target opencv_gapi --parallel ``` ### Build Protopipe inside OpenVino 1. Build protopipe ``` - cd + cd mkdir "src/plugins/intel_npu/tools/protopipe/build" && cd "src/plugins/intel_npu/tools/protopipe/build" - cmake ../ -DOpenCV_DIR= -DCMAKE_BUILD_TYPE=Release + cmake ../ -DOpenCV_DIR= -DCMAKE_BUILD_TYPE=Release cmake --build . --target protopipe --parallel --config Release ``` ### Standalone build 1. Build `yaml-cpp` ``` - mkdir -p "yaml-cpp_build" && cd "yaml-cpp_build" - cmake /src/plugins/intel_npu/thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install + mkdir "yaml-cpp_build" && cd "yaml-cpp_build" + cmake /src/plugins/intel_npu/thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install cmake --build . --config Release --target install --parallel ``` 2. Build `gflags` ``` git clone https://github.com/gflags/gflags cd gflags - mkdir -p "gflags_build" && cd "gflags_build" + mkdir "gflags_build" && cd "gflags_build" cmake ../ -DCMAKE_INSTALL_PREFIX=install cmake --build . --config Release --target install --parallel ``` 3. Build `Protopipe` ``` mkdir -p "protopipe_build" && cd "protopipe_build" - cmake /src/plugins/intel_npu/tools/protopipe \ - -DOpenCV_DIR= \ - -Dyaml-cpp_DIR= \ - -Dgflags_DIR= \ + cmake /src/plugins/intel_npu/tools/protopipe ^ + -DOpenCV_DIR= ^ + -Dgflags_DIR= cmake --build . --config Release --target protopipe --parallel ``` From f71ae6e0f5e540f7e534c706b34cbcfbbd7c7790 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Tue, 10 Dec 2024 09:20:56 +0200 Subject: [PATCH 7/9] Changes after code review --- src/plugins/intel_npu/tools/protopipe/README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 270fe518badbff..29a53689a7baa1 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -564,13 +564,7 @@ Iteration : cmake --build . --target protopipe --parallel --config Release ``` ### Standalone build -1. Build `yaml-cpp` - ``` - mkdir "yaml-cpp_build" && cd "yaml-cpp_build" - cmake /src/plugins/intel_npu/thirdparty/yaml-cpp -DCMAKE_INSTALL_PREFIX=install - cmake --build . --config Release --target install --parallel - ``` -2. Build `gflags` +1. Build `gflags` ``` git clone https://github.com/gflags/gflags cd gflags @@ -578,7 +572,7 @@ Iteration : cmake ../ -DCMAKE_INSTALL_PREFIX=install cmake --build . --config Release --target install --parallel ``` -3. Build `Protopipe` +2. Build `Protopipe` ``` mkdir -p "protopipe_build" && cd "protopipe_build" cmake /src/plugins/intel_npu/tools/protopipe ^ From a4584d73acadbe816fb32a3434a7bf410adc13f4 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Wed, 11 Dec 2024 09:20:08 +0200 Subject: [PATCH 8/9] Changes after code review --- src/plugins/intel_npu/tools/protopipe/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index 29a53689a7baa1..e15102b4434a83 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -529,7 +529,7 @@ Iteration : ``` - Init OpenVINO enviroment ``` - "/setupvars.sh" + "/setupvars.bat" ``` 2. Build OpenCV - Clone OpenCV repo: @@ -555,13 +555,13 @@ Iteration : -DORT_INSTALL_DIR= cmake --build . --config Release --target opencv_gapi --parallel ``` -### Build Protopipe inside OpenVino +### Build Protopipe inside OpenVINO 1. Build protopipe ``` cd mkdir "src/plugins/intel_npu/tools/protopipe/build" && cd "src/plugins/intel_npu/tools/protopipe/build" cmake ../ -DOpenCV_DIR= -DCMAKE_BUILD_TYPE=Release - cmake --build . --target protopipe --parallel --config Release + cmake --build . --config Release --target protopipe --parallel ``` ### Standalone build 1. Build `gflags` @@ -574,7 +574,7 @@ Iteration : ``` 2. Build `Protopipe` ``` - mkdir -p "protopipe_build" && cd "protopipe_build" + mkdir "protopipe_build" && cd "protopipe_build" cmake /src/plugins/intel_npu/tools/protopipe ^ -DOpenCV_DIR= ^ -Dgflags_DIR= From 423a24d226f5bec41514ca5c3f911188c252dab4 Mon Sep 17 00:00:00 2001 From: Septimiu Neaga Date: Thu, 12 Dec 2024 13:50:11 +0200 Subject: [PATCH 9/9] Changes after code review --- src/plugins/intel_npu/tools/protopipe/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_npu/tools/protopipe/README.md b/src/plugins/intel_npu/tools/protopipe/README.md index e15102b4434a83..2ae9c07b8d4df9 100644 --- a/src/plugins/intel_npu/tools/protopipe/README.md +++ b/src/plugins/intel_npu/tools/protopipe/README.md @@ -539,7 +539,7 @@ Iteration : ``` - Build OpenCV G-API: ``` - mkdir -p "build" && cd "build" + mkdir "build" && cd "build" cmake .. -DBUILD_LIST=gapi ^ -DCMAKE_BUILD_TYPE=Release ^ -DWITH_OPENVINO=ON @@ -547,7 +547,7 @@ Iteration : ``` If ONNX support is needed build OpenCV G-API with ONNX support: ``` - mkdir -p "build" && cd "build" + mkdir "build" && cd "build" cmake .. -DBUILD_LIST=gapi ^ -DCMAKE_BUILD_TYPE=Release ^ -DWITH_OPENVINO=ON ^