From cdb73d6a5cc2063c34e7388720c9765e8a90cd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Feb 2025 20:18:38 +0100 Subject: [PATCH 1/4] [CI] Add manual dispatch for docs generation This might be useful if we want to push new benchmarks report, e.g. from a PR --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 165cc1754f..0918a36997 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,6 +4,7 @@ name: GitHubPages on: push: branches: ["main"] + workflow_dispatch: # Cancel previous in-progress workflow, only the latest run is relevant concurrency: From 4c21ebc105f91665e965140fc76b006fb074f042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Feb 2025 20:19:52 +0100 Subject: [PATCH 2/4] [CI] Run nigthly at 4am, to avoid conflicts with UR's perf job --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c24312b870..f90a6e7bbb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 From 81c0c3c45cd242c386cb83b6abd304bdeafbccda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Feb 2025 20:26:05 +0100 Subject: [PATCH 3/4] [CI] Update get_system_info script to include more info, e.g., for testing CUDA provider; More info is based on what is set in UR workflows. --- .github/scripts/get_system_info.sh | 46 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/scripts/get_system_info.sh b/.github/scripts/get_system_info.sh index 595d5e31ae..be900e2a73 100755 --- a/.github/scripts/get_system_info.sh +++ b/.github/scripts/get_system_info.sh @@ -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 @@ -26,9 +26,9 @@ 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 @@ -36,22 +36,22 @@ function system_info { 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 @@ -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*******" From 3f76e9355f14350400183779e1e2f4f1bbd008d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Feb 2025 20:37:09 +0100 Subject: [PATCH 4/4] [CI] Update benchmark's workflow to use self-hosted runner --- .github/workflows/reusable_benchmarks.yml | 57 ++++++++++++++++------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/.github/workflows/reusable_benchmarks.yml b/.github/workflows/reusable_benchmarks.yml index 8edca90e14..b33fdb25e2 100644 --- a/.github/workflows/reusable_benchmarks.yml +++ b/.github/workflows/reusable_benchmarks.yml @@ -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 @@ -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. @@ -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}} @@ -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: @@ -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 }} @@ -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