Skip to content

New bench runner #1082

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 4 commits into from
Feb 7, 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
46 changes: 25 additions & 21 deletions .github/scripts/get_system_info.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand All @@ -26,32 +26,32 @@ function system_info {
cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*"
cat /proc/version

# echo "**********SYCL-LS**********"
# source /opt/intel/oneapi/setvars.sh
# sycl-ls
echo "**********SYCL-LS**********"
source /opt/intel/oneapi/setvars.sh
sycl-ls

echo "**********numactl topology**********"
numactl -H

echo "**********VGA info**********"
lspci | grep -i VGA

# echo "**********CUDA Version**********"
# if command -v nvidia-smi &> /dev/null; then
# nvidia-smi
# else
# echo "CUDA not installed"
# fi
echo "**********CUDA Version**********"
if command -v nvidia-smi &> /dev/null; then
nvidia-smi
else
echo "CUDA not installed"
fi

echo "**********L0 Version**********"
check_L0_version

# echo "**********ROCm Version**********"
# if command -v rocminfo &> /dev/null; then
# rocminfo
# else
# echo "ROCm not installed"
# fi
echo "**********ROCm Version**********"
if command -v rocminfo &> /dev/null; then
rocminfo
else
echo "ROCm not installed"
fi

echo "******OpenCL*******"
# The driver version of OpenCL Graphics is the compute-runtime version
Expand All @@ -67,11 +67,15 @@ function system_info {
cat /proc/meminfo

echo "**********env variables**********"
echo "PATH=${PATH}"
echo "CPATH=${CPATH}"
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
echo "LIBRARY_PATH=${LIBRARY_PATH}"
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
echo "PATH=$PATH"
echo
echo "CPATH=$CPATH"
echo
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo
echo "LIBRARY_PATH=$LIBRARY_PATH"
echo
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo

echo "******build tools versions*******"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: GitHubPages
on:
push:
branches: ["main"]
workflow_dispatch:

# Cancel previous in-progress workflow, only the latest run is relevant
concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Various non-standard tests, requiring e.g. longer run
name: Nightly

# This job is run at 00:00 UTC every day or on demand.
# This job is run at 04:00 UTC every day or on demand.
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
- cron: '0 4 * * *'

permissions:
contents: read
Expand Down
57 changes: 39 additions & 18 deletions .github/workflows/reusable_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Executes benchmarks implemented in this repository
# using scripts for benchmark results visualisation,
# using scripts for benchmark results visualization,
# which are downloaded from Unified Runtime repository.
name: Benchmarks

Expand Down Expand Up @@ -31,10 +31,9 @@ env:
jobs:
benchmarks:
name: Benchmarks
strategy:
matrix:
os: ['ubuntu-latest']
runs-on: ${{matrix.os}}
# run only on upstream; forks will not have the HW
if: github.repository == 'oneapi-src/unified-memory-framework'
runs-on: L0_PERF

steps:
# Workspace on self-hosted runners is not cleaned automatically.
Expand Down Expand Up @@ -79,12 +78,7 @@ jobs:
git checkout origin/pr/${PR_NO}/merge
git rev-parse origin/pr/${PR_NO}/merge

- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev

- name: Configure build
- name: Configure UMF
run: >
cmake
-S ${{env.UMF_DIR}}
Expand All @@ -94,19 +88,19 @@ jobs:
-DUMF_BUILD_BENCHMARKS=ON
-DUMF_BUILD_BENCHMARKS_MT=ON
-DUMF_BUILD_TESTS=OFF
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_BUILD_EXAMPLES=OFF
-DUMF_DEVELOPER_MODE=OFF
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
-DUMF_BUILD_CUDA_PROVIDER=ON
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_BUILD_EXAMPLES=OFF

- name: Build UMF
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)

# We are going to clone Unified Runtime repository in order to run
# the most up-to-date UR scripts for benchmark data visualisation
# the most up-to-date UR scripts for benchmark data visualization
- name: Checkout UR
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -119,16 +113,38 @@ jobs:
run: |
pip install --force-reinstall -r ${{github.workspace}}/ur-repo/third_party/benchmark_requirements.txt

- name: Run dedicated for UMF benchmarking scripts from UR
- name: Set core range and GPU mask
run: |
# Compute the core range for the second NUMA node; first node is for UR jobs.
# Skip the first 4 cores - the kernel is likely to schedule more work on these.
CORES=$(lscpu | awk '
/NUMA node1 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=1
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV

- name: Run UMF benchmarks (using scripts from UR)
id: benchmarks
working-directory: ${{env.BUILD_DIR}}
run: >
${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
~/bench_workdir
--umf ${{env.BUILD_DIR}}
taskset -c ${{ env.CORES }} ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
~/bench_workdir_umf
--umf ${{env.BUILD_DIR}}
${{ inputs.upload_report && '--output-html' || '' }}
${{ inputs.bench_script_params }}

- name: Print benchmark results
if: ${{ always() }}
run: cat ${{env.BUILD_DIR}}/benchmark_results.md

- name: Add comment to PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ always() && inputs.pr_no != 0 }}
Expand Down Expand Up @@ -161,3 +177,8 @@ jobs:
with:
path: umf-repo/build/benchmark_results.html
key: benchmark-results-${{ github.run_id }}

- name: Get information about platform
if: ${{ always() }}
working-directory: ${{env.UMF_DIR}}
run: .github/scripts/get_system_info.sh
Loading