Skip to content

Commit e8c3507

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into cb_events2
Signed-off-by: Mateusz P. Nowak <[email protected]>
2 parents 7e84479 + fd3466a commit e8c3507

File tree

88 files changed

+1656
-248
lines changed

Some content is hidden

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

88 files changed

+1656
-248
lines changed

.github/workflows/sycl-coverity.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Coverity
22
on:
33
workflow_dispatch:
4+
inputs:
5+
description:
6+
description: 'Custom build description'
7+
required: true
8+
type: string
9+
default: 'Out-of-order Coverity scan'
10+
ref:
11+
description: 'Git ref to checkout and scan'
12+
required: true
13+
type: string
14+
default: 'sycl'
15+
416
schedule:
517
- cron: '0 0 * * 0'
618

@@ -27,7 +39,7 @@ jobs:
2739
- uses: ./devops/actions/cached_checkout
2840
with:
2941
path: src
30-
ref: ${{ github.sha }}
42+
ref: ${{ inputs.ref || github.sha }}
3143
cache_path: "/__w/repo_cache/"
3244

3345
- name: Get coverity tool
@@ -56,10 +68,15 @@ jobs:
5668

5769
- name: Submit build
5870
run: |
71+
default_description="${{ inputs.description }}"
72+
if [[ -z $default_description ]]; then
73+
default_description="Regular build"
74+
fi
75+
5976
# Initialize a build. Fetch a cloud upload url.
6077
curl -X POST \
61-
-d version="sycl: ${{ github.sha }}" \
62-
-d description="Regular build" \
78+
-d version="${{ inputs.ref || github.sha }}" \
79+
-d description="$default_description" \
6380
-d email=${{ secrets.COVERITY_EMAIL }} \
6481
-d token=${{ secrets.COVERITY_TOKEN }} \
6582
-d file_name="intel_llvm.tgz" \

.github/workflows/sycl-linux-precommit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ on:
2323
- '.github/workflows/sycl-nightly.yml'
2424
- '.github/workflows/sycl-rel-nightly.yml'
2525
- '.github/workflows/sycl-rel-nightly-launch.yml'
26-
- '.github/workflows/trivy.yml'
26+
- '.github/workflows/sycl-trivy.yml'
27+
- '.github/workflows/sycl-coverity.yml'
2728
- 'devops/containers/**'
2829
- 'devops/actions/build_container/**'
2930
- 'unified-runtime/examples/**'
@@ -241,6 +242,7 @@ jobs:
241242
benchmark_upload_results: false
242243
benchmark_preset: 'Minimal'
243244
benchmark_dry_run: true
245+
benchmark_exit_on_failure: true
244246
repo_ref: ${{ github.sha }}
245247
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
246248
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ on:
140140
type: string
141141
default: 'false'
142142
required: False
143+
benchmark_exit_on_failure:
144+
description: |
145+
Whether or not to fail the workflow upon a failure.
146+
type: string
147+
default: 'false'
148+
required: False
143149

144150
workflow_dispatch:
145151
inputs:
@@ -211,6 +217,12 @@ on:
211217
- "build-only"
212218
- "run-only"
213219

220+
benchmark_exit_on_failure:
221+
type: choice
222+
options:
223+
- "true"
224+
- "false"
225+
214226
permissions:
215227
contents: read
216228
packages: read
@@ -358,6 +370,7 @@ jobs:
358370
save_name: ${{ inputs.benchmark_save_name }}
359371
preset: ${{ inputs.benchmark_preset }}
360372
dry_run: ${{ inputs.benchmark_dry_run }}
373+
exit_on_failure: ${{ inputs.benchmark_exit_on_failure }}
361374
build_ref: ${{ inputs.repo_ref }}
362375
env:
363376
RUNNER_TAG: ${{ inputs.runner }}
File renamed without changes.

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ on:
4141
description: |
4242
Upload results to https://intel.github.io/llvm/benchmarks/.
4343
required: true
44+
exit_on_failure:
45+
type: string # true/false: workflow_dispatch does not support booleans
46+
description: |
47+
Fail benchmark script on any error. Limit number of iterations to just test correctness.
48+
required: false
49+
default: 'false'
4450
runner:
4551
type: string
4652
required: true
@@ -90,6 +96,13 @@ on:
9096
- false
9197
- true
9298
default: true
99+
exit_on_failure:
100+
description: Fail benchmark script on any error. Limit number of iterations to just test correctness.
101+
type: choice
102+
options:
103+
- false
104+
- true
105+
default: false
93106
runner:
94107
description: Self-hosted runner to use for the benchmarks
95108
type: choice
@@ -193,6 +206,7 @@ jobs:
193206
benchmark_upload_results: ${{ inputs.upload_results }}
194207
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
195208
benchmark_preset: ${{ inputs.preset }}
209+
benchmark_exit_on_failure: ${{ inputs.exit_on_failure }}
196210
repo_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
197211
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
198212
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}

