-
Notifications
You must be signed in to change notification settings - Fork 823
69 lines (57 loc) · 2.12 KB
/
ur-build-offload.yml
File metadata and controls
69 lines (57 loc) · 2.12 KB
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
name: UR - Build offload adapter
permissions: read-all
# Pre-container disk check: use ACTIONS_RUNNER_HOOK_JOB_STARTED on self-hosted
# runners — see devops/scripts/gha_runner_job_started_hook.sh
on: [ workflow_call, workflow_dispatch ]
jobs:
offload_build:
name: Build
strategy:
fail-fast: false
matrix:
build_type: [Release]
compiler: [{c: gcc, cxx: g++}]
runs-on: [ "Linux", "build" ]
container:
image: 'ghcr.io/intel/llvm/ubuntu2404_build'
steps:
- name: Checkout LLVM-project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: llvm/llvm-project
persist-credentials: false
path: llvm-project
- name: Checkout LLVM
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: llvm
persist-credentials: false
- name: Configure llvm-project
run: >
cmake -S llvm-project/llvm -B llvm-project/build -G Ninja
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DLLVM_TARGETS_TO_BUILD='host;SPIRV;NVPTX'
-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;lldb;lld'
-DLLVM_ENABLE_RUNTIMES='offload;openmp;libc'
-DLIBOMPTARGET_PLUGINS_TO_BUILD="level_zero;cuda"
-DLLVM_PARALLEL_LINK_JOBS=20
-DLLVM_BUILD_TESTS=ON
-DLLVM_INCLUDE_TESTS=on
'-DLLVM_LIT_ARGS=-v -vv'
-DCMAKE_INSTALL_PREFIX=./llvm-project-install
- name: Build and install llvm-project
run: ninja -C llvm-project/build -j $(($(nproc)/3)) install
- name: Configure intel/llvm
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
run: >
python3 llvm/buildbot/configure.py
--offload
--cuda
-t ${{matrix.build_type}}
--liboffload-path=./llvm-project-install
- name: Build intel/llvm
# This is so that device binaries can find the sycl runtime library
run: python3 llvm/buildbot/compile.py
- name: Debug CI platform information
if: ${{ always() }}
run: ./llvm/devops/scripts/get_system_info.sh