From a610ea27f7a3098c22dd24e5d859f70809f58792 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Fri, 15 Sep 2023 14:32:40 +0100 Subject: [PATCH 01/18] add pipeline --- .github/workflows/linux_cuda.yml | 199 +++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 .github/workflows/linux_cuda.yml diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml new file mode 100644 index 00000000000000..72e3a5afa0bba1 --- /dev/null +++ b/.github/workflows/linux_cuda.yml @@ -0,0 +1,199 @@ +name: Linux CUDA Plugin (Ubuntu 20.04, Python 3.11) +on: + workflow_dispatch: + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + push: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + branches: + - master + +concurrency: + group: ${{ github.head_ref || github.run_id }}-linux-cuda + cancel-in-progress: true + +jobs: + Build: + defaults: + run: + shell: bash + runs-on: ubuntu-20.04-8-cores + container: + image: nvidia/cuda:11.8.0-runtime-ubuntu20.04 + env: + CMAKE_BUILD_TYPE: 'Release' + CMAKE_GENERATOR: 'Ninja' + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_LINKER_LAUNCHER: ccache + CMAKE_C_LINKER_LAUNCHER: ccache + BUILD_TYPE: 'Release' + OPENVINO_REPO: ${{ github.workspace }}/openvino + OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib + BUILD_DIR: ${{ github.workspace }}/build + INSTALL_DIR: ${{ github.workspace }}/install_pkg + DATA_PATH: ${{ github.workspace }}/testdata + MODELS_PATH: ${{ github.workspace }}/testdata + DEBIAN_FRONTEND: 'noninteractive' + steps: + + - name: Install Prerequisites + run: | + apt update + apt install -y git curl git git-lfs unzip wget + + - name: Clone OpenVINO + uses: actions/checkout@v3 + with: + path: 'openvino' + submodules: 'recursive' + + - name: Clone OpenVINO Contrib + uses: actions/checkout@v3 + with: + repository: 'openvinotoolkit/openvino_contrib' + path: 'openvino_contrib' + submodules: 'recursive' + + - name: Clone testdata for C API tests + uses: actions/checkout@v3 + with: + repository: 'openvinotoolkit/testdata' + path: 'testdata' + submodules: 'recursive' + lfs: 'true' + + - name: Create Directories + run: | + mkdir -p $GITHUB_WORKSPACE/build + mkdir -p $GITHUB_WORKSPACE/install_pkg + + - name: Setup Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + # + # Dependencies + # + + - name: Install build dependencies + run: | + apt update + $GITHUB_WORKSPACE/openvino/install_build_dependencies.sh + + apt -y --no-install-recommends install unzip wget software-properties-common + wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip + unzip ninja-linux.zip + cp -v ninja /usr/local/bin/ + + python3 -m pip install -r $GITHUB_WORKSPACE/openvino/src/bindings/python/requirements.txt + + - name: Install CUDA + run: | + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin + mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 + + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub + add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" + apt update + DEBIAN_FRONTEND=noninteractive apt install -y \ + gnupg2 \ + software-properties-common \ + libcudnn8=8.9.4.*-1+cuda11.8 \ + libcudnn8-dev=8.9.4.*-1+cuda11.8 \ + libcudnn8-samples=8.9.4.*-1+cuda11.8 \ + autoconf \ + automake \ + build-essential \ + ca-certificates \ + clang-format-9 \ + cuda-runtime-11-8 \ + cuda-11-8 \ + g++-multilib \ + gcc-multilib \ + gstreamer1.0-plugins-base \ + libavcodec-dev \ + libavformat-dev \ + libboost-regex-dev \ + libcairo2-dev \ + libcutensor1=1.6.1.5-1 \ + libcutensor-dev=1.6.1.5-1 \ + libglib2.0-dev \ + libgstreamer1.0-0 \ + libgtk2.0-dev \ + libopenblas-dev \ + libpango1.0-dev \ + libpng-dev \ + libssl-dev \ + libswscale-dev \ + libtool \ + libusb-1.0-0-dev \ + libzstd-dev \ + pkg-config \ + shellcheck \ + unzip \ + wget \ + cuda-drivers=520.61.05-1 + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "2000M" + # Should save cache only if run in the master branch of the base repo + # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push + save: ${{ github.ref_name == 'master' && 'true' || 'false' }} + verbose: 2 + key: linux-cuda + restore-keys: | + linux-cuda + + # + # Build + # + + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 + id: cpu-cores + + - name: CMake configure + run: | + cmake \ + -GNinja \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DENABLE_CPPLINT=OFF \ + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ + -DOPENVINO_EXTRA_MODULES=$GITHUB_WORKSPACE/openvino_contrib/modules/nvidia_plugin \ + -DENABLE_INTEL_CPU=OFF \ + -DENABLE_INTEL_GPU=OFF \ + -DENABLE_INTEL_GNA=OFF \ + -DENABLE_OV_TF_FRONTEND=OFF \ + -DENABLE_OV_PADDLE_FRONTEND=OFF \ + -DENABLE_OV_PYTORCH_FRONTEND=OFF \ + -DENABLE_OV_ONNX_FRONTEND=OFF \ + -DENABLE_PYTHON=OFF \ + -DENABLE_TESTS=ON \ + -S $GITHUB_WORKSPACE/openvino \ + -B $GITHUB_WORKSPACE/build + + - name: Clean ccache stats + run: ccache --zero-stats --show-config + + - name: Build + run: | + cmake --build $GITHUB_WORKSPACE/build --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests + + - name: Show ccache stats + run: ccache --show-stats From 690a6df126fd2f97b93130b792401ab2b4997ecc Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Mon, 18 Sep 2023 08:37:19 +0100 Subject: [PATCH 02/18] rm triggers --- .github/workflows/linux_cuda.yml | 41 ++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 72e3a5afa0bba1..7b74b2a45273dd 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -1,24 +1,27 @@ name: Linux CUDA Plugin (Ubuntu 20.04, Python 3.11) on: workflow_dispatch: - pull_request: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' - push: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' - branches: - - master + schedule: + # run daily at 00:00 + - cron: '0 0 * * *' +# pull_request: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' +# push: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' +# branches: +# - master concurrency: group: ${{ github.head_ref || github.run_id }}-linux-cuda @@ -26,6 +29,8 @@ concurrency: jobs: Build: + # TODO: remove. Temporary measure to prevent the workflow from scheduling on forks. + if: ${{ github.repository_owner == 'openvinotoolkit' }} defaults: run: shell: bash From fb12c49e503381b75c1b09601ffd28b1ac7e8f40 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 19 Sep 2023 16:15:19 +0100 Subject: [PATCH 03/18] address comments --- .github/workflows/linux_cuda.yml | 79 +++++++++----------------------- 1 file changed, 21 insertions(+), 58 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 7b74b2a45273dd..8e2777e62efb1a 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -4,24 +4,24 @@ on: schedule: # run daily at 00:00 - cron: '0 0 * * *' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' -# push: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' -# branches: -# - master + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + push: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + branches: + - master concurrency: group: ${{ github.head_ref || github.run_id }}-linux-cuda @@ -49,9 +49,6 @@ jobs: OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib BUILD_DIR: ${{ github.workspace }}/build INSTALL_DIR: ${{ github.workspace }}/install_pkg - DATA_PATH: ${{ github.workspace }}/testdata - MODELS_PATH: ${{ github.workspace }}/testdata - DEBIAN_FRONTEND: 'noninteractive' steps: - name: Install Prerequisites @@ -63,14 +60,14 @@ jobs: uses: actions/checkout@v3 with: path: 'openvino' - submodules: 'recursive' + submodules: 'true' - name: Clone OpenVINO Contrib uses: actions/checkout@v3 with: repository: 'openvinotoolkit/openvino_contrib' path: 'openvino_contrib' - submodules: 'recursive' + submodules: 'true' - name: Clone testdata for C API tests uses: actions/checkout@v3 @@ -78,7 +75,6 @@ jobs: repository: 'openvinotoolkit/testdata' path: 'testdata' submodules: 'recursive' - lfs: 'true' - name: Create Directories run: | @@ -100,11 +96,6 @@ jobs: $GITHUB_WORKSPACE/openvino/install_build_dependencies.sh apt -y --no-install-recommends install unzip wget software-properties-common - wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip - unzip ninja-linux.zip - cp -v ninja /usr/local/bin/ - - python3 -m pip install -r $GITHUB_WORKSPACE/openvino/src/bindings/python/requirements.txt - name: Install CUDA run: | @@ -115,42 +106,13 @@ jobs: add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt update DEBIAN_FRONTEND=noninteractive apt install -y \ - gnupg2 \ - software-properties-common \ libcudnn8=8.9.4.*-1+cuda11.8 \ libcudnn8-dev=8.9.4.*-1+cuda11.8 \ libcudnn8-samples=8.9.4.*-1+cuda11.8 \ - autoconf \ - automake \ - build-essential \ - ca-certificates \ - clang-format-9 \ cuda-runtime-11-8 \ cuda-11-8 \ - g++-multilib \ - gcc-multilib \ - gstreamer1.0-plugins-base \ - libavcodec-dev \ - libavformat-dev \ - libboost-regex-dev \ - libcairo2-dev \ libcutensor1=1.6.1.5-1 \ libcutensor-dev=1.6.1.5-1 \ - libglib2.0-dev \ - libgstreamer1.0-0 \ - libgtk2.0-dev \ - libopenblas-dev \ - libpango1.0-dev \ - libpng-dev \ - libssl-dev \ - libswscale-dev \ - libtool \ - libusb-1.0-0-dev \ - libzstd-dev \ - pkg-config \ - shellcheck \ - unzip \ - wget \ cuda-drivers=520.61.05-1 - name: Setup ccache @@ -185,6 +147,7 @@ jobs: -DENABLE_INTEL_GPU=OFF \ -DENABLE_INTEL_GNA=OFF \ -DENABLE_OV_TF_FRONTEND=OFF \ + -DENABLE_OV_TF_LITE=OFF \ -DENABLE_OV_PADDLE_FRONTEND=OFF \ -DENABLE_OV_PYTORCH_FRONTEND=OFF \ -DENABLE_OV_ONNX_FRONTEND=OFF \ From 0b6e408e4e212eed73ca3e7f4823db2494cc4052 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 19 Sep 2023 16:20:54 +0100 Subject: [PATCH 04/18] use uninteractive as env --- .github/workflows/linux_cuda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 8e2777e62efb1a..1c7a014b260de6 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -49,6 +49,7 @@ jobs: OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib BUILD_DIR: ${{ github.workspace }}/build INSTALL_DIR: ${{ github.workspace }}/install_pkg + DEBIAN_FRONTEND: 'noninteractive' steps: - name: Install Prerequisites @@ -105,7 +106,7 @@ jobs: apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt update - DEBIAN_FRONTEND=noninteractive apt install -y \ + apt install -y \ libcudnn8=8.9.4.*-1+cuda11.8 \ libcudnn8-dev=8.9.4.*-1+cuda11.8 \ libcudnn8-samples=8.9.4.*-1+cuda11.8 \ From f494c40e4c4960aea90757eaf553f127bb8bfd8f Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 19 Sep 2023 16:56:22 +0100 Subject: [PATCH 05/18] rm triggers --- .github/workflows/linux_cuda.yml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 1c7a014b260de6..fe0092f1602e67 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -4,24 +4,24 @@ on: schedule: # run daily at 00:00 - cron: '0 0 * * *' - pull_request: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' - push: - paths-ignore: - - '**/docs/**' - - 'docs/**' - - '**/**.md' - - '**.md' - - '**/layer_tests_summary/**' - - '**/conformance/**' - branches: - - master +# pull_request: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' +# push: +# paths-ignore: +# - '**/docs/**' +# - 'docs/**' +# - '**/**.md' +# - '**.md' +# - '**/layer_tests_summary/**' +# - '**/conformance/**' +# branches: +# - master concurrency: group: ${{ github.head_ref || github.run_id }}-linux-cuda From 2b8b78979e22005cb42e456534b3c536874774ce Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 20 Sep 2023 08:51:38 +0100 Subject: [PATCH 06/18] rm unused testdata --- .github/workflows/linux_cuda.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index fe0092f1602e67..4d12ac4b48c47e 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -70,13 +70,6 @@ jobs: path: 'openvino_contrib' submodules: 'true' - - name: Clone testdata for C API tests - uses: actions/checkout@v3 - with: - repository: 'openvinotoolkit/testdata' - path: 'testdata' - submodules: 'recursive' - - name: Create Directories run: | mkdir -p $GITHUB_WORKSPACE/build From bdd0d4110c97f0aea461252b431a6e223a755f37 Mon Sep 17 00:00:00 2001 From: Andrey Kashchikhin Date: Wed, 27 Sep 2023 09:58:12 +0100 Subject: [PATCH 07/18] use better concurrency group Co-authored-by: Mikhail Ryzhov --- .github/workflows/linux_cuda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 4d12ac4b48c47e..a2c079a8738f5e 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -24,7 +24,8 @@ on: # - master concurrency: - group: ${{ github.head_ref || github.run_id }}-linux-cuda + # github.ref is not unique in post-commit + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-cuda cancel-in-progress: true jobs: From dab511a9ab8b80dc7d1da7093dbda17ca6dd1fce Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 28 Sep 2023 15:29:37 +0100 Subject: [PATCH 08/18] use aks runner --- .github/workflows/linux_cuda.yml | 104 +++++++++++-------------------- 1 file changed, 35 insertions(+), 69 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index a2c079a8738f5e..3dc1453799edbd 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -1,27 +1,24 @@ name: Linux CUDA Plugin (Ubuntu 20.04, Python 3.11) on: workflow_dispatch: - schedule: - # run daily at 00:00 - - cron: '0 0 * * *' -# pull_request: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' -# push: -# paths-ignore: -# - '**/docs/**' -# - 'docs/**' -# - '**/**.md' -# - '**.md' -# - '**/layer_tests_summary/**' -# - '**/conformance/**' -# branches: -# - master + pull_request: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + push: + paths-ignore: + - '**/docs/**' + - 'docs/**' + - '**/**.md' + - '**.md' + - '**/layer_tests_summary/**' + - '**/conformance/**' + branches: + - master concurrency: # github.ref is not unique in post-commit @@ -30,27 +27,26 @@ concurrency: jobs: Build: - # TODO: remove. Temporary measure to prevent the workflow from scheduling on forks. - if: ${{ github.repository_owner == 'openvinotoolkit' }} defaults: run: shell: bash - runs-on: ubuntu-20.04-8-cores + runs-on: aks-linux-16-cores container: image: nvidia/cuda:11.8.0-runtime-ubuntu20.04 + volumes: + - /mount/caches:/mount/caches env: CMAKE_BUILD_TYPE: 'Release' CMAKE_GENERATOR: 'Ninja' CMAKE_CXX_COMPILER_LAUNCHER: ccache CMAKE_C_COMPILER_LAUNCHER: ccache - CMAKE_CXX_LINKER_LAUNCHER: ccache - CMAKE_C_LINKER_LAUNCHER: ccache - BUILD_TYPE: 'Release' - OPENVINO_REPO: ${{ github.workspace }}/openvino - OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib - BUILD_DIR: ${{ github.workspace }}/build - INSTALL_DIR: ${{ github.workspace }}/install_pkg + OPENVINO_REPO: /__w/openvino/openvino/openvino + OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib + BUILD_DIR: /__w/openvino/openvino/openvino_build DEBIAN_FRONTEND: 'noninteractive' + CCACHE_DIR: /mount/caches/ccache/ubuntu20_x86_64_Release + CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp + CCACHE_MAXSIZE: 50G steps: - name: Install Prerequisites @@ -61,34 +57,23 @@ jobs: - name: Clone OpenVINO uses: actions/checkout@v3 with: - path: 'openvino' + path: ${{ env.OPENVINO_REPO }} submodules: 'true' - name: Clone OpenVINO Contrib uses: actions/checkout@v3 with: repository: 'openvinotoolkit/openvino_contrib' - path: 'openvino_contrib' + path: ${{ env.OPENVINO_CONTRIB_REPO }} submodules: 'true' - - name: Create Directories - run: | - mkdir -p $GITHUB_WORKSPACE/build - mkdir -p $GITHUB_WORKSPACE/install_pkg - - - name: Setup Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: '3.11' - # # Dependencies # - name: Install build dependencies run: | - apt update - $GITHUB_WORKSPACE/openvino/install_build_dependencies.sh + ${OPENVINO_REPO}/openvino/install_build_dependencies.sh apt -y --no-install-recommends install unzip wget software-properties-common @@ -110,34 +95,18 @@ jobs: libcutensor-dev=1.6.1.5-1 \ cuda-drivers=520.61.05-1 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - max-size: "2000M" - # Should save cache only if run in the master branch of the base repo - # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push - save: ${{ github.ref_name == 'master' && 'true' || 'false' }} - verbose: 2 - key: linux-cuda - restore-keys: | - linux-cuda - # # Build # - - name: Get number of CPU cores - uses: SimenB/github-actions-cpu-cores@v1 - id: cpu-cores - - name: CMake configure run: | cmake \ -GNinja \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_CPPLINT=OFF \ - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ - -DOPENVINO_EXTRA_MODULES=$GITHUB_WORKSPACE/openvino_contrib/modules/nvidia_plugin \ + -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ + -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO} \ -DENABLE_INTEL_CPU=OFF \ -DENABLE_INTEL_GPU=OFF \ -DENABLE_INTEL_GNA=OFF \ @@ -148,15 +117,12 @@ jobs: -DENABLE_OV_ONNX_FRONTEND=OFF \ -DENABLE_PYTHON=OFF \ -DENABLE_TESTS=ON \ - -S $GITHUB_WORKSPACE/openvino \ - -B $GITHUB_WORKSPACE/build - - - name: Clean ccache stats - run: ccache --zero-stats --show-config + -S ${OPENVINO_REPO} \ + -B ${BUILD_DIR} - name: Build run: | - cmake --build $GITHUB_WORKSPACE/build --parallel ${{ steps.cpu-cores.outputs.count }} --config ${{ env.BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests + cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests - name: Show ccache stats run: ccache --show-stats From a83627539d721ab16e94e88c07ae6d1afd02af31 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 28 Sep 2023 15:32:27 +0100 Subject: [PATCH 09/18] correct path --- .github/workflows/linux_cuda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 3dc1453799edbd..f9541c41dcad99 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -1,4 +1,4 @@ -name: Linux CUDA Plugin (Ubuntu 20.04, Python 3.11) +name: Linux CUDA Plugin (Ubuntu 20.04) on: workflow_dispatch: pull_request: @@ -73,7 +73,7 @@ jobs: - name: Install build dependencies run: | - ${OPENVINO_REPO}/openvino/install_build_dependencies.sh + ${OPENVINO_REPO}/install_build_dependencies.sh apt -y --no-install-recommends install unzip wget software-properties-common From 39b613cdc527f34089b6694a287b3b5b83afc412 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 28 Sep 2023 15:46:11 +0100 Subject: [PATCH 10/18] provide path --- .github/workflows/linux_cuda.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index f9541c41dcad99..63c474f9ffee4d 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -99,6 +99,10 @@ jobs: # Build # + - name: Setup ccache + run: | + mkdir -p $CCACHE_DIR + - name: CMake configure run: | cmake \ @@ -106,7 +110,7 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_CPPLINT=OFF \ -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ - -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO} \ + -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ -DENABLE_INTEL_CPU=OFF \ -DENABLE_INTEL_GPU=OFF \ -DENABLE_INTEL_GNA=OFF \ From 9215ccbc2f19b32074ef92989e12291343cc6b8a Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 28 Sep 2023 16:32:52 +0100 Subject: [PATCH 11/18] add missing cmake options; rm unnecessary dir creation --- .github/workflows/linux_cuda.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 63c474f9ffee4d..6f8a56810e8084 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -99,10 +99,6 @@ jobs: # Build # - - name: Setup ccache - run: | - mkdir -p $CCACHE_DIR - - name: CMake configure run: | cmake \ @@ -121,6 +117,8 @@ jobs: -DENABLE_OV_ONNX_FRONTEND=OFF \ -DENABLE_PYTHON=OFF \ -DENABLE_TESTS=ON \ + -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ + -DCMAKE_MINIMUM_REQUIRED_VERSION=3.20 \ -S ${OPENVINO_REPO} \ -B ${BUILD_DIR} From be020ab7eaa70a6be27e2f78537a87beff58d3b8 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 3 Oct 2023 10:07:37 +0100 Subject: [PATCH 12/18] use image from private docker --- .github/workflows/linux_cuda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 6f8a56810e8084..1464eb32882ef3 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -32,7 +32,7 @@ jobs: shell: bash runs-on: aks-linux-16-cores container: - image: nvidia/cuda:11.8.0-runtime-ubuntu20.04 + image: openvinogithubactions.azurecr.io/dockerhub/nvidia/cuda:11.8.0-runtime-ubuntu20.04 volumes: - /mount/caches:/mount/caches env: From 60f2b75965b401041ab1fa92fb937cd5950af192 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 3 Oct 2023 10:41:25 +0100 Subject: [PATCH 13/18] split OV and plugin cmake & build; do not fail on warning for plugin build --- .github/workflows/linux_cuda.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 1464eb32882ef3..9a355f3ad85e9b 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -37,7 +37,7 @@ jobs: - /mount/caches:/mount/caches env: CMAKE_BUILD_TYPE: 'Release' - CMAKE_GENERATOR: 'Ninja' + CMAKE_GENERATOR: 'Ninja Multi-Config' CMAKE_CXX_COMPILER_LAUNCHER: ccache CMAKE_C_COMPILER_LAUNCHER: ccache OPENVINO_REPO: /__w/openvino/openvino/openvino @@ -102,11 +102,10 @@ jobs: - name: CMake configure run: | cmake \ - -GNinja \ + -G "${{ env.CMAKE_GENERATOR }}" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_CPPLINT=OFF \ -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ - -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ -DENABLE_INTEL_CPU=OFF \ -DENABLE_INTEL_GPU=OFF \ -DENABLE_INTEL_GNA=OFF \ @@ -124,6 +123,16 @@ jobs: - name: Build run: | + cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + + - name: Cmake & Build - CUDA Plugin + run: | + cmake \ + -DBUILD_nvidia_plugin=ON \ + -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ + -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ + -S ${OPENVINO_REPO} \ + -B ${BUILD_DIR} cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests - name: Show ccache stats From be00a9756656724560ff91c70242bb1e8ffde081 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 3 Oct 2023 10:50:43 +0100 Subject: [PATCH 14/18] use different build_dir for nvidia plugin --- .github/workflows/linux_cuda.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 9a355f3ad85e9b..09d5fb65669fba 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -42,7 +42,8 @@ jobs: CMAKE_C_COMPILER_LAUNCHER: ccache OPENVINO_REPO: /__w/openvino/openvino/openvino OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib - BUILD_DIR: /__w/openvino/openvino/openvino_build + OV_BUILD_DIR: /__w/openvino/openvino/openvino_build + NVIDIA_BUILD_DIR: /__w/openvino/openvino/nvidia_plugin_build DEBIAN_FRONTEND: 'noninteractive' CCACHE_DIR: /mount/caches/ccache/ubuntu20_x86_64_Release CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp @@ -119,21 +120,20 @@ jobs: -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ -DCMAKE_MINIMUM_REQUIRED_VERSION=3.20 \ -S ${OPENVINO_REPO} \ - -B ${BUILD_DIR} + -B ${OV_BUILD_DIR} - - name: Build + - name: Build - OpenVINO run: | - cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + cmake --build ${OV_BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose - - name: Cmake & Build - CUDA Plugin + - name: Cmake & Build - NVIDIA Plugin run: | cmake \ - -DBUILD_nvidia_plugin=ON \ - -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ + -DOpenVINODeveloperPackage_DIR=${OV_BUILD_DIR} \ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ - -S ${OPENVINO_REPO} \ - -B ${BUILD_DIR} - cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests + -S ${OPENVINO_CONTRIB_REPO}/modules/nvidia_plugin \ + -B ${NVIDIA_BUILD_DIR} + cmake --build ${NVIDIA_BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose -- ov_nvidia_func_tests ov_nvidia_unit_tests - name: Show ccache stats run: ccache --show-stats From 031af59cdaed38f1de26f1c8e5c387db4996fb64 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 3 Oct 2023 11:13:27 +0100 Subject: [PATCH 15/18] add missing options --- .github/workflows/linux_cuda.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 09d5fb65669fba..9da33912e46af1 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -1,4 +1,4 @@ -name: Linux CUDA Plugin (Ubuntu 20.04) +name: Linux NVIDIA Plugin (Ubuntu 20.04) on: workflow_dispatch: pull_request: @@ -22,7 +22,7 @@ on: concurrency: # github.ref is not unique in post-commit - group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-cuda + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-nvidia cancel-in-progress: true jobs: @@ -106,6 +106,10 @@ jobs: -G "${{ env.CMAKE_GENERATOR }}" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_CPPLINT=OFF \ + -DENABLE_NCC_STYLE=OFF \ + -DENABLE_SYSTEM_PUGIXML=ON \ + -DENABLE_SYSTEM_OPENCL=ON \ + -DENABLE_STRICT_DEPENDENCIES=OFF \ -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ -DENABLE_INTEL_CPU=OFF \ -DENABLE_INTEL_GPU=OFF \ @@ -117,6 +121,7 @@ jobs: -DENABLE_OV_ONNX_FRONTEND=OFF \ -DENABLE_PYTHON=OFF \ -DENABLE_TESTS=ON \ + -DCPACK_GENERATOR=TGZ \ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ -DCMAKE_MINIMUM_REQUIRED_VERSION=3.20 \ -S ${OPENVINO_REPO} \ From f35aba644c9543eec550ef1aa223436a398fd975 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Tue, 3 Oct 2023 12:48:17 +0100 Subject: [PATCH 16/18] rm unnecessary options; add target for build --- .github/workflows/linux_cuda.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index 9da33912e46af1..d8d4dc96563696 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -104,7 +104,6 @@ jobs: run: | cmake \ -G "${{ env.CMAKE_GENERATOR }}" \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_CPPLINT=OFF \ -DENABLE_NCC_STYLE=OFF \ -DENABLE_SYSTEM_PUGIXML=ON \ @@ -123,13 +122,12 @@ jobs: -DENABLE_TESTS=ON \ -DCPACK_GENERATOR=TGZ \ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ - -DCMAKE_MINIMUM_REQUIRED_VERSION=3.20 \ -S ${OPENVINO_REPO} \ -B ${OV_BUILD_DIR} - name: Build - OpenVINO run: | - cmake --build ${OV_BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose + cmake --build ${OV_BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose --target ov_dev_targets - name: Cmake & Build - NVIDIA Plugin run: | From 5bad9d2c60e08b53bd874d7011a8ee994225d928 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 4 Oct 2023 10:50:00 +0400 Subject: [PATCH 17/18] Apply suggestions from code review try fix for NVIDIA plugin --- .github/workflows/linux_cuda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index d8d4dc96563696..f8784aa456b481 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -64,9 +64,9 @@ jobs: - name: Clone OpenVINO Contrib uses: actions/checkout@v3 with: - repository: 'openvinotoolkit/openvino_contrib' + repository: 'nkogteva/openvino_contrib' path: ${{ env.OPENVINO_CONTRIB_REPO }} - submodules: 'true' + ref: 'nvidia_fix_cmake' # # Dependencies From ec294583bbae1a967edccc79d6ec873fc8bb9e46 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 4 Oct 2023 11:10:21 +0400 Subject: [PATCH 18/18] Apply suggestions from code review revert to default contrib repo, used ccache for CUDA files --- .github/workflows/linux_cuda.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_cuda.yml b/.github/workflows/linux_cuda.yml index f8784aa456b481..9e74ec11ec6be2 100644 --- a/.github/workflows/linux_cuda.yml +++ b/.github/workflows/linux_cuda.yml @@ -38,6 +38,7 @@ jobs: env: CMAKE_BUILD_TYPE: 'Release' CMAKE_GENERATOR: 'Ninja Multi-Config' + CMAKE_CUDA_COMPILER_LAUNCHER: ccache CMAKE_CXX_COMPILER_LAUNCHER: ccache CMAKE_C_COMPILER_LAUNCHER: ccache OPENVINO_REPO: /__w/openvino/openvino/openvino @@ -64,9 +65,9 @@ jobs: - name: Clone OpenVINO Contrib uses: actions/checkout@v3 with: - repository: 'nkogteva/openvino_contrib' + repository: 'openvinotoolkit/openvino_contrib' path: ${{ env.OPENVINO_CONTRIB_REPO }} - ref: 'nvidia_fix_cmake' + ref: 'master' # # Dependencies