.github/workflows/sycl-windows-precommit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ on:
2222
- '.github/workflows/sycl-nightly.yml'
2323
- '.github/workflows/sycl-rel-nightly.yml'
2424
- '.github/workflows/sycl-rel-nightly-launch.yml'
25-
- '.github/workflows/trivy.yml'
25+
- '.github/workflows/sycl-trivy.yml'
26+
- '.github/workflows/sycl-coverity.yml'
2627
- 'devops/containers/**'
2728
- 'devops/actions/build_container/**'
2829
- 'devops/compat_ci_exclude.sycl-rel-6_2'

devops/actions/run-tests/benchmark/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
dry_run:
3333
type: string
3434
required: False
35+
exit_on_failure:
36+
type: string
37+
required: False
3538

3639
runs:
3740
using: "composite"
@@ -192,8 +195,10 @@ runs:
192195
sycl-ls
193196
echo "-----"
194197

195-
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py \
196-
"$(realpath ./llvm_test_workdir)" \
198+
WORKDIR="$(realpath ./llvm_test_workdir)"
199+
if [ -n "$WORKDIR" ] && [ -d "$WORKDIR" ] && [[ "$WORKDIR" == *llvm_test_workdir* ]]; then rm -rf "$WORKDIR" ; fi
200+
201+
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py "$WORKDIR" \
197202
--sycl "$(realpath ./toolchain)" \
198203
--ur "$(realpath ./ur/install)" \
199204
--adapter "$FORCELOAD_ADAPTER" \
@@ -204,7 +209,8 @@ runs:
204209
--preset "$PRESET" \
205210
--timestamp-override "$SAVE_TIMESTAMP" \
206211
--detect-version sycl,compute_runtime \
207-
--flamegraph inclusive
212+
${{ inputs.exit_on_failure == 'true' && '--exit-on-failure --iterations 1' || '' }}
213+
# TODO: add back: "--flamegraph inclusive" once works properly
208214

209215
echo "-----"
210216
python3 ./devops/scripts/benchmarks/compare.py to_hist \

devops/dependencies.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2020
},
2121
"level_zero": {
22-
"github_tag": "v1.25.1",
23-
"version": "v1.25.1",
24-
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.25.1",
22+
"github_tag": "v1.25.0",
23+
"version": "1.25.0",
24+
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.25.0",
2525
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2626
},
2727
"tbb": {

devops/scripts/benchmarks/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ using the built compiler located in `~/llvm/build/` and
3636
installed Unified Runtime in directory `~/ur_install`,
3737
and then **run** the benchmarks for `adapter_name` adapter.
3838

39+
The scripts will try to reuse the files stored in `~/benchmarks_workdir/`.
40+
If any dependant projects binaries are already built, they will not be rebuilt
41+
again if their tags match tags specified by benchmarks source code.
42+
3943
>NOTE: By default `level_zero` adapter is used.
4044
4145
>NOTE: Pay attention to the `--ur` parameter. It points directly to the directory where UR is installed.
@@ -48,10 +52,6 @@ $ cmake --build ~/ur_build -j $(nproc)
4852
$ cmake --install ~/ur_build
4953
```
5054

51-
### Rebuild
52-
The scripts will try to reuse the files stored in `~/benchmarks_workdir/`, but the benchmarks will be rebuilt every time.
53-
To avoid that, use `--no-rebuild` option.
54-
5555
## Results
5656

5757
By default, the benchmark results are not stored.

devops/scripts/benchmarks/benches/benchdnn.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ def setup(self) -> None:
6666
self.git_tag(),
6767
Path(options.workdir),
6868
"onednn",
69-
force_rebuild=True,
69+
use_installdir=False,
7070
)
7171

72+
if not self.project.needs_rebuild():
73+
log.info(f"Rebuilding {self.project.name} skipped")
74+
return
75+
7276
extra_cmake_args = [
7377
f"-DCMAKE_PREFIX_PATH={options.sycl}",
7478
"-DCMAKE_CXX_COMPILER=clang++",
@@ -80,7 +84,6 @@ def setup(self) -> None:
8084
]
8185
self.project.configure(
8286
extra_cmake_args,
83-
install_prefix=False,
8487
add_sycl=True,
8588
)
8689
self.project.build(

0 commit comments

Comments
 (0)