Skip to content

[CI] UR workflow update #17064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions .github/workflows/ur-build-hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,16 @@ jobs:
runs-on: ${{inputs.runner_name}}

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

- name: Checkout UR
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: 'oneapi-src/unified-runtime'
path: unified-runtime
ref: main

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

Expand All @@ -115,7 +104,7 @@ jobs:
mkdir dpcpp_compiler
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler

- name: Configure CMake
- name: Configure Unified Runtime project
working-directory: ${{github.workspace}}/unified-runtime
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
run: >
Expand Down
41 changes: 7 additions & 34 deletions .github/workflows/ur-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,19 @@ permissions: read-all

jobs:
detect_changes:
name: Detect Changes
uses: ./.github/workflows/sycl-detect-changes.yml

# TODO: If UR is merged into llvm it will require changes:
# - 'detect_changes' should be required for all UR jobs
# - 'if' condition should be used, for all UR jobs, to check if UR is affected
# (see example test_job's if)
# - test_job should be removed
#
test_job:
# this is a temporary test job, to show how the 'if' should be used for all UR jobs
name: UR test job
needs: [detect_changes]
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
runs-on: ubuntu-latest

steps:
- name: Check if UR is affected
run: |
echo "UR affected"
echo 'Filters set: ${{needs.detect_changes.outputs.filters}}'

source_checks:
name: Source Checks
needs: [detect_changes]
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
uses: ./.github/workflows/ur-source-checks.yml

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

macos:
name: MacOS build only
needs: [source_checks]
needs: [detect_changes, source_checks]
if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }}
strategy:
matrix:
os: ['macos-13']
runs-on: ${{matrix.os}}

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

- name: Checkout UR
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: 'oneapi-src/unified-runtime'
path: unified-runtime
ref: main
fetch-depth: 1

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.9
Expand All @@ -125,7 +98,7 @@ jobs:
- name: Install hwloc
run: brew install hwloc

- name: Configure CMake
- name: Configure Unified Runtime project
working-directory: ${{github.workspace}}/unified-runtime
run: >
cmake
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/ur-source-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,17 @@ jobs:
runs-on: ${{matrix.os}}

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

- name: Checkout UR
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: 'oneapi-src/unified-runtime'
path: unified-runtime
ref: main

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.9

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

Expand Down Expand Up @@ -62,7 +53,7 @@ jobs:
if: matrix.os == 'windows-2022'
run: vcpkg install hwloc:x64-windows

- name: Configure CMake
- name: Configure Unified Runtime project
working-directory: ${{github.workspace}}/unified-runtime
env:
VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows"
Expand Down
18 changes: 18 additions & 0 deletions unified-runtime/.github/scripts/install_hwloc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# install_hwloc.sh - Script for building and installing HWLOC library from source code

set -e

git clone -b hwloc-2.3.0 https://github.com/open-mpi/hwloc.git
pushd hwloc
./autogen.sh
./configure
make -j$(nproc)
sudo make install -j$(nproc)
popd
Loading