Skip to content

Commit 7cc5b39

Browse files
author
Hugh Delaney
committed
Merge branch 'main' into async-alloc
2 parents 92ffce5 + 39df031 commit 7cc5b39

File tree

458 files changed

+27741
-10390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+27741
-10390
lines changed

.github/codeql/codeql-config.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/docker/install_dpcpp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ if [ "${SKIP_DPCPP_BUILD}" ]; then
1616
fi
1717

1818
mkdir -p ${DPCPP_PATH}/dpcpp_compiler
19-
wget -O ${DPCPP_PATH}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-09-27/sycl_linux.tar.gz
19+
wget -O ${DPCPP_PATH}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
2020
tar -xvf ${DPCPP_PATH}/dpcpp_compiler.tar.gz -C ${DPCPP_PATH}/dpcpp_compiler

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ loader:
3131
opencl:
3232
- changed-files:
3333
- any-glob-to-any-file:
34-
- source/adapter/opencl/**
34+
- source/adapters/opencl/**
3535

3636
level-zero:
3737
- changed-files:

.github/scripts/0001-travis-fix-travisci_build_coverity_scan.sh.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Compute Benchmarks Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs at midnight UTC every day
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
nightly:
13+
name: Compute Benchmarks Nightly level-zero
14+
uses: ./.github/workflows/benchmarks-reusable.yml
15+
with:
16+
str_name: 'level_zero'
17+
unit: 'gpu'
18+
pr_no: 0
19+
bench_script_params: '--save baseline'
20+
sycl_config_params: ''
21+
sycl_repo: 'intel/llvm'
22+
sycl_commit: ''
23+
24+
nightly2:
25+
# we need to wait until previous job is done so that the html report
26+
# contains both runs
27+
needs: nightly
28+
name: Compute Benchmarks Nightly level-zero v2
29+
uses: ./.github/workflows/benchmarks-reusable.yml
30+
with:
31+
str_name: 'level_zero_v2'
32+
unit: 'gpu'
33+
pr_no: 0
34+
bench_script_params: '--save baseline-v2'
35+
sycl_config_params: ''
36+
sycl_repo: 'intel/llvm'
37+
sycl_commit: ''
38+
upload_report: true

.github/workflows/benchmarks_compute.yml renamed to .github/workflows/benchmarks-reusable.yml

Lines changed: 71 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,39 @@
1-
name: Compute Benchmarks
1+
name: Benchmarks Reusable
22

33
on:
4-
# Can be triggered via manual "dispatch" (from workflow view in GitHub Actions tab)
5-
workflow_dispatch:
6-
# acceptable input for adapter-specific runs
4+
workflow_call:
75
inputs:
86
str_name:
9-
description: Formatted adapter name
10-
type: choice
117
required: true
12-
default: 'level_zero'
13-
options:
14-
- level_zero
15-
- level_zero_v2
8+
type: string
169
unit:
17-
description: Test unit (cpu/gpu)
18-
type: choice
1910
required: true
20-
default: 'gpu'
21-
options:
22-
- cpu
23-
- gpu
11+
type: string
2412
pr_no:
25-
description: PR number (if 0, it'll run on the main)
26-
type: number
2713
required: true
28-
bench_script_params:
29-
description: Parameters passed to script executing benchmark
14+
# even though this is a number, this is a workaround for issues with
15+
# reusable workflow calls that result in "Unexpected value '0'" error.
3016
type: string
17+
bench_script_params:
3118
required: false
19+
type: string
3220
default: ''
3321
sycl_config_params:
34-
description: Extra params for SYCL configuration
35-
type: string
3622
required: false
23+
type: string
3724
default: ''
3825
sycl_repo:
39-
description: 'Compiler repo'
40-
type: string
4126
required: true
27+
type: string
4228
default: 'intel/llvm'
4329
sycl_commit:
44-
description: 'Compiler commit'
45-
type: string
4630
required: false
31+
type: string
4732
default: ''
33+
upload_report:
34+
required: false
35+
type: boolean
36+
default: false
4837

4938
permissions:
5039
contents: read
@@ -56,19 +45,17 @@ jobs:
5645
strategy:
5746
matrix:
5847
adapter: [
59-
{str_name: "${{inputs.str_name}}",
60-
sycl_config: "${{inputs.sycl_config_params}}",
61-
unit: "${{inputs.unit}}"
48+
{str_name: "${{ inputs.str_name }}",
49+
sycl_config: "${{ inputs.sycl_config_params }}",
50+
unit: "${{ inputs.unit }}"
6251
}
6352
]
6453
build_type: [Release]
6554
compiler: [{c: clang, cxx: clang++}]
6655

67-
runs-on: "${{inputs.str_name}}_PERF"
56+
runs-on: "${{ inputs.str_name }}_PERF"
6857

6958
steps:
70-
# Workspace on self-hosted runners is not cleaned automatically.
71-
# We have to delete the files created outside of using actions.
7259
- name: Cleanup self-hosted workspace
7360
if: always()
7461
run: |
@@ -99,7 +86,8 @@ jobs:
9986
path: ur-repo
10087

10188
- name: Install pip packages
102-
run: pip install -r ${{github.workspace}}/ur-repo/third_party/requirements.txt
89+
run: |
90+
pip install --force-reinstall -r ${{github.workspace}}/ur-repo/third_party/benchmark_requirements.txt
10391
10492
# We need to fetch special ref for proper PR's merge commit. Note, this ref may be absent if the PR is already merged.
10593
- name: Fetch PR's merge commit
@@ -168,14 +156,51 @@ jobs:
168156
- name: Install UR
169157
run: cmake --install ${{github.workspace}}/ur_build
170158

159+
- name: Checkout UMF
160+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
161+
with:
162+
repository: oneapi-src/unified-memory-framework
163+
ref: main
164+
path: umf-repo
165+
fetch-depth: 1
166+
fetch-tags: false
167+
168+
- name: Configure UMF
169+
run: >
170+
cmake -DCMAKE_BUILD_TYPE=Release
171+
-S${{github.workspace}}/umf-repo
172+
-B${{github.workspace}}/umf_build
173+
-DUMF_BUILD_BENCHMARKS=ON
174+
-DUMF_TESTS_FAIL_ON_SKIP=ON
175+
176+
- name: Build UMF
177+
run: cmake --build ${{github.workspace}}/umf_build -j $(nproc)
178+
179+
- name: Compute core range
180+
run: |
181+
# Compute the core range for the first NUMA node, skipping the first 4 cores.
182+
# This is to avoid the first cores that the kernel is likely to schedule more work on.
183+
CORES=$(lscpu | awk '
184+
/NUMA node0 CPU|On-line CPU/ {line=$0}
185+
END {
186+
split(line, a, " ")
187+
split(a[4], b, ",")
188+
sub(/^0/, "4", b[1])
189+
print b[1]
190+
}')
191+
echo "CORES=$CORES" >> $GITHUB_ENV
192+
171193
- name: Run benchmarks
194+
working-directory: ${{ github.workspace }}/ur-repo/
172195
id: benchmarks
173196
run: >
174-
numactl -N 0 ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
175-
~/bench_workdir
176-
${{github.workspace}}/sycl_build
177-
${{github.workspace}}/ur_install
178-
${{ matrix.adapter.str_name }}
197+
taskset -c ${{ env.CORES }} ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
198+
~/bench_workdir
199+
--sycl ${{ github.workspace }}/sycl_build
200+
--ur ${{ github.workspace }}/ur_install
201+
--umf ${{ github.workspace }}/umf_build
202+
--adapter ${{ matrix.adapter.str_name }}
203+
${{ inputs.upload_report && '--output-html' || '' }}
179204
${{ inputs.bench_script_params }}
180205
181206
- name: Add comment to PR
@@ -186,7 +211,7 @@ jobs:
186211
let markdown = ""
187212
try {
188213
const fs = require('fs');
189-
markdown = fs.readFileSync('benchmark_results.md', 'utf8');
214+
markdown = fs.readFileSync('ur-repo/benchmark_results.md', 'utf8');
190215
} catch(err) {
191216
}
192217
@@ -204,3 +229,10 @@ jobs:
204229
repo: context.repo.repo,
205230
body: body
206231
})
232+
233+
- name: Upload HTML report
234+
if: ${{ always() && inputs.upload_report }}
235+
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
236+
with:
237+
path: ur-repo/benchmark_results.html
238+
key: benchmark-results-${{ matrix.adapter.str_name }}-${{ github.run_id }}

.github/workflows/benchmarks.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Compute Benchmarks
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
str_name:
7+
description: Formatted adapter name
8+
type: choice
9+
required: true
10+
default: 'level_zero'
11+
options:
12+
- level_zero
13+
- level_zero_v2
14+
unit:
15+
description: Test unit (cpu/gpu)
16+
type: choice
17+
required: true
18+
default: 'gpu'
19+
options:
20+
- cpu
21+
- gpu
22+
pr_no:
23+
description: PR number (if 0, it'll run on the main)
24+
type: number
25+
required: true
26+
bench_script_params:
27+
description: Parameters passed to script executing benchmark
28+
type: string
29+
required: false
30+
default: ''
31+
sycl_config_params:
32+
description: Extra params for SYCL configuration
33+
type: string
34+
required: false
35+
default: ''
36+
sycl_repo:
37+
description: 'Compiler repo'
38+
type: string
39+
required: true
40+
default: 'intel/llvm'
41+
sycl_commit:
42+
description: 'Compiler commit'
43+
type: string
44+
required: false
45+
default: ''
46+
upload_report:
47+
description: 'Upload HTML report'
48+
type: boolean
49+
required: false
50+
default: false
51+
52+
permissions:
53+
contents: read
54+
pull-requests: write
55+
56+
jobs:
57+
manual:
58+
name: Compute Benchmarks
59+
uses: ./.github/workflows/benchmarks-reusable.yml
60+
with:
61+
str_name: ${{ inputs.str_name }}
62+
unit: ${{ inputs.unit }}
63+
pr_no: ${{ inputs.pr_no }}
64+
bench_script_params: ${{ inputs.bench_script_params }}
65+
sycl_config_params: ${{ inputs.sycl_config_params }}
66+
sycl_repo: ${{ inputs.sycl_repo }}
67+
sycl_commit: ${{ inputs.sycl_commit }}
68+
upload_report: ${{ inputs.upload_report }}

.github/workflows/build-fuzz-reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535

3636
- name: Download DPC++
3737
run: |
38-
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz
38+
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
3939
mkdir dpcpp_compiler
4040
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
4141
4242
- name: Build level zero with gcc
4343
run: |
44-
git clone -b v1.17.6 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
44+
git clone -b v1.18.5 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
4545
cd ${{github.workspace}}/level-zero
4646
cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
4747
cmake --build build -j $(nproc)

0 commit comments

Comments
 (0)