From 08974d711e610a3e33c97ef17ede8fd980e71363 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Wed, 22 Jan 2025 06:40:32 +0900 Subject: [PATCH] [CI] Add oneAPI run to nightly (#16652) Add a compile + PVC E2E run using oneAPI to the nightly. This is expected to help reduce pulldown issues. We use flags to disable using Intel libraries so test results match normal builds and there's no oneAPI dependency in the test phase. Remove the oneAPI docker container as we install it as an action instead. --------- Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-containers.yaml | 4 --- .github/workflows/sycl-linux-build.yml | 6 ++-- .github/workflows/sycl-nightly.yml | 31 +++++++++++++++++++ .github/workflows/sycl-windows-build.yml | 2 +- .../actions/setup_linux_oneapi_env/action.yml | 22 +++++++++++++ .../ubuntu2404_build_oneapi.Dockerfile | 22 ------------- 6 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 devops/actions/setup_linux_oneapi_env/action.yml delete mode 100644 devops/containers/ubuntu2404_build_oneapi.Dockerfile diff --git a/.github/workflows/sycl-containers.yaml b/.github/workflows/sycl-containers.yaml index 82e9665486250..4c07a978e02fa 100644 --- a/.github/workflows/sycl-containers.yaml +++ b/.github/workflows/sycl-containers.yaml @@ -51,10 +51,6 @@ jobs: file: ubuntu2404_build tag: latest build_args: "" - - name: Build Ubuntu 24.04 oneAPI Docker image - file: ubuntu2404_build_oneapi - tag: latest - build_args: "" - name: Intel Drivers Ubuntu 22.04 Docker image file: ubuntu2204_intel_drivers tag: latest diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 6221afd481938..8971079f08f30 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -152,11 +152,13 @@ jobs: ref: ${{ inputs.build_ref || github.sha }} merge_ref: ${{ inputs.merge_ref }} cache_path: "/__w/repo_cache/" + - name: Setup oneAPI env + if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }} + uses: ./devops/actions/setup_linux_oneapi_env - name: Configure env: CC: ${{ inputs.cc }} CXX: ${{ inputs.cxx }} - ARGS: ${{ inputs.build_configure_extra_args }} CUDA_LIB_PATH: "/usr/local/cuda/lib64/stubs" run: | mkdir -p $CCACHE_DIR @@ -164,7 +166,7 @@ jobs: cd $GITHUB_WORKSPACE/build python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \ -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \ - --ci-defaults $ARGS \ + --ci-defaults ${{ inputs.build_configure_extra_args }} \ --cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache \ --cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ --cmake-opt="-DLLVM_INSTALL_UTILS=ON" \ diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index 01831b428088c..5485719d60141 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -37,6 +37,20 @@ jobs: artifact_archive_name: sycl_linux_shared.tar.zst + ubuntu2404_oneapi_build: + if: github.repository == 'intel/llvm' + uses: ./.github/workflows/sycl-linux-build.yml + secrets: inherit + with: + build_cache_root: "/__w/" + build_cache_suffix: oneapi + build_artifact_suffix: oneapi + build_configure_extra_args: --cmake-opt=-DCMAKE_C_FLAGS="-no-intel-lib -ffp-model=precise" --cmake-opt=-DCMAKE_CXX_FLAGS="-no-intel-lib -ffp-model=precise" + cc: icx + cxx: icpx + + artifact_archive_name: sycl_linux_oneapi.tar.zst + ubuntu2204_test: needs: [ubuntu2204_build] if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} @@ -103,6 +117,23 @@ jobs: sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} + ubuntu2404_oneapi_test: + needs: [ubuntu2404_oneapi_build] + if: ${{ always() && !cancelled() && needs.ubuntu2404_oneapi_build.outputs.build_conclusion == 'success' }} + uses: ./.github/workflows/sycl-linux-run-tests.yml + with: + name: Intel PVC L0 oneAPI + runner: '["Linux", "pvc"]' + target_devices: level_zero:gpu + extra_lit_opts: -j 50 + image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + ref: ${{ github.sha }} + merge_ref: '' + sycl_toolchain_artifact: sycl_linux_oneapi + sycl_toolchain_archive: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_archive_name }} + sycl_toolchain_decompress_command: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_decompress_command }} + build-win: uses: ./.github/workflows/sycl-windows-build.yml if: github.repository == 'intel/llvm' diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index de2d452de7a50..77ea70c23c8d1 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -149,7 +149,7 @@ jobs: shell: bash run: | if [[ ${{inputs.compiler}} == 'icx' ]]; then - export LIT_FILTER_OUT="host_tanpi_double_accuracy" + export LIT_XFAIL="regression\host_tanpi_double_accuracy.cpp" fi cmake --build build --target check-sycl - name: check-sycl-unittests diff --git a/devops/actions/setup_linux_oneapi_env/action.yml b/devops/actions/setup_linux_oneapi_env/action.yml new file mode 100644 index 0000000000000..e54bd13d99b5e --- /dev/null +++ b/devops/actions/setup_linux_oneapi_env/action.yml @@ -0,0 +1,22 @@ +name: Linux setup oneAPI env + +runs: + using: "composite" + steps: + - name: Setup oneAPI env + shell: bash + run: | + sudo apt-get --fix-broken -y install + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor \ + | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ + sudo echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ + | sudo tee /etc/apt/sources.list.d/oneAPI.list && \ + sudo apt update && sudo apt-get -y install intel-oneapi-compiler-dpcpp-cpp-2025.0 + + env_before=$(env | sort) + source /opt/intel/oneapi/setvars.sh + env_after=$(env | sort) + changed_envvars=$(comm -13 <(echo "$env_before") <(echo "$env_after")) + while IFS= read -r line; do + echo "$line" >> $GITHUB_ENV + done <<< "$changed_envvars" diff --git a/devops/containers/ubuntu2404_build_oneapi.Dockerfile b/devops/containers/ubuntu2404_build_oneapi.Dockerfile deleted file mode 100644 index 8eb4950f6f894..0000000000000 --- a/devops/containers/ubuntu2404_build_oneapi.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ghcr.io/intel/llvm/ubuntu2404_build - -ENV DEBIAN_FRONTEND=noninteractive - -USER root - -# Install oneAPI - -RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor \ -| tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ -echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \ -| tee /etc/apt/sources.list.d/oneAPI.list - -# Install the ROCM kernel driver and oneAPI -RUN apt update && apt install -yqq intel-oneapi-compiler-dpcpp-cpp-2025.0 && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -USER sycl - -ENTRYPOINT ["/docker_entrypoint.sh"] -