Skip to content

Commit 1f3655f

Browse files
committed
Merge branch 'sycl' into review/yang/fix_metadata_assert
2 parents a60221a + 3b48a46 commit 1f3655f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+966
-159
lines changed

.github/workflows/sycl-aws.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
description: "JSON string with array of objects with aws-type, runs-on, aws-ami, aws-spot, aws-disk, aws-timebomb, one-job properties"
1616
type: string
1717
default: '[{"runs-on":"aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]'
18+
ref:
19+
type: string
20+
required: false
1821

1922
jobs:
2023
aws:
@@ -24,6 +27,7 @@ jobs:
2427
- uses: actions/checkout@v4
2528
with:
2629
sparse-checkout: devops/actions/aws-ec2
30+
ref: ${{ inputs.ref || github.sha }}
2731
- run: npm install ./devops/actions/aws-ec2
2832
- uses: ./devops/actions/aws-ec2
2933
with:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ on:
5050
description: 'Artifacts retention period'
5151
type: string
5252
default: 3
53+
ref:
54+
type: string
55+
required: false
5356

5457
outputs:
5558
build_conclusion:
@@ -143,6 +146,7 @@ jobs:
143146
with:
144147
sparse-checkout: |
145148
devops/actions
149+
ref: ${{ inputs.ref || github.sha }}
146150
# Cleanup will be run after all actions are completed.
147151
- name: Register cleanup after job is finished
148152
uses: ./devops/actions/cleanup

.github/workflows/sycl-post-commit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ jobs:
103103
&& success()
104104
&& github.repository == 'intel/llvm'
105105
uses: ./.github/workflows/sycl-windows-build.yml
106-
106+
with:
107+
compiler: icx
108+
build_configure_extra_args: --cmake-opt=-DCMAKE_C_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt=-DCMAKE_CXX_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt="-DCMAKE_EXE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_MODULE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_SHARED_LINKER_FLAGS=/manifest:no"
109+
build_cache_suffix: icx
110+
107111
e2e-win:
108112
needs: build-win
109113
# Continue if build was successful.
@@ -117,6 +121,7 @@ jobs:
117121
runner: '["Windows","gen12"]'
118122
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
119123
extra_lit_opts: --param gpu-intel-gen12=True
124+
compiler: icx
120125

