Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Use oneAPI for Linux postcommit build #16382

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/sycl-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ jobs:
build:
name: Build + LIT
runs-on: [Linux, build]
defaults:
run:
shell: bash
container:
image: ${{ inputs.build_image }}
options: -u 1001:1001
Expand Down Expand Up @@ -152,6 +155,9 @@ 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 }}
Expand All @@ -175,7 +181,7 @@ jobs:
run: cmake --build $GITHUB_WORKSPACE/build
- name: check-llvm
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
run: |
run: |
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
- name: check-clang
if: always() && !cancelled() && contains(inputs.changes, 'clang')
Expand All @@ -188,6 +194,9 @@ jobs:
run: |
# TODO consider moving this to Dockerfile.
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
if [[ ${{inputs.cc}} == 'icx' ]] || [[ ${inputs.cxx}} == 'icpx' ]]; then
export LIT_XFAIL="regression/host_tanpi_double_accuracy.cpp"
fi
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
- name: check-sycl-unittests
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ on:
reset_intel_gpu:
type: string
required: False
is_icx:
type: string
default: 'false'
install_igc_driver:
type: string
required: False
Expand Down Expand Up @@ -244,7 +247,11 @@ jobs:
sudo apt-get install -yqq libllvm14 || true;
fi
sudo -E bash devops/scripts/install_drivers.sh llvm/devops/dependencies.json ${{ inputs.install_dev_igc_driver == 'true' && 'llvm/devops/dependencies-igc-dev.json --use-dev-igc' || '' }} --all
- name: Setup oneAPI env
if: ${{ inputs.is_icx == 'true' }}
uses: ./devops/actions/setup_linux_oneapi_env
- name: Source OneAPI TBB vars.sh
if: ${{ inputs.is_icx == 'false' }}
shell: bash
run: |
# https://github.com/actions/runner/issues/1964 prevents us from using
Expand Down Expand Up @@ -346,12 +353,20 @@ jobs:
env:
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
run: |
# When building with oneAPI, the oneAPI libsycl is found before the newly compiled one and the search order
# can't be changed by environment variables, so just rename it temporarily.
if [ ${{ inputs.is_icx }} == 'true' ]; then
sudo mv /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so.bak
fi
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
exit_code=$?
cat e2e.log
if [ $exit_code -ne 0 ]; then
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
fi
if [ ${{ inputs.is_icx }} == 'true' ]; then
sudo mv /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so.bak /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so
fi
exit $exit_code
- name: Build SYCL CTS tests
if: inputs.tests_selector == 'cts' && inputs.sycl_cts_artifact == ''
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ jobs:
uses: ./.github/workflows/sycl-linux-build.yml
with:
build_cache_root: "/__w/llvm"
build_cache_suffix: default
build_cache_suffix: icx
build_artifact_suffix: default
build_configure_extra_args: --no-assertions --hip --cuda --native_cpu --cmake-opt="-DSYCL_ENABLE_STACK_PRINTING=ON" --cmake-opt="-DSYCL_LIB_WITH_DEBUG_SYMBOL=ON"
build_configure_extra_args: --no-assertions --hip --cuda --native_cpu --cmake-opt=-DSYCL_ENABLE_STACK_PRINTING=ON --cmake-opt=-DSYCL_LIB_WITH_DEBUG_SYMBOL=ON --cmake-opt=-DCOMPILER_RT_BUILD_SANITIZERS=Off --cmake-opt=-DCOMPILER_RT_BUILD_MEMPROF=Off
merge_ref: ''
cc: icx
cxx: icpx

e2e-lin:
needs: [build-lin]
Expand Down Expand Up @@ -85,6 +87,7 @@ jobs:
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
target_devices: ${{ matrix.target_devices || 'level_zero:gpu' }}
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
is_icx: true

extra_lit_opts: ${{ matrix.extra_lit_opts }}
env: ${{ matrix.env || '{}' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions devops/actions/setup_linux_oneapi_env/action.yml
Original file line number Diff line number Diff line change
@@ -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"
22 changes: 0 additions & 22 deletions devops/containers/ubuntu2404_build_oneapi.Dockerfile

This file was deleted.

Loading