Skip to content

Commit

Permalink
Run fuzztests on L0 HW in CI
Browse files Browse the repository at this point in the history
instead of running fuzztests in CI on the null adapter.
  • Loading branch information
PatKamin authored and kbenzie committed Jul 3, 2024
1 parent fcd0fe5 commit e802057
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ jobs:
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"

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

runs-on: 'ubuntu-22.04'
runs-on: 'FUZZTESTS'

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

- name: Download DPC++
run: |
sudo apt install libncurses5
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
- name: Setup DPC++
run: |
source ${{github.workspace}}/dpcpp_compiler/startup.sh
- name: Build level zero
run: |
git clone -b v1.16.1 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
cd ${{github.workspace}}/level-zero
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
cmake --build build -j $(nproc)
- name: Configure CMake
run: >
cmake
Expand All @@ -152,14 +159,22 @@ jobs:
-DUR_BUILD_TESTS=ON
-DUR_USE_ASAN=ON
-DUR_USE_UBSAN=ON
-DUR_BUILD_ADAPTER_L0=ON
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)

- name: Fuzz test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short" --verbose

- name: Get information about platform
if: ${{ always() }}
run: .github/scripts/get_system_info.sh

level-zero:
name: Level Zero
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ permissions:
contents: read

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

runs-on: 'ubuntu-22.04'
runs-on: 'FUZZTESTS'

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -30,6 +31,13 @@ jobs:
mkdir dpcpp_compiler
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
- name: Build level zero
run: |
git clone -b v1.16.1 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
cd ${{github.workspace}}/level-zero
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
cmake --build build -j $(nproc)
- name: Configure CMake
run: >
cmake
Expand All @@ -41,13 +49,20 @@ jobs:
-DUR_BUILD_TESTS=ON
-DUR_USE_ASAN=ON
-DUR_USE_UBSAN=ON
-DUR_BUILD_ADAPTER_L0=ON
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
-DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib
- name: Build
run: >
LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
run: |
cmake --build ${{github.workspace}}/build -j $(nproc)
- name: Fuzz long test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-long" --verbose

- name: Get information about platform
if: ${{ always() }}
run: .github/scripts/get_system_info.sh

0 comments on commit e802057

Please sign in to comment.