From 0cf1f7e1e9c88359cf41491a1e0ac1f993d4b604 Mon Sep 17 00:00:00 2001 From: Yury Gaydaychuk Date: Tue, 17 Dec 2024 21:18:16 +0100 Subject: [PATCH] apply comments - 1 --- .../ov_build/ubuntu_22_04_riscv/Dockerfile | 14 +- .github/workflows/dev_cpu_linux_riscv.yml | 77 +----- .github/workflows/linux_riscv.yml | 250 ------------------ 3 files changed, 8 insertions(+), 333 deletions(-) delete mode 100644 .github/workflows/linux_riscv.yml diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile index 8d0e4407c882f6..af6360c5563189 100644 --- a/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile +++ b/.github/dockerfiles/ov_build/ubuntu_22_04_riscv/Dockerfile @@ -11,13 +11,13 @@ RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \ ENV DEBIAN_FRONTEND="noninteractive" \ TZ="Europe/London" \ - CCACHE_MAXSIZE=2G \ - CMAKE_GENERATOR='Ninja Multi-Config' \ - XUANTIE_DIR=/__w/openvino/xuantie \ - XUANTIE_BIN_PATH=/mount/testdata1/ \ - XUANTIE_TAR_NAME='Xuantie-900-gcc-linux-5.15.0-glibc-x86_64-V2.8.1' \ - OPENVINO_REPO=/__w/openvino/openvino/openvino \ - BUILD_DIR=/__w/openvino/openvino/openvino_build + CCACHE_MAXSIZE=2G + CMAKE_GENERATOR: 'Ninja Multi-Config' + XUANTIE_DIR: /__w/openvino/xuantie + XUANTIE_BIN_PATH: /mount/testdata1/ + XUANTIE_TAR_NAME: 'Xuantie-900-gcc-linux-5.15.0-glibc-x86_64-V2.8.1' + OPENVINO_REPO: /__w/openvino/openvino/openvino + BUILD_DIR: /__w/openvino/openvino/openvino_build RUN apt-get update && \ apt-get install software-properties-common && \ diff --git a/.github/workflows/dev_cpu_linux_riscv.yml b/.github/workflows/dev_cpu_linux_riscv.yml index 92b55dff32708a..c3cd7e95acb52e 100644 --- a/.github/workflows/dev_cpu_linux_riscv.yml +++ b/.github/workflows/dev_cpu_linux_riscv.yml @@ -1,4 +1,4 @@ -name: Linux developer RISC-V workflow for CPU plugin (Ubuntu 22.04, Python 3.10) +name: Linux RISC-V CPU workflow with Xuantie (Ubuntu 22.04, Python 3.10) on: workflow_dispatch: pull_request: @@ -96,16 +96,6 @@ jobs: if: "!needs.smart_ci.outputs.skip_workflow" steps: - - name: Check docker env - run: | - echo 'check env' - echo ${CCACHE_MAXSIZE} - echo ${DEBIAN_FRONTEND} - echo ${OPENVINO_REPO} - echo ${BUILD_DIR} - echo ${XUANTIE_DIR} - echo ${CMAKE_GENERATOR} - - name: Clone OpenVINO uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: @@ -137,12 +127,9 @@ jobs: run: | mkdir ${XUANTIE_DIR} pushd ${XUANTIE_DIR} - ls -la ${XUANTIE_BIN_PATH} cp ${XUANTIE_BIN_PATH}${XUANTIE_TAR_NAME}.tar ${XUANTIE_DIR} - ls -la ${XUANTIE_DIR} tar -xf ${XUANTIE_TAR_NAME}.tar chmod -R 777 ${XUANTIE_TAR_NAME} - ls -la ${XUANTIE_TAR_NAME}/libexec/gcc/riscv64-unknown-linux-gnu/10.4.0/ python3 -m pip install --upgrade pip setuptools wheel ln -s /usr/include/riscv64-linux-gnu/ /usr/include/python3.10/ popd @@ -229,67 +216,6 @@ jobs: - name: Clean ccache run: ccache --cleanup - # Pre_Build_2: - # needs: [Docker, Smart_CI, Build] - # runs-on: aks-linux-8-cores-32gb - # container: - # image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_riscv }} - # volumes: - # - /mount:/mount - # steps: - # - name: smth - # run: | - # echo ${OPENVINO_REPO}/cmake/toolchains/riscv64-071-xuantie-gnu.toolchain.cmake - # echo ${XUANTIE_DIR}/${XUANTIE_TAR_NAME} - # Build_2: - # needs: [Docker, Smart_CI, Build] - # uses: ./.github/workflows/job_build_linux.yml - # with: - # runner: 'aks-linux-16-cores-32gb' - # container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_riscv }}", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}' - # affected-components: ${{ needs.smart_ci.outputs.affected_components }} - # event-name: ${{ github.event_name }} - # os: 'ubuntu_22_04' - # build-js: false - # build-contrib: false - # build-debian-packages: true - # build-rpm-packages: false - # cmake-options: |- - # -G ${CMAKE_GENERATOR} \ - # -DENABLE_CPPLINT=OFF \ - # -DENABLE_NCC_STYLE=OFF \ - # -DENABLE_TESTS=ON \ - # -DENABLE_INTEL_CPU=ON \ - # -DENABLE_INTEL_GPU=OFF \ - # -DENABLE_INTEL_NPU=OFF \ - # -DENABLE_SAMPLES=ON \ - # -DCMAKE_TOOLCHAIN_FILE=${OPENVINO_REPO}/cmake/toolchains/riscv64-071-xuantie-gnu.toolchain.cmake \ - # -DRISCV_TOOLCHAIN_ROOT=${XUANTIE_DIR}/${XUANTIE_TAR_NAME} \ - # -DENABLE_PYTHON=ON \ - # -DENABLE_PYTHON_PACKAGING=ON \ - # -DENABLE_WHEEL=ON \ - # -DENABLE_STRICT_DEPENDENCIES=OFF \ - # -DCMAKE_VERBOSE_MAKEFILE=ON \ - # -DCPACK_GENERATOR=TGZ \ - # -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ - # -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - # -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - # -S ${OPENVINO_REPO} \ - # -B ${BUILD_DIR} - # Build_2: - # needs: [Docker, Smart_CI, Build] - # runs-on: aks-linux-8-cores-32gb - # container: - # image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_riscv }} - # volumes: - # - /mount:/mount - # steps: - # - name: smth - # run: | - # echo ${OPENVINO_REPO} && \ - # echo ${BUILD_DIR} && \ - # echo ${XUANTIE_DIR} && \ - # echo ${CMAKE_GENERATOR} CPU_Functional_Tests: name: CPU functional tests @@ -343,7 +269,6 @@ jobs: pushd $INSTALL_TEST_DIR tar -xzf openvino_tests.tar.gz -C $INSTALL_TEST_DIR - ls -la $INSTALL_TEST_DIR/tests popd - name: Intel CPU plugin func tests diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml deleted file mode 100644 index 8966a63f611d36..00000000000000 --- a/.github/workflows/linux_riscv.yml +++ /dev/null @@ -1,250 +0,0 @@ -name: Linux RISC-V with Conan (Ubuntu 22.04, Python 3.10) -on: - workflow_dispatch: - pull_request: - merge_group: - push: - branches: - - master - - 'releases/**' - -concurrency: - # github.ref is not unique in post-commit - group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-riscv - cancel-in-progress: true - -permissions: read-all - -env: - TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }} - -jobs: - Smart_CI: - runs-on: ubuntu-latest - outputs: - affected_components: "${{ steps.smart_ci.outputs.affected_components }}" - changed_components: "${{ steps.smart_ci.outputs.changed_components }}" - skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}" - target_branch: ${{ steps.set_target_branch.outputs.target_branch }} - steps: - - name: checkout action - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - timeout-minutes: 15 - with: - sparse-checkout: .github/actions/smart-ci - - - name: Get affected components - id: smart_ci - uses: ./.github/actions/smart-ci - with: - repository: ${{ github.repository }} - pr: ${{ github.event.number }} - commit_sha: ${{ github.sha }} - ref_name: ${{ github.ref_name }} - component_pattern: "category: (.*)" - repo_token: ${{ secrets.GITHUB_TOKEN }} - skip_when_only_listed_labels_set: 'docs' - skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*' - - - name: Get target branch - id: set_target_branch - run: | - echo "target_branch=${TARGET_BRANCH#refs/heads/}" >> $GITHUB_OUTPUT - shell: bash - - Docker: - needs: Smart_CI - runs-on: aks-linux-4-cores-16gb-docker-build - if: "!needs.smart_ci.outputs.skip_workflow" - container: - image: openvinogithubactions.azurecr.io/docker_build:0.2 - volumes: - - /mount:/mount - outputs: - images: "${{ steps.handle_docker.outputs.images }}" - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - timeout-minutes: 15 - - - uses: ./.github/actions/handle_docker - id: handle_docker - with: - images: | - ov_build/ubuntu_22_04_riscv - registry: 'openvinogithubactions.azurecr.io' - dockerfiles_root_dir: '.github/dockerfiles' - changed_components: ${{ needs.smart_ci.outputs.changed_components }} - - Build: - needs: [Smart_CI, Docker] - timeout-minutes: 150 - defaults: - run: - shell: bash - runs-on: aks-linux-16-cores-32gb - container: - image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_riscv }} - volumes: - - /mount:/mount - env: - CMAKE_BUILD_TYPE: 'Release' - CMAKE_GENERATOR: 'Ninja' - CMAKE_CXX_COMPILER_LAUNCHER: ccache - CMAKE_C_COMPILER_LAUNCHER: ccache - OPENVINO_REPO: /__w/openvino/openvino/openvino - OPENVINO_BUILD_DIR: /__w/openvino/openvino/openvino_build - INSTALL_DIR: /__w/openvino/openvino/openvino_install - CONAN_USER_HOME: /mount/caches/ccache/ubuntu22_riscv64_master_release/.conan - CCACHE_REMOTE_DIR: /mount/caches/ccache/ubuntu22_riscv64/${{ needs.Smart_CI.outputs.target_branch }} - CCACHE_DIR: /__w/openvino/openvino/ccache - CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp - CCACHE_MAXSIZE: 2G - - if: ${{ github.event_name != 'merge_group' }} - steps: - - name: Clone OpenVINO - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - timeout-minutes: 15 - with: - path: 'openvino' - - # - # Print system info - # - - - name: System info - uses: ./openvino/.github/actions/system_info - - - name: Setup ccache - id: ccache_restore - uses: ./openvino/.github/actions/cache - with: - save-always: ${{ github.event_name == 'push' && 'true' || 'false' }} - cleanup-always: ${{ github.event_name == 'push' && 'true' || 'false' }} - cache-size: 10 - max-cache-size: 50 - cache-path: ${{ env.CCACHE_REMOTE_DIR }} - path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-ccache - - - name: Init submodules for non-Conan dependencies - run: | - pushd ${OPENVINO_REPO} - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/zlib - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/telemetry - git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo - git submodule update --init -- ${OPENVINO_REPO}/thirdparty/flatbuffers/flatbuffers - popd - - # - # Dependencies - # - - - name: Install Python dependencies - run: | - # create build directory - mkdir -p ${OPENVINO_BUILD_DIR} - - python3 -m venv ${OPENVINO_BUILD_DIR}/env - source ${OPENVINO_BUILD_DIR}/env/bin/activate - python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt - python3 -m pip install conan - - - name: Create conan_toolchain.cmake file - run: | - source ${OPENVINO_BUILD_DIR}/env/bin/activate - # generate build profile - conan profile detect - # patch settings.yml to contain riscv64 architecture - sed -i 's/sparcv9/riscv64/g' ~/.conan2/settings.yml - # generate host profile for linux_riscv64 - echo "include(default)" > ${CONAN_LINUX_RISCV64_PROFILE} - echo "[buildenv]" >> ${CONAN_LINUX_RISCV64_PROFILE} - echo "CC=riscv64-linux-gnu-gcc" >> ${CONAN_LINUX_RISCV64_PROFILE} - echo "CXX=riscv64-linux-gnu-g++" >> ${CONAN_LINUX_RISCV64_PROFILE} - # install OpenVINO dependencies - conan install ${OPENVINO_REPO}/conanfile.txt \ - -pr:h ${CONAN_LINUX_RISCV64_PROFILE} \ - -s:h arch=riscv64 \ - -s:h build_type=${CMAKE_BUILD_TYPE} \ - -o:h onetbb/*:tbbbind=False \ - -of ${OPENVINO_BUILD_DIR}/dependencies \ - -b missing - env: - CONAN_LINUX_RISCV64_PROFILE: ${{ env.OPENVINO_BUILD_DIR }}/linux_riscv64 - - # - # Build - # - - name: Clean ccache stats - run: ccache --zero-stats - - - name: CMake - Configure - run: | - source ${OPENVINO_BUILD_DIR}/env/bin/activate - source ${OPENVINO_BUILD_DIR}/dependencies/conanbuild.sh - cmake \ - -G 'Ninja' \ - -DENABLE_CPPLINT=OFF \ - -DENABLE_INTEL_GPU=ON \ - -DENABLE_PYTHON=ON \ - -DENABLE_WHEEL=ON \ - -DENABLE_TESTS=ON \ - -DENABLE_PYTHON_PACKAGING=ON \ - -DENABLE_SYSTEM_PROTOBUF=ON \ - -DENABLE_SYSTEM_SNAPPY=ON \ - -DENABLE_SYSTEM_PUGIXML=ON \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \ - -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ - -DCMAKE_TOOLCHAIN_FILE=${OPENVINO_BUILD_DIR}/dependencies/conan_toolchain.cmake \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ - -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ - -S ${OPENVINO_REPO} \ - -B ${OPENVINO_BUILD_DIR} - source ${OPENVINO_BUILD_DIR}/dependencies/deactivate_conanbuild.sh - - - name: Cmake - Build - run: cmake --build ${OPENVINO_BUILD_DIR} --parallel $(nproc) - - - name: Show ccache stats - run: ccache --show-stats - - - name: Cmake - Install - run: cmake --build ${OPENVINO_BUILD_DIR} --parallel $(nproc) --target install - - - name: Build OpenVINO C++ samples - run: | - source ${OPENVINO_BUILD_DIR}/dependencies/conanbuild.sh - ${INSTALL_DIR}/samples/cpp/build_samples.sh - source ${OPENVINO_BUILD_DIR}/dependencies/deactivate_conanbuild.sh - env: - CMAKE_TOOLCHAIN_FILE: ${{ env.OPENVINO_BUILD_DIR }}/dependencies/conan_toolchain.cmake - - - name: Clean ccache - run: ccache --cleanup - - Overall_Status: - name: ci/gha_overall_status_linux_riscv - needs: [Smart_CI, Build] - if: ${{ always() }} - runs-on: ubuntu-latest - steps: - - name: Check status of all jobs - if: >- - ${{ - contains(needs.*.result, 'failure') || - contains(needs.*.result, 'cancelled') - }} - run: exit 1