121126
macos_default:
122127
name: macOS
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: SYCL Release Branch Nightly
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 3 * * *'
7+
8+
permissions: read-all
9+
10+
env:
11+
# NOTE: so that GitHub Actions can trigger the scheduled workflow run - the
12+
# workflow file should be on the default branch. Therefore every job should
13+
# checkout the release branch.
14+
SYCL_REL_BRANCH: "draft-sycl-rel-6_0_0"
15+
16+
jobs:
17+
# To avoid unnecessary scheduled runs this job checks if there are new commits
18+
# since the last run. More precisely, it checks if the last commit is older
19+
# than 24h. That means the previous Nightly already tested this commit.
20+
check_for_new_commits:
21+
runs-on: ubuntu-latest
22+
name: Check for new commits
23+
outputs:
24+
is_new_commit: ${{ steps.is_new_commit.outputs.is_new_commit }}
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ env.SYCL_REL_BRANCH }}
29+
- run: git show --quiet | tee -a $GITHUB_STEP_SUMMARY
30+
31+
- id: is_new_commit
32+
if: ${{ github.event_name == 'schedule' }}
33+
run: |
34+
if [ -z "$(git rev-list --after="24 hours" HEAD)" ]; then
35+
echo "is_new_commit=false" >> $GITHUB_OUTPUT
36+
fi
37+
38+
ubuntu2204_build:
39+
needs: [check_for_new_commits]
40+
if: ${{ github.repository == 'intel/llvm' && needs.check_for_new_commits.outputs.is_new_commit != 'false' }}
41+
uses: ./.github/workflows/sycl-linux-build.yml
42+
secrets: inherit
43+
with:
44+
build_cache_root: "/__w/"
45+
build_artifact_suffix: v6
46+
build_configure_extra_args: '--hip --cuda'
47+
merge_ref: ''
48+
ref: ${{ env.SYCL_REL_BRANCH }}
49+
50+
# We upload the build for people to download/use, override its name and
51+
# prefer widespread gzip compression.
52+
artifact_archive_name: sycl_linux.tar.gz
53+
54+
ubuntu2204_test:
55+
needs: [ubuntu2204_build]
56+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
include:
61+
- name: AMD/HIP
62+
runner: '["Linux", "amdgpu"]'
63+
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
64+
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
65+
target_devices: ext_oneapi_hip:gpu
66+
tests_selector: e2e
67+
68+
- name: Intel L0 GPU
69+
runner: '["Linux", "gen12"]'
70+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
71+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
72+
target_devices: level_zero:gpu
73+
reset_intel_gpu: true
74+
tests_selector: e2e
75+
extra_lit_opts: --param gpu-intel-gen12=True
76+
77+
- name: Intel OCL GPU
78+
runner: '["Linux", "gen12"]'
79+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
80+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
81+
target_devices: opencl:gpu
82+
reset_intel_gpu: true
83+
tests_selector: e2e
84+
extra_lit_opts: --param gpu-intel-gen12=True
85+
86+
- name: Intel OCL CPU
87+
runner: '["Linux", "gen12"]'
88+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
89+
image_options: -u 1001 --privileged --cap-add SYS_ADMIN
90+
target_devices: opencl:cpu
91+
tests_selector: e2e
92+
93+
- name: SYCL-CTS on OCL CPU
94+
runner: '["Linux", "gen12"]'
95+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
96+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
97+
target_devices: opencl:cpu
98+
tests_selector: cts
99+
100+
- name: SYCL-CTS on L0 gen12
101+
runner: '["Linux", "gen12"]'
102+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
103+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
104+
target_devices: level_zero:gpu
105+
tests_selector: cts
106+
uses: ./.github/workflows/sycl-linux-run-tests.yml
107+
with:
108+
name: ${{ matrix.name }}
109+
runner: ${{ matrix.runner }}
110+
image: ${{ matrix.image }}
111+
image_options: ${{ matrix.image_options }}
112+
target_devices: ${{ matrix.target_devices }}
113+
tests_selector: ${{ matrix.tests_selector }}
114+
extra_lit_opts: ${{ matrix.extra_lit_opts }}
115+
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
116+
ref: ${{ env.SYCL_REL_BRANCH }}
117+
merge_ref: ''
118+
sycl_toolchain_artifact: sycl_linux_default
119+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
120+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
121+
122+
build-win:
123+
needs: [check_for_new_commits]
124+
if: ${{ github.repository == 'intel/llvm' && needs.check_for_new_commits.outputs.is_new_commit != 'false' }}
125+
uses: ./.github/workflows/sycl-windows-build.yml
126+
with:
127+
# We upload both Linux/Windows build via Github's "Releases"
128+
# functionality, make sure Linux/Windows names follow the same pattern.
129+
artifact_archive_name: sycl_windows.tar.gz
130+
build_ref: ${{ env.SYCL_REL_BRANCH }}
131+
132+
e2e-win:
133+
needs: build-win
134+
# Continue if build was successful.
135+
if: |
136+
always()
137+
&& !cancelled()
138+
&& needs.build-win.outputs.build_conclusion == 'success'
139+
uses: ./.github/workflows/sycl-windows-run-tests.yml
140+
with:
141+
name: Intel GEN12 Graphics with Level Zero
142+
runner: '["Windows","gen12"]'
143+
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
144+
extra_lit_opts: --param gpu-intel-gen12=True
145+
ref: ${{ env.SYCL_REL_BRANCH }}
146+
147+
cuda-aws-start:
148+
needs: [ubuntu2204_build]
149+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
150+
uses: ./.github/workflows/sycl-aws.yml
151+
secrets: inherit
152+
with:
153+
mode: start
154+
ref: ${{ env.SYCL_REL_BRANCH }}
155+
156+
cuda-run-tests:
157+
needs: [ubuntu2204_build, cuda-aws-start]
158+
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
159+
uses: ./.github/workflows/sycl-linux-run-tests.yml
160+
with:
161+
name: CUDA E2E
162+
runner: '["aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}"]'
163+
image: ghcr.io/intel/llvm/ubuntu2204_build:latest-0300ac924620a51f76c4929794637b82790f12ab
164+
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1
165+
target_devices: ext_oneapi_cuda:gpu
166+
ref: ${{ env.SYCL_REL_BRANCH }}
167+
merge_ref: ''
168+
169+
sycl_toolchain_artifact: sycl_linux_default
170+
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
171+
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
172+
173+
cuda-aws-stop:
174+
needs: [cuda-aws-start, cuda-run-tests]
175+
if: always()
176+
uses: ./.github/workflows/sycl-aws.yml
177+
secrets: inherit
178+
with:
179+
mode: stop
180+
ref: ${{ env.SYCL_REL_BRANCH }}

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

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
build_ref:
1111
type: string
1212
required: false
13+
build_configure_extra_args:
14+
type: string
15+
required: false
1316
changes:
1417
type: string
1518
description: 'Filter matches for the changed files in the PR'
@@ -22,6 +25,10 @@ on:
2225
description: 'Artifacts retention period'
2326
type: string
2427
default: 3
28+
compiler:
29+
type: string
30+
required: false
31+
default: "cl"
2532

