Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/openvinotoolkit/openvino
Browse files Browse the repository at this point in the history
…into mateuszm/slicescatter/core
  • Loading branch information
mmikolajcz committed Aug 23, 2024
2 parents 88c52c2 + 6d0d771 commit 02cfb3d
Show file tree
Hide file tree
Showing 152 changed files with 3,559 additions and 2,226 deletions.
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-25992
pr-26067
95 changes: 95 additions & 0 deletions .github/dockerfiles/ov_build/ubuntu_22_04_x64_dpcpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
FROM openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04

USER root

# APT configuration
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf

ENV DEBIAN_FRONTEND="noninteractive" \
TZ="Europe/London"

RUN apt-get update && \
apt-get install software-properties-common && \
add-apt-repository --yes --no-update ppa:git-core/ppa && \
add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install \
wget \
curl \
git \
ca-certificates \
gpg-agent \
tzdata \
libtbb2 \
# Pythons \
python3.11-dev \
python3.11-venv \
python3.11-distutils \
default-jdk \
&& \
rm -rf /var/lib/apt/lists/*


# Install OneAPI Toolkit
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/intel-oneapi-archive-keyring.gpg > /dev/null
RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " > /etc/apt/sources.list.d/oneAPI.list

RUN apt-get update && \
apt-get install \
intel-oneapi-compiler-dpcpp-cpp=2024.2.1-1079 \
&& \
rm -rf /var/lib/apt/lists/*

# Install build dependencies
ADD install_build_dependencies.sh /install_build_dependencies.sh
RUN chmod +x /install_build_dependencies.sh && \
/install_build_dependencies.sh && \
rm -rf /var/lib/apt/lists/*

# Install sscache
ARG SCCACHE_VERSION="v0.7.5"
ENV SCCACHE_HOME="/opt/sccache" \
SCCACHE_PATH="/opt/sccache/sccache"

RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}

# Setup pip
ENV PIP_VERSION="24.0"
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
rm -f get-pip.py

# Use Python 3.11 as default
# Using venv here 'cause other methods to switch the default Python on Ubuntu break both system and wheels build
RUN python3.11 -m venv venv
ENV PATH="/venv/bin:$SCCACHE_HOME:$PATH"

ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}

# OneAPI env
ENV ONEAPI_ROOT=/opt/intel/oneapi
ENV PKG_CONFIG_PATH=/opt/intel/oneapi/compiler/2024.2/lib/pkgconfig
ENV DIAGUTIL_PATH=/opt/intel/oneapi/dpcpp-ct/2024.2/etc/dpct/sys_check/sys_check.sh:/opt/intel/oneapi/debugger/2024.2/etc/debugger/sys_check/sys_check.py:/opt/intel/oneapi/compiler/2024.2/etc/compiler/sys_check/sys_check.sh
ENV MANPATH=/opt/intel/oneapi/debugger/2024.2/share/man:/opt/intel/oneapi/compiler/2024.2/share/man:
ENV GDB_INFO=/opt/intel/oneapi/debugger/2024.2/share/info/
ENV CMAKE_PREFIX_PATH=/opt/intel/oneapi/compiler/2024.2
ENV CMPLR_ROOT=/opt/intel/oneapi/compiler/2024.2
ENV INFOPATH=/opt/intel/oneapi/debugger/2024.2/share/info
ENV LIBRARY_PATH=/opt/intel/oneapi/compiler/2024.2/lib
ENV OCL_ICD_FILENAMES=/opt/intel/oneapi/compiler/2024.2/lib/libintelocl.so
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/debugger/2024.2/opt/debugger/lib:/opt/intel/oneapi/compiler/2024.2/opt/compiler/lib:/opt/intel/oneapi/compiler/2024.2/lib
ENV NLSPATH=/opt/intel/oneapi/mkl/2024.2/share/locale/%l_%t/%N:/opt/intel/oneapi/compiler/2024.2/lib/compiler/locale/%l_%t/%N
ENV PATH=$PATH:/opt/intel/oneapi/dev-utilities/2024.2/bin:/opt/intel/oneapi/debugger/2024.2/opt/debugger/bin:/opt/intel/oneapi/compiler/2024.2/bin
ENV INTEL_PYTHONHOME=/opt/intel/oneapi/debugger/2024.2/opt/debugger
ENV CPATH=/opt/intel/oneapi/dpl/2022.6/include:/opt/intel/oneapi/dev-utilities/2024.2/include:

# Set Intel DPC++ as a default compiler
ENV CC=icx
ENV CXX=icpx
2 changes: 1 addition & 1 deletion .github/workflows/job_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

# Ticket: 139627
- name: Checkout the latest OneDNN for GPU in nightly
if: ${{ inputs.event-name == 'schedule' }}
if: ${{ inputs.event-name == 'schedule' && inputs.os == 'ubuntu_20_04' }} # GPU tests are enabled only on U20
working-directory: ${{ env.OPENVINO_REPO }}/src/plugins/intel_gpu/thirdparty/onednn_gpu
run: |
git fetch origin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ jobs:
Overall_Status:
name: ci/gha_overall_status_linux_arm64
needs: [Smart_CI, Build, Debian_Packages, Samples, ONNX_Runtime, CXX_Unit_Tests, Python_Unit_Tests, CPU_Functional_Tests,
TensorFlow_Models_Tests, PyTorch_Models_Tests, Openvino_tokenizers]
TensorFlow_Models_Tests, PyTorch_Models_Tests, Openvino_tokenizers, TensorFlow_Layer_Tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/ubuntu_22_dpcpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Linux (Ubuntu 22.04, Python 3.11, Intel DPC++ Compiler)
on:
workflow_dispatch:
pull_request:
merge_group:

concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-ubuntu-22-dpcpp
cancel-in-progress: true

permissions: read-all

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 }}"
steps:
- name: checkout action
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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'

- name: Show affected components
run: |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
shell: bash

Docker:
needs: Smart_CI
runs-on: aks-linux-4-cores-16gb-docker-build
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: ./.github/actions/handle_docker
id: handle_docker
with:
images: |
ov_build/ubuntu_22_04_x64_dpcpp
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}

Build:
needs: [Docker, Smart_CI]
if: "!needs.smart_ci.outputs.skip_workflow"
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_x64_dpcpp }}", "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_dpcpp'

Overall_Status:
name: ci/gha_overall_status_ubuntu_22.04_dpcpp
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
94 changes: 47 additions & 47 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,55 @@ ov_set_temp_directory(TEMP "${CMAKE_SOURCE_DIR}")

## Intel OMP package
if(THREADING STREQUAL "OMP")
reset_deps_cache(OMP)
if(WIN32 AND X86_64)
RESOLVE_DEPENDENCY(OMP
ARCHIVE_WIN "iomp.zip"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "62c68646747fb10f19b53217cb04a1e10ff93606f992e6b35eb8c31187c68fbf"
USE_NEW_LOCATION TRUE)
elseif(LINUX AND X86_64 AND OPENVINO_GNU_LIBC)
RESOLVE_DEPENDENCY(OMP
ARCHIVE_LIN "iomp.tgz"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "7832b16d82513ee880d97c27c7626f9525ebd678decf6a8fe6c38550f73227d9"
USE_NEW_LOCATION TRUE)
elseif(APPLE AND X86_64)
RESOLVE_DEPENDENCY(OMP
ARCHIVE_MAC "iomp_20190130_mac.tgz"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "591ea4a7e08bbe0062648916f42bded71d24c27f00af30a8f31a29b5878ea0cc"
USE_NEW_LOCATION TRUE)
else()
message(WARNING "Pre-built Intel OMP is not available on current platform. System OMP will be used.")
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
foreach(OpenMP_LIB ${OpenMP_CXX_LIBRARIES})
string(FIND ${OpenMP_LIB} "omp" OpenMP_LIB_OMP_INDEX)
if(NOT OpenMP_LIB_OMP_INDEX EQUAL -1)
cmake_path(GET OpenMP_LIB PARENT_PATH OpenMP_LIB_DIR)
set(OMP_LIB ${OpenMP_LIB} CACHE FILEPATH "Path to OMP library")
set(OMP ${OpenMP_LIB_DIR} CACHE FILEPATH "Path to OMP root folder")
return()
endif()
endforeach()
# check whether the compiler supports OpenMP at all
find_package(OpenMP)

if(NOT OpenMP_CXX_FOUND)
message(WARNING "Compiler does not support OpenMP standard. Falling back to SEQ threading")
set(THREADING "SEQ")
set(ENABLE_INTEL_OPENMP OFF)
endif()

if(ENABLE_INTEL_OPENMP)
reset_deps_cache(OMP)
if(WIN32 AND X86_64)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_WIN "iomp.zip"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "62c68646747fb10f19b53217cb04a1e10ff93606f992e6b35eb8c31187c68fbf"
USE_NEW_LOCATION TRUE)
elseif(LINUX AND X86_64 AND OPENVINO_GNU_LIBC)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_LIN "iomp.tgz"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "7832b16d82513ee880d97c27c7626f9525ebd678decf6a8fe6c38550f73227d9"
USE_NEW_LOCATION TRUE)
elseif(APPLE AND X86_64)
RESOLVE_DEPENDENCY(INTEL_OMP
ARCHIVE_MAC "iomp_20190130_mac.tgz"
TARGET_PATH "${TEMP}/omp"
ENVIRONMENT "INTEL_OMP"
VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*"
SHA256 "591ea4a7e08bbe0062648916f42bded71d24c27f00af30a8f31a29b5878ea0cc"
USE_NEW_LOCATION TRUE)
endif()

if(INTEL_OMP)
update_deps_cache(INTEL_OMP "${INTEL_OMP}" "Path to OMP root folder")
debug_message(STATUS "intel_omp=" ${INTEL_OMP})

ov_cpack_add_component(omp HIDDEN)
file(GLOB_RECURSE source_list "${INTEL_OMP}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION ${OV_CPACK_RUNTIMEDIR}
COMPONENT intel_omp
${OV_CPACK_COMP_OPENMP_EXCLUDE_ALL})
endif()
message(FATAL_ERROR "System OpenMP has not been found")
endif()
update_deps_cache(OMP "${OMP}" "Path to OMP root folder")
debug_message(STATUS "intel_omp=" ${OMP})

ov_cpack_add_component(omp HIDDEN)
file(GLOB_RECURSE source_list "${OMP}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION ${OV_CPACK_RUNTIMEDIR}
COMPONENT omp)
endif()

## TBB package
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/compile_flags/os_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ endif()
if(NOT DEFINED CMAKE_CXX_STANDARD)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_STANDARD 14)
elseif(OV_COMPILER_IS_INTEL_LLVM)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 11)
endif()
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ macro(ov_define_component_include_rules)
# tbb
unset(OV_CPACK_COMP_TBB_EXCLUDE_ALL)
unset(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL)
# openmp
unset(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL)
# licensing
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL)
# samples
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/common-libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ macro(ov_define_component_include_rules)
# tbb
set(OV_CPACK_COMP_TBB_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# openmp
set(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# licensing
if(CPACK_GENERATOR STREQUAL "CONAN")
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL)
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/debian/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ macro(ov_define_component_include_rules)
# tbb
set(OV_CPACK_COMP_TBB_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# openmp
set(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# licensing
set(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# samples
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/npm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ macro(ov_define_component_include_rules)
# tbb
unset(OV_CPACK_COMP_TBB_EXCLUDE_ALL)
set(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# openmp
unset(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL)
# licensing
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL)
# samples
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/nsis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ macro(ov_define_component_include_rules)
# tbb
unset(OV_CPACK_COMP_TBB_EXCLUDE_ALL)
unset(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL)
# openmp
unset(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL)
# licensing
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL)
# samples
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/rpm/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ macro(ov_define_component_include_rules)
# tbb
set(OV_CPACK_COMP_TBB_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_TBB_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# openmp
set(OV_CPACK_COMP_OPENMP_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# licensing
set(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# samples
Expand Down
Loading

0 comments on commit 02cfb3d

Please sign in to comment.