Skip to content

Commit 00eabf3

Browse files
committed
[UR] Offload build
1 parent ba7e8d5 commit 00eabf3

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: UR - Build offload adapter
2+
3+
permissions: read-all
4+
5+
on: [ workflow_call, workflow_dispatch ]
6+
7+
jobs:
8+
offload_build:
9+
name: Build
10+
# run only on upstream; forks won't have the HW
11+
if: github.repository == 'intel/llvm'
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
build_type: [Release]
16+
compiler: [{c: gcc, cxx: g++}]
17+
18+
runs-on: "ubuntu-24.04"
19+
container:
20+
image: 'ghcr.io/intel/llvm/ubuntu2404_base'
21+
22+
steps:
23+
- name: Install liboffload
24+
run: >
25+
sudo curl -sSL https://apt.llvm.org/llvm-snapshot.gpg.key -o /etc/apt/trusted.gpg.d/apt.llvm.org.asc;
26+
sudo add-apt-repository -y 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble main';
27+
28+
- name: Configure Unified Runtime project
29+
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
30+
run: >
31+
cmake
32+
-S unified-runtime
33+
-B build
34+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
35+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
36+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
37+
-DUR_ENABLE_TRACING=ON
38+
-DUR_DEVELOPER_MODE=ON
39+
-DUR_BUILD_TESTS=OFF
40+
-DUR_BUILD_ADAPTER_OFFLOAD=ON
41+
-DCMAKE_INSTALL_PREFIX=./install
42+
43+
- name: Build
44+
# This is so that device binaries can find the sycl runtime library
45+
run: cmake --build build -j $(nproc)
46+
47+
- name: Install
48+
# This is to check that install command does not fail
49+
run: cmake --install build
50+
51+
- name: Get information about platform
52+
if: ${{ always() }}
53+
run: ./unified-runtime/.github/scripts/get_system_info.sh

.github/workflows/ur-precommit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ jobs:
9898
docker_image: ${{ matrix.docker_image || 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'}}
9999
image_options: ${{ matrix.image_options || '' }}
100100

101+
offload_build:
102+
name: Offload Build
103+
#needs: [detect_changes, source_checks]
104+
needs: [detect_changes]
105+
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
106+
uses: ./.github/workflows/ur-build-offload.yml
107+
101108
macos:
102109
name: MacOS build only
103110
needs: [detect_changes, source_checks]

0 commit comments

Comments
 (0)