Skip to content

Commit d057e2d

Browse files
committed
[CI] Add oneAPI run to nightly
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 73336f3 commit d057e2d

File tree

7 files changed

+82
-27
lines changed

7 files changed

+82
-27
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ jobs:
5151
file: ubuntu2404_build
5252
tag: latest
5353
build_args: ""
54-
- name: Build Ubuntu 24.04 oneAPI Docker image
55-
file: ubuntu2404_build_oneapi
56-
tag: latest
57-
build_args: ""
5854
- name: Intel Drivers Ubuntu 22.04 Docker image
5955
file: ubuntu2204_intel_drivers
6056
tag: latest

.github/workflows/sycl-linux-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ jobs:
109109
build:
110110
name: Build + LIT
111111
runs-on: [Linux, build]
112+
defaults:
113+
run:
114+
shell: bash
112115
container:
113116
image: ${{ inputs.build_image }}
114117
options: -u 1001:1001
@@ -152,6 +155,9 @@ jobs:
152155
ref: ${{ inputs.build_ref || github.sha }}
153156
merge_ref: ${{ inputs.merge_ref }}
154157
cache_path: "/__w/repo_cache/"
158+
- name: Setup oneAPI env
159+
if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
160+
uses: ./devops/actions/setup_linux_oneapi_env
155161
- name: Configure
156162
env:
157163
CC: ${{ inputs.cc }}
@@ -176,6 +182,9 @@ jobs:
176182
- name: check-llvm
177183
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
178184
run: |
185+
if [[ ${{ inputs.cc }} == 'icx' ]] || [[ ${{ inputs.cxx }} == 'icpx' ]]; then
186+
export LIT_FILTER="SYCL"
187+
fi
179188
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
180189
- name: check-clang
181190
if: always() && !cancelled() && contains(inputs.changes, 'clang')
@@ -188,6 +197,9 @@ jobs:
188197
run: |
189198
# TODO consider moving this to Dockerfile.
190199
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
200+
if [[ ${{ inputs.cc }} == 'icx' ]] || [[ ${{ inputs.cxx }} == 'icpx' ]]; then
201+
export LIT_XFAIL="regression/host_tanpi_double_accuracy.cpp"
202+
fi
191203
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
192204
- name: check-sycl-unittests
193205
if: always() && !cancelled() && contains(inputs.changes, 'sycl')

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ on:
8686
reset_intel_gpu:
8787
type: string
8888
required: False
89+
is_icx:
90+
type: string
91+
default: 'false'
8992
install_igc_driver:
9093
type: string
9194
required: False
@@ -244,7 +247,11 @@ jobs:
244247
sudo apt-get install -yqq libllvm14 || true;
245248
fi
246249
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
250+
- name: Setup oneAPI env
251+
if: ${{ inputs.is_icx == 'true' }}
252+
uses: ./devops/actions/setup_linux_oneapi_env
247253
- name: Source OneAPI TBB vars.sh
254+
if: ${{ inputs.is_icx == 'false' }}
248255
shell: bash
249256
run: |
250257
# https://github.com/actions/runner/issues/1964 prevents us from using
@@ -346,12 +353,20 @@ jobs:
346353
env:
347354
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 }}
348355
run: |
356+
# When building with oneAPI, the oneAPI libsycl is found before the newly compiled one and the search order
357+
# can't be changed by environment variables, so just rename it temporarily.
358+
if [ ${{ inputs.is_icx }} == 'true' ]; then
359+
sudo mv /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so.bak
360+
fi
349361
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
350362
exit_code=$?
351363
cat e2e.log
352364
if [ $exit_code -ne 0 ]; then
353365
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
354366
fi
367+
if [ ${{ inputs.is_icx }} == 'true' ]; then
368+
sudo mv /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so.bak /opt/intel/oneapi/compiler/2025.0/lib/libsycl.so
369+
fi
355370
exit $exit_code
356371
- name: Build SYCL CTS tests
357372
if: inputs.tests_selector == 'cts' && inputs.sycl_cts_artifact == ''

.github/workflows/sycl-nightly.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ jobs:
3737

3838
artifact_archive_name: sycl_linux_shared.tar.zst
3939

40+
ubuntu2404_oneapi_build:
41+
if: github.repository == 'intel/llvm'
42+
uses: ./.github/workflows/sycl-linux-build.yml
43+
secrets: inherit
44+
with:
45+
build_cache_root: "/__w/"
46+
build_cache_suffix: oneapi
47+
build_artifact_suffix: oneapi
48+
build_configure_extra_args: '--hip --cuda --native_cpu --cmake-opt=-DCOMPILER_RT_BUILD_SANITIZERS=Off --cmake-opt=-DCOMPILER_RT_BUILD_MEMPROF=Off'
49+
cc: icx
50+
cxx: icpx
51+
52+
artifact_archive_name: sycl_linux.tar.zst
53+
4054
ubuntu2204_test:
4155
needs: [ubuntu2204_build]
4256
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
@@ -103,6 +117,24 @@ jobs:
103117
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
104118
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
105119

120+
ubuntu2404_oneapi_test:
121+
needs: [ubuntu2404_oneapi_build]
122+
if: ${{ always() && !cancelled() && needs.ubuntu2404_oneapi_build.outputs.build_conclusion == 'success' }}
123+
uses: ./.github/workflows/sycl-linux-run-tests.yml
124+
with:
125+
name: Intel PVC L0 oneAPI
126+
runner: '["Linux", "pvc"]'
127+
is_icx: true
128+
target_devices: level_zero:gpu
129+
extra_lit_opts: -j 50
130+
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
131+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
132+
ref: ${{ github.sha }}
133+
merge_ref: ''
134+
sycl_toolchain_artifact: sycl_linux_oneapi
135+
sycl_toolchain_archive: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_archive_name }}
136+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2404_oneapi_build.outputs.artifact_decompress_command }}
137+
106138
build-win:
107139
uses: ./.github/workflows/sycl-windows-build.yml
108140
if: github.repository == 'intel/llvm'

.github/workflows/sycl-windows-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
shell: bash
150150
run: |
151151
if [[ ${{inputs.compiler}} == 'icx' ]]; then
152-
export LIT_FILTER_OUT="host_tanpi_double_accuracy"
152+
export LIT_XFAIL="regression\host_tanpi_double_accuracy.cpp"
153153
fi
154154
cmake --build build --target check-sycl
155155
- name: check-sycl-unittests
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Linux setup oneAPI env
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Setup oneAPI env
7+
shell: bash
8+
run: |
9+
sudo apt-get --fix-broken -y install
10+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor \
11+
| sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
12+
sudo echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
13+
| sudo tee /etc/apt/sources.list.d/oneAPI.list && \
14+
sudo apt update && sudo apt-get -y install intel-oneapi-compiler-dpcpp-cpp-2025.0
15+
16+
env_before=$(env | sort)
17+
source /opt/intel/oneapi/setvars.sh
18+
env_after=$(env | sort)
19+
changed_envvars=$(comm -13 <(echo "$env_before") <(echo "$env_after"))
20+
while IFS= read -r line; do
21+
echo "$line" >> $GITHUB_ENV
22+
done <<< "$changed_envvars"

devops/containers/ubuntu2404_build_oneapi.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)