1
1
# Executes benchmarks implemented in this repository
2
- # using scripts for benchmark results visualisation ,
2
+ # using scripts for benchmark results visualization ,
3
3
# which are downloaded from Unified Runtime repository.
4
4
name : Benchmarks
5
5
31
31
jobs :
32
32
benchmarks :
33
33
name : Benchmarks
34
- strategy :
35
- matrix :
36
- os : ['ubuntu-latest']
37
- runs-on : ${{matrix.os}}
34
+ # run only on upstream; forks will not have the HW
35
+ if : github.repository == 'oneapi-src/unified-memory-framework'
36
+ runs-on : L0_PERF
38
37
39
38
steps :
40
39
# Workspace on self-hosted runners is not cleaned automatically.
79
78
git checkout origin/pr/${PR_NO}/merge
80
79
git rev-parse origin/pr/${PR_NO}/merge
81
80
82
- - name : Install apt packages
83
- run : |
84
- sudo apt-get update
85
- sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev
86
-
87
- - name : Configure build
81
+ - name : Configure UMF
88
82
run : >
89
83
cmake
90
84
-S ${{env.UMF_DIR}}
@@ -94,19 +88,19 @@ jobs:
94
88
-DUMF_BUILD_BENCHMARKS=ON
95
89
-DUMF_BUILD_BENCHMARKS_MT=ON
96
90
-DUMF_BUILD_TESTS=OFF
97
- -DUMF_FORMAT_CODE_STYLE =OFF
91
+ -DUMF_BUILD_EXAMPLES =OFF
98
92
-DUMF_DEVELOPER_MODE=OFF
93
+ -DUMF_FORMAT_CODE_STYLE=OFF
99
94
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
100
95
-DUMF_BUILD_CUDA_PROVIDER=ON
101
96
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
102
97
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
103
- -DUMF_BUILD_EXAMPLES=OFF
104
98
105
99
- name : Build UMF
106
100
run : cmake --build ${{env.BUILD_DIR}} -j $(nproc)
107
101
108
102
# We are going to clone Unified Runtime repository in order to run
109
- # the most up-to-date UR scripts for benchmark data visualisation
103
+ # the most up-to-date UR scripts for benchmark data visualization
110
104
- name : Checkout UR
111
105
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
112
106
with :
@@ -119,16 +113,38 @@ jobs:
119
113
run : |
120
114
pip install --force-reinstall -r ${{github.workspace}}/ur-repo/third_party/benchmark_requirements.txt
121
115
122
- - name : Run dedicated for UMF benchmarking scripts from UR
116
+ - name : Set core range and GPU mask
117
+ run : |
118
+ # Compute the core range for the second NUMA node; first node is for UR jobs.
119
+ # Skip the first 4 cores - the kernel is likely to schedule more work on these.
120
+ CORES=$(lscpu | awk '
121
+ /NUMA node1 CPU|On-line CPU/ {line=$0}
122
+ END {
123
+ split(line, a, " ")
124
+ split(a[4], b, ",")
125
+ sub(/^0/, "4", b[1])
126
+ print b[1]
127
+ }')
128
+ echo "Selected core: $CORES"
129
+ echo "CORES=$CORES" >> $GITHUB_ENV
130
+
131
+ ZE_AFFINITY_MASK=1
132
+ echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
133
+
134
+ - name : Run UMF benchmarks (using scripts from UR)
123
135
id : benchmarks
124
136
working-directory : ${{env.BUILD_DIR}}
125
137
run : >
126
- ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
127
- ~/bench_workdir
128
- --umf ${{env.BUILD_DIR}}
138
+ taskset -c ${{ env.CORES }} ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
139
+ ~/bench_workdir_umf
140
+ --umf ${{env.BUILD_DIR}}
129
141
${{ inputs.upload_report && '--output-html' || '' }}
130
142
${{ inputs.bench_script_params }}
131
143
144
+ - name : Print benchmark results
145
+ if : ${{ always() }}
146
+ run : cat ${{env.BUILD_DIR}}/benchmark_results.md
147
+
132
148
- name : Add comment to PR
133
149
uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
134
150
if : ${{ always() && inputs.pr_no != 0 }}
@@ -161,3 +177,8 @@ jobs:
161
177
with :
162
178
path : umf-repo/build/benchmark_results.html
163
179
key : benchmark-results-${{ github.run_id }}
180
+
181
+ - name : Get information about platform
182
+ if : ${{ always() }}
183
+ working-directory : ${{env.UMF_DIR}}
184
+ run : .github/scripts/get_system_info.sh
0 commit comments