Skip to content

Commit 436dbcb

Browse files
committed
Offload Compute Benchmarks job
1 parent 517761d commit 436dbcb

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: UR - Compute Benchmarks
2+
3+
permissions: read-all
4+
5+
# TODO: Pull request only for testing
6+
on: [ workflow_dispatch, pull_request ]
7+
jobs:
8+
offload_build:
9+
name: Build
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
build_type: [Release]
14+
compiler: [{c: gcc, cxx: g++}]
15+
16+
runs-on: [ "ubuntu-latest" ]
17+
container:
18+
image: 'ghcr.io/intel/llvm/ubuntu2404_base'
19+
20+
steps:
21+
- name: Checkout LLVM
22+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23+
with:
24+
path: dpcpp
25+
26+
- name: Checkout benchmark scripts
27+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
with:
29+
repository: intel/llvm
30+
ref: sycl
31+
path: sc
32+
sparse-checkout: |
33+
devops/scripts/benchmarks
34+
35+
- name: Install liboffload
36+
run: sudo apt-get update -qq && sudo apt-get install --no-install-recommends -yqq liboffload-21 liboffload-21-dev
37+
38+
- name: Configure UR
39+
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
40+
run: >
41+
cmake
42+
-S dpcpp/unified-runtime
43+
-B ${{github.workspace}}/ur_build
44+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
45+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
46+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
47+
-DUR_ENABLE_TRACING=ON
48+
-DUR_DEVELOPER_MODE=ON
49+
-DUR_BUILD_TESTS=OFF
50+
-DUR_BUILD_ADAPTER_OFFLOAD=ON
51+
-DUR_OFFLOAD_INSTALL_DIR="/usr/lib/llvm-21"
52+
-DUR_OFFLOAD_INCLUDE_DIR="/usr/lib/llvm-21/include"
53+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/ur_install
54+
55+
- name: Build UR
56+
# This is so that device binaries can find the sycl runtime library
57+
run: cmake --install ur_build -j $(nproc)
58+
59+
- name: Configure SYCL
60+
run: >
61+
python3 dpcpp/buildbot/configure.py
62+
-t ${{matrix.build_type}}
63+
-o ${{github.workspace}}/sycl_build
64+
--cmake-gen "Ninja" ${{matrix.adapter.sycl_config}}
65+
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
66+
--cmake-opt="-DSYCL_PI_TESTS=OFF"
67+
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
68+
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
69+
70+
- name: Build SYCL
71+
run: cmake --install ${{github.workspace}}/sycl_build -j
72+
73+
- name: Get information about platform
74+
if: ${{ always() }}
75+
run: dpcpp/unified-runtime/.github/scripts/get_system_info.sh

0 commit comments

Comments
 (0)