Skip to content

Commit 0f7fca9

Browse files
[CI] UR workflow update (#17064)
First part of changes in UR workflow, after moving its content here. Use detect-changes to only enable UR jobs if UR is affected, plus use the new location of ur project (local instead of clonging UR repo).
1 parent 9f50e24 commit 0f7fca9

File tree

4 files changed

+32
-61
lines changed

4 files changed

+32
-61
lines changed

.github/workflows/ur-build-hw.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,16 @@ jobs:
8585
runs-on: ${{inputs.runner_name}}
8686

8787
steps:
88-
# TODO: If UR is merged into llvm it will require changes:
89-
# - checkout only llvm repo
90-
# - configure UR project from local tree
88+
# TODO:
9189
# - investigate if DUR_CONFORMANCE_AMD_ARCH could be removed
9290
# - find better way to handle platform param (e.g. "Intel(R) OpenCL" -> "opencl")
9391
# - switch to Ninja generator in CMake
94-
#
95-
# Also, the step of downloading DPC++ should be integrated somehow;
96-
# most likely use nightly release.
92+
# - downloading DPC++ should be integrated somehow; most likely use nightly release.
9793
#
9894
- name: Checkout LLVM
9995
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
10096

101-
- name: Checkout UR
102-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
103-
with:
104-
repository: 'oneapi-src/unified-runtime'
105-
path: unified-runtime
106-
ref: main
107-
108-
- name: Install pip packages
97+
- name: Install UR python dependencies
10998
working-directory: ${{github.workspace}}/unified-runtime
11099
run: pip install -r third_party/requirements.txt
111100

@@ -115,7 +104,7 @@ jobs:
115104
mkdir dpcpp_compiler
116105
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
117106
118-
- name: Configure CMake
107+
- name: Configure Unified Runtime project
119108
working-directory: ${{github.workspace}}/unified-runtime
120109
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
121110
run: >

.github/workflows/ur-precommit.yml

+7-34
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,19 @@ permissions: read-all
3737

3838
jobs:
3939
detect_changes:
40+
name: Detect Changes
4041
uses: ./.github/workflows/sycl-detect-changes.yml
4142

42-
# TODO: If UR is merged into llvm it will require changes:
43-
# - 'detect_changes' should be required for all UR jobs
44-
# - 'if' condition should be used, for all UR jobs, to check if UR is affected
45-
# (see example test_job's if)
46-
# - test_job should be removed
47-
#
48-
test_job:
49-
# this is a temporary test job, to show how the 'if' should be used for all UR jobs
50-
name: UR test job
51-
needs: [detect_changes]
52-
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
53-
runs-on: ubuntu-latest
54-
55-
steps:
56-
- name: Check if UR is affected
57-
run: |
58-
echo "UR affected"
59-
echo 'Filters set: ${{needs.detect_changes.outputs.filters}}'
60-
6143
source_checks:
6244
name: Source Checks
6345
needs: [detect_changes]
46+
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
6447
uses: ./.github/workflows/ur-source-checks.yml
6548

6649
adapters:
6750
name: Adapters
68-
needs: [source_checks]
51+
needs: [detect_changes, source_checks]
52+
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
6953
strategy:
7054
matrix:
7155
# Extra native CPU jobs are here to force the loader to be used.
@@ -92,28 +76,17 @@ jobs:
9276

9377
macos:
9478
name: MacOS build only
95-
needs: [source_checks]
79+
needs: [detect_changes, source_checks]
80+
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
9681
strategy:
9782
matrix:
9883
os: ['macos-13']
9984
runs-on: ${{matrix.os}}
10085

10186
steps:
102-
# TODO: If UR is merged into llvm it will require changes:
103-
# - checkout only llvm repo
104-
# - configure UR project from local tree
105-
#
10687
- name: Checkout LLVM
10788
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
10889

109-
- name: Checkout UR
110-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
111-
with:
112-
repository: 'oneapi-src/unified-runtime'
113-
path: unified-runtime
114-
ref: main
115-
fetch-depth: 1
116-
11790
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
11891
with:
11992
python-version: 3.9
@@ -125,7 +98,7 @@ jobs:
12598
- name: Install hwloc
12699
run: brew install hwloc
127100

128-
- name: Configure CMake
101+
- name: Configure Unified Runtime project
129102
working-directory: ${{github.workspace}}/unified-runtime
130103
run: >
131104
cmake

.github/workflows/ur-source-checks.yml

+3-12
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,17 @@ jobs:
1515
runs-on: ${{matrix.os}}
1616

1717
steps:
18-
# TODO: If UR is merged into llvm it will require changes:
19-
# - checkout only llvm repo
20-
# - configure UR project from local tree
18+
# TODO:
2119
# - split into separate jobs for each OS
2220
#
2321
- name: Checkout LLVM
2422
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2523

26-
- name: Checkout UR
27-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28-
with:
29-
repository: 'oneapi-src/unified-runtime'
30-
path: unified-runtime
31-
ref: main
32-
3324
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
3425
with:
3526
python-version: 3.9
3627

37-
- name: Install pip packages
28+
- name: Install UR python dependencies
3829
working-directory: ${{github.workspace}}/unified-runtime
3930
run: pip install -r third_party/requirements.txt
4031

@@ -62,7 +53,7 @@ jobs:
6253
if: matrix.os == 'windows-2022'
6354
run: vcpkg install hwloc:x64-windows
6455

65-
- name: Configure CMake
56+
- name: Configure Unified Runtime project
6657
working-directory: ${{github.workspace}}/unified-runtime
6758
env:
6859
VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2024 Intel Corporation
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
8+
# install_hwloc.sh - Script for building and installing HWLOC library from source code
9+
10+
set -e
11+
12+
git clone -b hwloc-2.3.0 https://github.com/open-mpi/hwloc.git
13+
pushd hwloc
14+
./autogen.sh
15+
./configure
16+
make -j$(nproc)
17+
sudo make install -j$(nproc)
18+
popd

0 commit comments

Comments
 (0)