-
Notifications
You must be signed in to change notification settings - Fork 55
181 lines (153 loc) · 5.63 KB
/
sdk_build_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: sdk-build-and-test
on:
push:
branches:
- master
- release/**
paths:
- sdk/**
pull_request:
branches:
- master
- release/**
paths:
- sdk/**
permissions:
contents: read
jobs:
sdk-build-and-test:
name: Test pti-sdk on Ubuntu
#
# pti is a selector to machines with Intel Ponte Vecchio officially
# Intel(R) Data Center GPU Max 1100
#
runs-on: [self-hosted, Linux, pti]
defaults:
run:
shell: bash
strategy:
matrix:
include:
- container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_24_2_1 }}
uploadname: "ubuntu-24.04.2024.2.1"
preset: linux-icpx-release
container:
image: ${{ matrix.container }}
options: --device=/dev/dri --cap-add CAP_PERFMON
if: vars.PTI_RUN_TESTS == 1
steps:
- name: Clean-up
run: rm -rf *
- name: Checkout
uses: actions/checkout@v4
- name: Build
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
cmake --preset ${{ matrix.preset }}
cmake --build --preset ${{ matrix.preset }} -j $(($(nproc)/2))
- name: Test
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
ctest --output-on-failure --preset ${{ matrix.preset }}
- name: Build AddressSanitizer
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
cmake --preset linux-asan
cmake --build --preset linux-asan --parallel $(($(nproc)/2))
- name: Build ThreadSanitizer
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
cmake --preset linux-tsan
cmake --build --preset linux-tsan --parallel $(($(nproc)/2))
- name: Build libFuzzer
working-directory: sdk
run: |
# To ensure it still builds, run build for fuzz targets until we have
# proper fuzz testing infrastructure in place.
source /opt/intel/oneapi/setvars.sh
cmake --preset linux-fuzz
cmake --build --preset linux-fuzz --parallel $(($(nproc)/2))
#
# Rocky8 has a problem with this test.
#
- name: Test AddressSanitizer
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
#
# Must skip Rocky8 with more than one GPU because of
# an unexpected failure as documented in PTI-74
#
if [ $(sycl-ls|grep 'ext_oneapi_level_zero:gpu:' -c) -gt 1 ] &&\
[[ $(cat /etc/redhat-release) =~ Rocky.*8 ]]; then
exit 0
fi
ctest --preset linux-asan --output-on-failure -L samples
- name: Test ThreadSanitizer
working-directory: sdk
run: |
source /opt/intel/oneapi/setvars.sh
ctest --preset linux-tsan --output-on-failure -L samples
win-lib-build-and-test:
name: Test pti-lib on Windows
runs-on: [self-hosted, Windows, pti]
env:
LEVEL_ZERO_LOADER_VERSION: 1.14.0
defaults:
run:
shell: cmd
working-directory: sdk
strategy:
matrix:
include:
- preset: windows-ci-release
build-dir: wbr
if: vars.PTI_RUN_TESTS == 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Level Zero Loader Version
id: loader-ver
run: |
@echo off
REM Make sure there is no whitespace between ...>>...
echo ze_loader_ver=%LEVEL_ZERO_LOADER_VERSION%>>%GITHUB_OUTPUT%
- uses: actions/cache@v4
id: cache
with:
path: sdk/level-zero-sdk
key: ${{ runner.os }}-Ze-Loader-${{ steps.loader-ver.outputs.ze_loader_ver }}
- name: Download Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
rmdir /S /Q level-zero-sdk
del /s level-zero-sdk_%LEVEL_ZERO_LOADER_VERSION%.zip
echo https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-sdk_%LEVEL_ZERO_LOADER_VERSION%.zip
curl.exe -L -O https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-sdk_%LEVEL_ZERO_LOADER_VERSION%.zip
unzip.exe -q level-zero-sdk_%LEVEL_ZERO_LOADER_VERSION%.zip -d level-zero-sdk
echo "Successfully Downloaded Level Zero Loader Version %LEVEL_ZERO_LOADER_VERSION%"
- name: Build
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
set /A JOBS=%NUMBER_OF_PROCESSORS%/2
rmdir /S /Q ${{ matrix.build-dir }}
cmake --preset ${{ matrix.preset }}
cmake --build --preset ${{ matrix.preset }} --parallel %JOBS%
- name: Test
run: |
@echo off
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
REM TODO Kernel name demangling not supported on Windows yet.
REM TODO Tests need to be run without \DNDEBUG set
REM TODO OverheadRecordsCountsAllOnesViewRecords fails on Windows. Investigation needed. Bug filed.
ctest --output-on-failure --preset ${{ matrix.preset }} -E "MainFixtureTest.DeMangled.*|MainFixtureTest.KernelViewRecordHasSyclFileName|MainFixtureTest.OverheadRecordsCountsAllOnesViewRecords"