Skip to content

Commit 3bf4675

Browse files
committed
Run fuzztests on L0 HW in CI
instead of running fuzztests in CI on the null adapter.
1 parent fcd0fe5 commit 3bf4675

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

.github/workflows/cmake.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,15 @@ jobs:
116116
working-directory: ${{github.workspace}}/build
117117
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
118118

119-
fuzztest-build:
120-
name: Build and run quick fuzztest scenarios
119+
fuzztest-build-hw:
120+
name: Build and run quick fuzztest scenarios on L0 HW
121+
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
121122
strategy:
122123
matrix:
123124
build_type: [Debug, Release]
124125
compiler: [{c: clang, cxx: clang++}]
125126

126-
runs-on: 'ubuntu-22.04'
127+
runs-on: 'FUZZTESTS'
127128

128129
steps:
129130
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -133,14 +134,20 @@ jobs:
133134

134135
- name: Download DPC++
135136
run: |
136-
sudo apt install libncurses5
137137
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
138138
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
139139
140140
- name: Setup DPC++
141141
run: |
142142
source ${{github.workspace}}/dpcpp_compiler/startup.sh
143143
144+
- name: Build level zero
145+
run: |
146+
git clone -b v1.17.6 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
147+
cd ${{github.workspace}}/level-zero
148+
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
149+
cmake --build build -j $(nproc)
150+
144151
- name: Configure CMake
145152
run: >
146153
cmake
@@ -152,14 +159,22 @@ jobs:
152159
-DUR_BUILD_TESTS=ON
153160
-DUR_USE_ASAN=ON
154161
-DUR_USE_UBSAN=ON
162+
-DUR_BUILD_ADAPTER_L0=ON
163+
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
164+
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
155165
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
166+
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
156167
157168
- name: Build
158169
run: cmake --build ${{github.workspace}}/build -j $(nproc)
159170

160171
- name: Fuzz test
161172
working-directory: ${{github.workspace}}/build
162173
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short" --verbose
174+
175+
- name: Get information about platform
176+
if: ${{ always() }}
177+
run: .github/scripts/get_system_info.sh
163178

164179
level-zero:
165180
name: Level Zero

.github/workflows/nightly.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
long-fuzz-test:
12+
long-fuzz-test-hw:
1313
name: Run long fuzz tests
14+
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
1415
strategy:
1516
matrix:
1617
build_type: [Debug, Release]
1718
compiler: [{c: clang, cxx: clang++}]
1819

19-
runs-on: 'ubuntu-22.04'
20+
runs-on: 'FUZZTESTS'
2021

2122
steps:
2223
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -30,6 +31,13 @@ jobs:
3031
mkdir dpcpp_compiler
3132
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
3233
34+
- name: Build level zero
35+
run: |
36+
git clone -b v1.17.6 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
37+
cd ${{github.workspace}}/level-zero
38+
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
39+
cmake --build build -j $(nproc)
40+
3341
- name: Configure CMake
3442
run: >
3543
cmake
@@ -41,13 +49,20 @@ jobs:
4149
-DUR_BUILD_TESTS=ON
4250
-DUR_USE_ASAN=ON
4351
-DUR_USE_UBSAN=ON
52+
-DUR_BUILD_ADAPTER_L0=ON
53+
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
54+
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
4455
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
56+
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
4557
4658
- name: Build
47-
run: >
48-
LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
59+
run: |
4960
cmake --build ${{github.workspace}}/build -j $(nproc)
5061
5162
- name: Fuzz long test
5263
working-directory: ${{github.workspace}}/build
5364
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-long" --verbose
65+
66+
- name: Get information about platform
67+
if: ${{ always() }}
68+
run: .github/scripts/get_system_info.sh

0 commit comments

Comments
 (0)