Skip to content

Commit bea4783

Browse files
authoredMar 20, 2025··
ci: aarch64: Initial nightly performance test (#2837)
1 parent 70a6801 commit bea4783

16 files changed

+508
-54
lines changed
 

‎.github/automation/aarch64/ci.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"dependencies": {
33
"acl": "v25.02",
44
"gcc": "13",
5-
"clang": "17"
5+
"clang": "17",
6+
"onednn-base": "v3.7"
67
}
7-
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#! /bin/bash
2+
3+
# *******************************************************************************
4+
# Copyright 2025 Arm Limited and affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
# *******************************************************************************
19+
20+
# Usage: bash bench_nightly_performance.sh {baseline_benchdnn_executable} {benchdnn_executable} {baseline_results_file} {new_results_file}
21+
22+
IFS=$'\n' # Prevents shuffling from using spaces as delimiters
23+
24+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
25+
26+
TESTS=(
27+
"$1 --matmul --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/matmul_nightly >> $3"
28+
"$2 --matmul --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/matmul_nightly >> $4"
29+
"$1 --conv --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/conv_nightly >> $3"
30+
"$2 --conv --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/conv_nightly >> $4"
31+
"$1 --eltwise --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/eltwise_nightly >> $3"
32+
"$2 --eltwise --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/eltwise_nightly >> $4"
33+
"$1 --reorder --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/reorder_nightly >> $3"
34+
"$2 --reorder --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/reorder_nightly >> $4"
35+
)
36+
37+
N=5
38+
39+
for i in $( seq $N )
40+
do
41+
echo "Testing loop ${i} / ${N}..."
42+
43+
TESTS=( $(shuf -e "${TESTS[@]}") )
44+
45+
for test in "${TESTS[@]}"
46+
do
47+
echo "Starting ${test}"
48+
SECONDS=0
49+
eval $test
50+
duration=$SECONDS
51+
echo "Completed in $((duration / 60)):$((duration % 60))"
52+
done
53+
done

‎.github/automation/performance/bench_performance.sh

-32
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#! /bin/bash
2+
3+
# *******************************************************************************
4+
# Copyright 2025 Arm Limited and affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
# *******************************************************************************
19+
20+
# Usage: bash bench_pr_performance.sh {baseline_benchdnn_executable} {benchdnn_executable} {baseline_results_file} {new_results_file}
21+
22+
IFS=$'\n' # Prevents shuffling from using spaces as delimiters
23+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
24+
25+
TESTS=(
26+
"$1 --matmul --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/matmul >> $3"
27+
"$2 --matmul --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/matmul >> $4"
28+
"$1 --conv --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/conv >> $3"
29+
"$2 --conv --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/conv >> $4"
30+
"$1 --eltwise --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/eltwise >> $3"
31+
"$2 --eltwise --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/eltwise >> $4"
32+
"$1 --reorder --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/reorder >> $3"
33+
"$2 --reorder --mode=P --perf-template=%prb%,%-time% --batch=${SCRIPT_DIR}/inputs/reorder >> $4"
34+
)
35+
36+
N=5
37+
38+
for i in $( seq $N )
39+
do
40+
echo "Testing loop ${i} / ${N}..."
41+
42+
TESTS=( $(shuf -e "${TESTS[@]}") )
43+
44+
for test in "${TESTS[@]}"
45+
do
46+
echo "Starting ${test}"
47+
SECONDS=0
48+
eval $test
49+
duration=$SECONDS
50+
echo "Completed in $((duration / 60)):$((duration % 60))"
51+
done
52+
done

‎.github/automation/performance/benchdnn_comparison.py

+24-11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import os
2222
from collections import defaultdict
2323
from scipy.stats import ttest_ind
24+
import warnings
25+
import statistics
2426

2527

2628
def compare_two_benchdnn(file1, file2, tolerance=0.05):
@@ -38,9 +40,9 @@ def compare_two_benchdnn(file1, file2, tolerance=0.05):
3840
r2 = [x.split(",") for x in r2 if x[0:8] == "--mode=P"]
3941

4042
if (len(r1) == 0) or (len(r2) == 0):
41-
raise Exception("One or both of the test results have zero lines")
43+
warnings.warn("One or both of the test results have zero lines")
4244
if len(r1) != len(r2):
43-
raise Exception("The number of benchdnn runs do not match")
45+
warnings.warn("The number of benchdnn runs do not match")
4446

4547
r1_samples = defaultdict(list)
4648
r2_samples = defaultdict(list)
@@ -50,26 +52,37 @@ def compare_two_benchdnn(file1, file2, tolerance=0.05):
5052
for k, v in r2:
5153
r2_samples[k].append(float(v[:-1]))
5254

53-
passed = True
5455
failed_tests = []
56+
times = {}
5557
for prb, r1_times in r1_samples.items():
5658
if prb not in r2_samples:
57-
raise Exception(f"{prb} exists in {file1} but not {file2}")
59+
warnings.warn(f"{prb} exists in {file1} but not {file2}")
60+
continue
61+
5862
r2_times = r2_samples[prb]
5963

6064
res = ttest_ind(r2_times, r1_times, alternative='greater')
61-
62-
if res.pvalue < 0.05:
63-
failed_tests.append(prb)
65+
r1_med = statistics.median(r1_times)
66+
r2_med = statistics.median(r2_times)
67+
times[prb] = (r1_med, r2_med)
68+
times_str = f" {times[prb][0]} vs {times[prb][1]}"
69+
70+
# pass the test if:
71+
# the t-test passes (i.e. pvalue > 0.05) OR
72+
# both the median time and min time has not
73+
# slowed down by more than 10%
74+
passed = res.pvalue > 0.05 or \
75+
((r2_med - r1_med) / r1_med < 0.1 and \
76+
(min(r2_times) - min(r1_times)) / min(r1_times) < 0.1)
77+
if not passed:
78+
failed_tests.append(prb + times_str)
6479
passed = False
6580

66-
print(prb + (" passed" if passed else " failed"))
67-
6881
if "GITHUB_OUTPUT" in os.environ:
6982
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
70-
print(f"pass={passed}", file=f)
83+
print(f"pass={not failed_tests}", file=f)
7184

72-
if passed:
85+
if not failed_tests:
7386
print("Regression tests passed")
7487
else:
7588
message = "\n----The following regression tests failed:----\n" + \

‎.github/automation/performance/inputs/conv

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
# limitations under the License.
1616
# *******************************************************************************
1717

18-
# From Resnet
1918
--reset
2019
--dir=FWD_D
21-
--dt=bf16,f32
20+
--dt=f32
21+
mb1_ic64oc256_ih200oh200kh1sh1dh0ph0_iw267ow267kw1sw1dw0pw0
22+
23+
--reset
24+
--dir=FWD_D
25+
--dt=f32
26+
--attr-fpmath=bf16
2227
mb1_ic64oc256_ih200oh200kh1sh1dh0ph0_iw267ow267kw1sw1dw0pw0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# *******************************************************************************
2+
# Copyright 2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
--reset
18+
--batch=conv
19+
20+
--reset
21+
--dt=f32
22+
--alg=auto
23+
--dir=FWD_D,FWD_B
24+
--attr-fpmath=,bf16
25+
--batch=shapes_resnet_50

‎.github/automation/performance/inputs/eltwise

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
--inplace=true
1919
--alg=gelu_erf
2020
--dir=FWD_D
21-
--dt=bf16
21+
--dt=f32,bf16
2222
--tag=abc
23-
1x1x1536
23+
1536x384
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# *******************************************************************************
2+
# Copyright 2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
18+
--reset
19+
--batch=eltwise
20+
21+
--reset
22+
23+
--dt=f32
24+
--tag=abx,axb
25+
--dir=FWD_D
26+
--attr-post-ops=,
27+
28+
## algs which do not support alpha and beta + relu with alpha=0
29+
--alpha=0 --beta=0
30+
--alg=exp,exp_dst,gelu_erf,gelu_tanh,relu_dst,tanh,tanh_dst
31+
384x384
32+
33+
## algs which support negative alpha
34+
--alpha=-2 --beta=0
35+
--alg=elu,relu,swish
36+
384x384
37+
38+
## algs which support alpha and beta
39+
--alpha=-2 --beta=3
40+
--alg=linear
41+
384x384

‎.github/automation/performance/inputs/matmul

+10-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@
1717
--reset
1818
--stag=ab
1919
--wtag=any
20+
--dtag=ab
2021
--attr-post-ops=sum
22+
--dt=f32
23+
1500x1536:1536x384
24+
25+
--reset
26+
--stag=ab
27+
--wtag=any
2128
--dtag=ab
22-
--dt=f32,bf16
29+
--attr-post-ops=sum
30+
--attr-fpmath=bf16
31+
--dt=f32
2332
1500x1536:1536x384
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# *******************************************************************************
2+
# Copyright 2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
--reset
18+
--batch=matmul
19+
20+
# Plain cases
21+
--reset
22+
--dt=f32,s8:s8:f32
23+
--bia-dt=f32,undef
24+
--bia_mask=2
25+
--batch=shapes_2d_ci
26+
--bia_mask=4
27+
--batch=shapes_3d
28+
29+
--dt=f32
30+
--bia-dt=f32,undef
31+
--bia_mask=2
32+
--attr-fpmath=bf16
33+
--batch=shapes_2d_ci
34+
--bia_mask=4
35+
--batch=shapes_3d
36+
37+
#f16
38+
--dt=f16:f16:f16
39+
--bia-dt=undef
40+
--bia_mask=2
41+
--batch=shapes_2d_ci
42+
--bia_mask=4
43+
--batch=shapes_3d
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# *******************************************************************************
2+
# Copyright 2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
18+
--reset
19+
--sdt=f32
20+
--ddt=f32
21+
--allow-enum-tags-only=0
22+
--stag=ba
23+
--dtag=Ab4a,Ab8a
24+
384x384
25+
26+
--reset
27+
--sdt=f32
28+
--ddt=bf16
29+
--allow-enum-tags-only=0
30+
--stag=ba
31+
--dtag=BA8b4a,BA4b4a
32+
384x384
33+
34+
--reset
35+
--sdt=bf16
36+
--ddt=f32
37+
--allow-enum-tags-only=0
38+
--stag=BA8b4a,BA4b4a
39+
384x384
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# *******************************************************************************
2+
# Copyright 2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
18+
--reset
19+
--batch=reorder
20+
21+
--reset
22+
--sdt=f32,s8
23+
--ddt=f32,s8
24+
25+
--stag=abx,axb,aBx4b,aBx8b
26+
--dtag=abx,axb,aBx4b,aBx8b
27+
4x256x5x5

‎.github/workflows/ci-aarch64.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125

126126
- name: Install scipy
127127
if: ${{ matrix.config.build == 'Release' }}
128-
run: pip install scipy
128+
run: pip install scipy statistics
129129

130130
- name: Clone ACL
131131
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build_acl.sh
@@ -211,16 +211,20 @@ jobs:
211211
shell: bash
212212
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' }}
213213
run: |
214-
OMP_NUM_THREADS=4 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_performance.sh ${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN/build/tests/benchdnn/benchdnn base.txt new.txt
215-
OMP_NUM_THREADS=16 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_performance.sh ${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN/build/tests/benchdnn/benchdnn base.txt new.txt
214+
OMP_NUM_THREADS=4 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_pr_performance.sh ${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN/build/tests/benchdnn/benchdnn base_4.txt new_4.txt
215+
OMP_NUM_THREADS=16 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_pr_performance.sh ${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN/build/tests/benchdnn/benchdnn base_16.txt new_16.txt
216216
env:
217217
DYLD_LIBRARY_PATH: ${{ github.workspace }}/ComputeLibrary/build
218218

219219
- name: Compare performance test results
220220
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' }}
221221
id: performance-test
222222
continue-on-error: true
223-
run: python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base.txt new.txt
223+
run: |
224+
echo "4 threads:"
225+
python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base_4.txt new_4.txt
226+
echo "16 threads:"
227+
python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base_16.txt new_16.txt
224228
225229
- name: Check performance test failure
226230
if: ${{ steps.performance-test.outputs.pass != 'True' && github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' }}

‎.github/workflows/nightly-aarch64.yml

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
build-acl-cache:
3939
uses: ./.github/workflows/aarch64-acl.yml
4040

41+
test-performance:
42+
uses: ./.github/workflows/performance-aarch64.yml
43+
4144
build-and-test:
4245
needs: build-acl-cache
4346
strategy:
+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# *******************************************************************************
2+
# Copyright 2024-2025 Arm Limited and affiliates.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
# *******************************************************************************
17+
18+
name: "Performance AArch64"
19+
20+
on:
21+
workflow_call:
22+
23+
#* Stop stale workflows
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}-performance
26+
cancel-in-progress: true
27+
28+
# Declare default permissions as read only.
29+
permissions: read-all
30+
31+
jobs:
32+
build-acl-cache:
33+
uses: ./.github/workflows/aarch64-acl.yml
34+
35+
build-and-test-performance:
36+
needs: build-acl-cache
37+
strategy:
38+
matrix:
39+
config: [
40+
{ name: c7g, label: ah-ubuntu_22_04-c7g_m-100, threading: OMP, toolset: gcc, build: Release, testset: NIGHTLY }
41+
]
42+
43+
name: ${{ matrix.config.name }}, ${{ matrix.config.toolset }}, ${{ matrix.config.threading }}, ${{ matrix.config.build }}
44+
runs-on: ${{ matrix.config.label }}
45+
steps:
46+
47+
- name: Checkout oneDNN
48+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
with:
50+
path: oneDNN
51+
52+
# Note: This will create a github actions cache
53+
- name: Get latest CMake and Ninja
54+
uses: lukka/get-cmake@5f6e04f5267c8133f1273bf2103583fc72c46b17 # v3.31.5
55+
with:
56+
cmakeVersion: 3.31.0
57+
ninjaVersion: 1.12.0
58+
59+
- if: ${{ matrix.config.threading == 'OMP' }}
60+
name: Install openmp
61+
run: |
62+
sudo apt install -y libomp-dev
63+
64+
- name: Read version file
65+
id: get-versions
66+
run: |
67+
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
68+
content="${content//[$'\t\r\n$ ']}"
69+
echo "output=$content" >> $GITHUB_OUTPUT
70+
71+
- name: Install gcc
72+
run: |
73+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
74+
sudo apt update -y
75+
sudo apt install -y g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
76+
77+
- name: setup python
78+
uses: actions/setup-python@v4
79+
with:
80+
python-version: '3.10'
81+
82+
- name: Install scipy
83+
if: ${{ matrix.config.build == 'Release' }}
84+
run: pip install scipy statistics
85+
86+
- name: Clone ACL
87+
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build_acl.sh
88+
env:
89+
ACL_ACTION: clone
90+
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
91+
ACL_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.acl }}
92+
93+
- name: Get ACL commit hash for cache key
94+
id: get_acl_commit_hash
95+
run: (cd ${{ github.workspace }}/ComputeLibrary && echo "ACLCommitHash=$(git rev-parse --short HEAD)") >> $GITHUB_OUTPUT
96+
97+
- name: Get system name
98+
id: get_system_name
99+
run: (echo "SystemName=$(uname)") >> $GITHUB_OUTPUT
100+
101+
- name: Restore cached ACL
102+
id: cache-acl-restore
103+
uses: actions/cache/restore@v4
104+
with:
105+
key: ${{ steps.get_system_name.outputs.SystemName }}-acl-${{ matrix.config.toolset }}-${{ matrix.config.build }}-${{ steps.get_acl_commit_hash.outputs.ACLCommitHash }}
106+
path: ${{ github.workspace }}/ComputeLibrary/build
107+
108+
- name: Configure oneDNN
109+
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
110+
working-directory: ${{ github.workspace }}/oneDNN
111+
env:
112+
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
113+
BUILD_TOOLSET: ${{ matrix.config.toolset }}
114+
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
115+
CMAKE_GENERATOR: Ninja
116+
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
117+
ONEDNN_ACTION: configure
118+
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
119+
ONEDNN_THREADING: ${{ matrix.config.threading }}
120+
121+
- name: Build oneDNN
122+
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
123+
working-directory: ${{ github.workspace }}/oneDNN
124+
env:
125+
ONEDNN_ACTION: build
126+
127+
- name: Checkout oneDNN base
128+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
129+
with:
130+
ref: ${{ fromJson(steps.get-versions.outputs.output).dependencies.onednn-base }}
131+
path: oneDNN_base
132+
133+
- name: Configure oneDNN base
134+
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
135+
working-directory: ${{ github.workspace }}/oneDNN_base
136+
env:
137+
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
138+
BUILD_TOOLSET: ${{ matrix.config.toolset }}
139+
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
140+
CMAKE_GENERATOR: Ninja
141+
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
142+
ONEDNN_ACTION: configure
143+
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
144+
ONEDNN_THREADING: ${{ matrix.config.threading }}
145+
146+
- name: Build oneDNN base
147+
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
148+
working-directory: ${{ github.workspace }}/oneDNN_base
149+
env:
150+
ONEDNN_ACTION: build
151+
152+
- name: Run performance tests
153+
shell: bash
154+
run: |
155+
OMP_NUM_THREADS=16 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_nightly_performance.sh ${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN/build/tests/benchdnn/benchdnn base.txt new.txt
156+
env:
157+
DYLD_LIBRARY_PATH: ${{ github.workspace }}/ComputeLibrary/build
158+
159+
- name: Compare 16 threads performance test results
160+
run: |
161+
python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base.txt new.txt
162+
163+
#* This job adds a check named "Nightly Performance AArch64" that represents overall
164+
#* workflow status and can be used in branch rulesets
165+
status:
166+
needs: build-and-test-performance
167+
runs-on: ubuntu-latest
168+
name: "Nightly Performance AArch64"
169+
steps:
170+
- name: Print success
171+
run: echo Success

0 commit comments

Comments
 (0)
Please sign in to comment.