-
Notifications
You must be signed in to change notification settings - Fork 823
152 lines (136 loc) · 5.71 KB
/
ur-precommit.yml
File metadata and controls
152 lines (136 loc) · 5.71 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Unified Runtime Pre Commit
# Note: this is the very first version of UR workflow.
# It was pretty much copy-pasted from UR repository.
# Over time it will be most likely integrated more into existing workflows.
# Note: the trigger is copy-pasted from sycl-linux-precommit.yml - probably to be fine-tuned.
on:
# We rely on "Fork pull request workflows from outside collaborators" -
# "Require approval for all outside collaborators" at
# https://github.com/intel/llvm/settings/actions for security.
pull_request:
branches:
- sycl
- sycl-rel-**
# Do not run builds if changes are only in the following locations
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- 'sycl/doc/**'
- 'sycl/gdb/**'
- 'clang/docs/**'
- '**.md'
- '**.rst'
- '.github/workflows/sycl-windows-*.yml'
- '.github/workflows/sycl-macos-*.yml'
- '.github/workflows/sycl-nightly.yml'
- '.github/workflows/sycl-rel-nightly.yml'
- 'devops/containers/**'
- 'devops/actions/build_container/**'
concurrency:
# Cancel a currently running workflow from the same PR, branch or tag.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
detect_changes:
name: Detect Changes
uses: ./.github/workflows/sycl-detect-changes.yml
source_checks:
name: Source Checks
needs: [detect_changes]
if: ${{ !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
uses: ./.github/workflows/ur-source-checks.yml
adapters:
name: Adapters
needs: [detect_changes, source_checks]
if: ${{ !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
strategy:
fail-fast: false
matrix:
# Extra native CPU jobs are here to force the loader to be used.
# UR will not use the loader if there is only one target.
include:
- name: L0
runner: UR_L0
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
- name: L0_V2
runner: UR_L0
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
- name: L0
runner: UR_L0
static: ON
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
- name: L0
runner: UR_L0
other_adapter: NATIVE_CPU
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
# 13.1
- name: CUDA
runner: cuda13
docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers_cuda131:latest"
image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all
# 12.6.3
- name: CUDA
runner: UR_CUDA
image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all
- name: OPENCL
runner: UR_OPENCL
docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN
- name: OPENCL
runner: UR_OPENCL
other_adapter: NATIVE_CPU
docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN
- name: NATIVE_CPU
runner: UR_NATIVE_CPU
docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
uses: ./.github/workflows/ur-build-hw.yml
with:
adapter_name: ${{ matrix.name }}
runner_name: ${{ matrix.runner }}
static_loader: ${{ matrix.static || 'OFF' }}
static_adapter: ${{ matrix.static || 'OFF' }}
other_adapter_name: ${{ matrix.other_adapter || '' }}
docker_image: ${{ matrix.docker_image || 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest'}}
image_options: ${{ matrix.image_options || '' }}
install_igc_driver: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
offload_build:
name: Adapters (Offload)
needs: [detect_changes, source_checks]
if: ${{ !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_offload_adapter') }}
uses: ./.github/workflows/ur-build-offload.yml
macos:
name: MacOS build only
needs: [detect_changes, source_checks]
if: ${{ !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
strategy:
matrix:
os: ['macos-latest']
runs-on: ${{matrix.os}}
steps:
- name: Checkout LLVM
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.1.0
with:
python-version: "3.10"
- name: Install prerequisites
working-directory: ${{github.workspace}}/unified-runtime
run: |
python3 -m pip install -r third_party/requirements.txt
python3 -m pip install -r third_party/requirements_testing.txt
- name: Install hwloc
run: brew install hwloc
- name: Configure Unified Runtime project
working-directory: ${{github.workspace}}/unified-runtime
run: >
cmake
-B${{github.workspace}}/build
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DCMAKE_BUILD_TYPE=Release
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)