Skip to content

DO NOT MERGE: Offload compute benchmarks testing #18989

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

Draft
wants to merge 1 commit into
base: sycl
Choose a base branch
from
Draft
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
100 changes: 100 additions & 0 deletions .github/workflows/ur-compute-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: UR - Compute Benchmarks

permissions: read-all

# TODO: Pull request only for testing
on: [ workflow_dispatch, pull_request ]
jobs:
offload_build:
name: Compute Benchmarks with Offload Adapter
strategy:
fail-fast: false
matrix:
build_type: [Release]
compiler: [{c: gcc, cxx: g++}]

runs-on: [ UR_CUDA ]
container:
image: 'ghcr.io/intel/llvm/ubuntu2404_base'

steps:
- name: Checkout LLVM
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: dpcpp

- name: Checkout benchmark scripts
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: intel/llvm
ref: sycl
path: sc
sparse-checkout: |
devops/scripts/Benchmarks

- name: Install Python requirements in venv
run: |
python -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
pip install -r sc/devops/scripts/benchmarks/requirements.txt

- name: Install liboffload
run: sudo apt-get update -qq && sudo apt-get install --no-install-recommends -yqq liboffload-21 liboffload-21-dev

- name: Configure UR
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
run: >
cmake
-S dpcpp/unified-runtime
-B ${{github.workspace}}/ur_build
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DUR_BUILD_TESTS=OFF
-DUR_BUILD_ADAPTER_OFFLOAD=ON
-DUR_OFFLOAD_INSTALL_DIR="/usr/lib/llvm-21"
-DUR_OFFLOAD_INCLUDE_DIR="/usr/lib/llvm-21/include"
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/ur_install

- name: Build UR
# This is so that device binaries can find the sycl runtime library
run: cmake --install ur_build -j $(nproc)

- name: Configure SYCL
run: >
python3 dpcpp/buildbot/configure.py
-t ${{matrix.build_type}}
-o ${{github.workspace}}/sycl_build
--cmake-gen "Ninja" ${{matrix.adapter.sycl_config}}
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
--cmake-opt="-DSYCL_PI_TESTS=OFF"
--cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache
--cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build SYCL
run: cmake --install ${{github.workspace}}/sycl_build -j

- name: Compute core range
run: |
# Compute the core range for the first NUMA node; second node is for UMF jobs.
# Skip the first 4 cores - the kernel is likely to schedule more work on these.
CORES=$(lscpu | awk '
/NUMA node0 CPU|On-line CPU/ {line=$0}
END {
split(line, a, " ")
split(a[4], b, ",")
sub(/^0/, "4", b[1])
print b[1]
}')
echo "Selected core: $CORES"
echo "CORES=$CORES" >> $GITHUB_ENV

ZE_AFFINITY_MASK=0
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV

- name: Get information about platform
if: ${{ always() }}
run: dpcpp/unified-runtime/.github/scripts/get_system_info.sh
3 changes: 1 addition & 2 deletions .github/workflows/ur-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
# https://github.com/intel/llvm/settings/actions for security.
pull_request:
branches:
- sycl
- sycl-rel-**
- todoremovethiswhenreadytomerge
# Do not run builds if changes are only in the following locations
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
Expand Down
Loading