2633
outputs:
2734
build_conclusion:
@@ -41,6 +48,9 @@ on:
4148
type: choice
4249
options:
4350
- "default"
51+
build_configure_extra_args:
52+
type: string
53+
required: false
4454
artifact_archive_name:
4555
type: choice
4656
options:
@@ -50,6 +60,12 @@ on:
5060
type: choice
5161
options:
5262
- 3
63+
compiler:
64+
type: choice
65+
options:
66+
- cl
67+
- icx
68+
5369
permissions: read-all
5470

5571
jobs:
@@ -61,37 +77,43 @@ jobs:
6177
outputs:
6278
build_conclusion: ${{ steps.build.conclusion }}
6379
steps:
80+
- uses: actions/checkout@v4
81+
with:
82+
path: src
83+
ref: ${{ inputs.build_ref || github.sha }}
84+
fetch-depth: 1
6485
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
6586
with:
6687
arch: amd64
88+
- name: Setup oneAPI env
89+
uses: ./src/devops/actions/setup_windows_oneapi_env
90+
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
6791
- name: Set env
6892
run: |
6993
git config --system core.longpaths true
7094
git config --global core.autocrlf false
7195
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
72-
echo "SCCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
73-
- uses: actions/checkout@v4
74-
with:
75-
path: src
76-
ref: ${{ inputs.build_ref || github.sha }}
77-
fetch-depth: 1
96+
echo "CCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
97+
echo "CCACHE_MAXSIZE=10G" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
7898
- name: Register cleanup after job is finished
7999
uses: ./src/devops/actions/cleanup
80100
- name: Configure
81101
shell: cmd
102+
env:
103+
ARGS: ${{ inputs.build_configure_extra_args }}
82104
# TODO switch to clang-cl and lld when this is fixed https://github.com/oneapi-src/level-zero/issues/83
83105
run: |
84106
mkdir build
85107
mkdir install
86108
IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
87109
IF NOT EXIST D:\github\_work\cache\${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
88110
python.exe src/buildbot/configure.py -o build ^
89-
--ci-defaults ^
90-
--cmake-opt="-DCMAKE_C_COMPILER=cl" ^
91-
--cmake-opt="-DCMAKE_CXX_COMPILER=cl" ^
111+
--ci-defaults %ARGS% ^
112+
--cmake-opt="-DCMAKE_C_COMPILER=${{inputs.compiler}}" ^
113+
--cmake-opt="-DCMAKE_CXX_COMPILER=${{inputs.compiler}}" ^
92114
--cmake-opt="-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^
93-
--cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" ^
94-
--cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=sccache" ^
115+
--cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" ^
116+
--cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=ccache" ^
95117
--cmake-opt="-DLLVM_INSTALL_UTILS=ON" ^
96118
--cmake-opt="-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV"
97119
- name: Build
@@ -101,16 +123,24 @@ jobs:
101123
cmake --build build --target sycl-toolchain
102124
- name: check-llvm
103125
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
126+
shell: bash
104127
run: |
128+
if [[ ${{inputs.compiler}} == 'icx' ]]; then
129+
export LIT_FILTER="SYCL"
130+
fi
105131
cmake --build build --target check-llvm
106132
- name: check-clang
107133
if: always() && !cancelled() && contains(inputs.changes, 'clang')
108134
run: |
109135
cmake --build build --target check-clang
110136
- name: check-sycl
111137
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
138+
shell: bash
112139
run: |
113-
cmake --build build --target check-sycl
140+
if [[ ${{inputs.compiler}} == 'icx' ]]; then
141+
export LIT_FILTER_OUT="host_tanpi_double_accuracy"
142+
fi
143+
cmake --build build --target check-sycl
114144
- name: check-sycl-unittests
115145
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
116146
run: |

0 commit comments

Comments
 (0)