ci: aarch64: build oneDNN in a composite action and add c8g runners

This commit is contained in:
Ryo Suzuki
2025-10-02 18:01:21 +00:00
parent f9079a4003
commit 8d145d6648
7 changed files with 492 additions and 238 deletions

View File

@ -20,27 +20,27 @@ description: "Build and cache ACL"
inputs:
onednn_path:
description: oneDNN repository path. Default ./oneDNN
description: oneDNN repository path. Default ./oneDNN.
default: ./oneDNN
required: false
acl_path:
description: ACL repository path. Default ./ComputeLibrary
description: ACL repository path. Default ./ComputeLibrary.
default: ./ComputeLibrary
required: false
toolset:
description: compiler to use. gcc or clang
description: Compiler to use. gcc or clang.
required: true
build:
description: build type. Release, RelWithAssert or Debug
description: Build type. Release, RelWithAssert or Debug.
required: true
threading:
description: threading type. OMP or Sequential
description: Threading type. OMP or Sequential.
required: true
acl_hash:
description: acl hash to build
description: ACL hash to build.
required: true
gcc_version:
description: gcc Version
description: GCC Version.
required: true
# Cache is built sequentially to avoid cache-hit race conditions

View File

@ -0,0 +1,178 @@
# *******************************************************************************
# Copyright 2025 Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# *******************************************************************************
name: "Build oneDNN AArch64"
description: "Build oneDNN"
inputs:
artifact_name:
required: false
description: Name of the artifact to upload to. Leave empty to not upload an artifact.
threading:
required: true
description: OMP or SEQ.
toolset:
required: true
description: gcc or clang
build:
required: true
description: Cmake build type. Release, RelWithAssert or Debug.
testset:
required: true
description: SMOKE, CI or NIGHTLY.
onednn_hash:
required: false
description: oneDNN commit to check out.
acl_hash:
required: false
description: ACL hash to checkout.
cache:
required: false
description: Whether to cache the built oneDNN or not.
runs:
using: 'composite'
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Read version file
shell: bash
id: get-versions
run: |
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: Get system name
id: get_system_name
shell: bash
run: (echo "SystemName=$(uname)") >> $GITHUB_OUTPUT
# Note: This will create a github actions cache
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@56d043d188c3612951d8755da8f4b709ec951ad6 # v3.31.6
with:
cmakeVersion: 3.31.0
ninjaVersion: 1.12.0
- if: ${{ (steps.get_system_name.outputs.SystemName == 'Linux') && (inputs.threading == 'OMP') }}
name: Install openmp
shell: bash
run: sudo apt install -y libomp-dev
- if: ${{ (steps.get_system_name.outputs.SystemName == 'Linux') && (inputs.toolset == 'gcc') }}
name: Install gcc
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- if: ${{ (steps.get_system_name.outputs.SystemName == 'Linux') && (inputs.toolset == 'clang') }}
name: Install clang
uses: KyleMayes/install-llvm-action@98e68e10c96dffcb7bfed8b2144541a66b49aa02 # v2.0.8
with:
version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.clang }}
- name: Build ComputeLibrary
uses: ./oneDNN/.github/actions/build-acl-aarch64
with:
toolset: ${{ inputs.toolset }}
build: ${{ inputs.build }}
threading: ${{ inputs.threading }}
acl_hash: ${{ inputs.acl_hash || fromJson(steps.get-versions.outputs.output).dependencies.acl }}
gcc_version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: Setup Package
shell: bash
run: |
mkdir -p oneDNN_pkg/oneDNN
mv ComputeLibrary oneDNN_pkg
ls oneDNN_pkg
- name: Checkout oneDNN to build
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN_build
fetch-depth: 0
- name: Checkout specified oneDNN
if: ${{ inputs.onednn_hash != '' }}
working-directory: oneDNN_build
shell: bash
run: git checkout ${{ inputs.onednn_hash }}
- name: Get oneDNN commit hash for cache key
id: get_oneDNN_commit_hash
shell: bash
run: (cd oneDNN_build && echo "oneDNNCommitHash=$(git rev-parse --short HEAD)") >> $GITHUB_OUTPUT
- name: Restore cached oneDNN
id: cache-onednn-restore
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: ${{ steps.get_system_name.outputs.SystemName }}-acl-${{ inputs.acl_hash || fromJson(steps.get-versions.outputs.output).dependencies.acl }}-onednn-${{ steps.get_onednn_commit_hash.outputs.oneDNNCommitHash }}-${{ inputs.toolset }}-${{ inputs.build }}
path: ${{ github.workspace }}/oneDNN_pkg
- name: Configure oneDNN
if: ${{ steps.cache-onednn-restore.outputs.cache-hit != 'true'}}
shell: bash
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_build
env:
ACL_ROOT_DIR: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary
BUILD_TOOLSET: ${{ inputs.toolset }}
CMAKE_BUILD_TYPE: ${{ inputs.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ inputs.testset }}
ONEDNN_THREADING: ${{ inputs.threading }}
- name: Build oneDNN
if: ${{ steps.cache-onednn-restore.outputs.cache-hit != 'true'}}
shell: bash
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_build
env:
ONEDNN_ACTION: build
ACL_ROOT_DIR: oneDNN_pkg/ComputeLibrary
- name: Package oneDNN & ComputeLibrary
if: ${{ steps.cache-onednn-restore.outputs.cache-hit != 'true'}}
shell: bash
run: mv oneDNN_build/build oneDNN_pkg/oneDNN/build
- name: Cache oneDNN
if: ${{ inputs.cache == 'true' && steps.cache-onednn-restore.outputs.cache-hit != 'true' }}
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: ${{ steps.get_system_name.outputs.SystemName }}-acl-${{ inputs.acl_hash || fromJson(steps.get-versions.outputs.output).dependencies.acl }}-onednn-${{ steps.get_onednn_commit_hash.outputs.oneDNNCommitHash }}-${{ inputs.toolset }}-${{ inputs.build }}
path: ${{ github.workspace }}/oneDNN_pkg
- name: Upload artifact
if: ${{ inputs.artifact_name != '' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ${{ github.workspace }}/oneDNN_pkg
if-no-files-found: error
include-hidden-files: true
retention-days: 1

View File

@ -51,22 +51,29 @@ def main():
)
args_parser.add_argument("good", nargs="?", help="good hash")
args_parser.add_argument("file", nargs="?", help="input file")
args_parser.add_argument(
"build", nargs="?", default="build", help="build directory"
)
args_parser.add_argument(
"--unique",
action="store_true",
help="whether to return only one test case per unique op",
)
args = args_parser.parse_args()
if args.good is None:
raise Exception("Good hash cannot be empty")
if args.file is None:
raise Exception("File argument cannot be empty")
cases = ctest_utils.failed_benchdnn_tests(args.file, args.unique)
results_dict = {}
for case in cases:
bisect_cmd = str(F_PATH / f"git_bisect.sh")
build_dir = str(F_PATH.parent.parent.parent / "build")
build_dir = str(args.build)
result = subprocess.run(
args=[
f'bash {bisect_cmd} {args.good} HEAD {build_dir} "{case}"'
],
args=[f'bash {bisect_cmd} {args.good} HEAD {build_dir} "{case}"'],
shell=True,
capture_output=True,
)

View File

@ -56,12 +56,14 @@ if [[ "$ONEDNN_ACTION" == "configure" ]]; then
-DONEDNN_WERROR=ON \
-DDNNL_BUILD_FOR_CI=ON \
-DONEDNN_TEST_SET=$ONEDNN_TEST_SET \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DCMAKE_SKIP_BUILD_RPATH=FALSE \
-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON
set +x
fi
elif [[ "$ONEDNN_ACTION" == "build" ]]; then
set -x
cmake --build build
cmake --build build -j"$(nproc)"
set +x
else
echo "Unknown action: $ONEDNN_ACTION"

View File

@ -65,15 +65,47 @@ concurrency:
permissions: read-all
jobs:
build-and-test:
build-artifacts:
strategy:
matrix:
config: [
{ name: onednn-unit, build: RelWithAssert, testset: CI },
{ name: onednn-perf-base, build: Release, testset: SMOKE },
{ name: onednn-perf-new, build: Release, testset: SMOKE }
]
name: build ${{ matrix.config.name }}
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Read version file
if: ${{ matrix.config.name == 'onednn-perf-base' }}
id: get-versions
run: |
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: Build oneDNN
uses: ./oneDNN/.github/actions/build-onednn-aarch64
with:
artifact_name: ${{ matrix.config.name }}
threading: OMP
toolset: gcc
build: ${{ matrix.config.build }}
testset: ${{ matrix.config.testset }}
onednn_hash: ${{ matrix.config.name == 'onednn-perf-base' && fromJson(steps.get-versions.outputs.output).dependencies.onednn-base || '' }}
cache: ${{ matrix.config.name == 'onednn-perf-base' && 'true' || 'false'}}
smoke-test:
strategy:
matrix:
config: [
{ name: MacOS, label: macos-14, threading: SEQ, toolset: clang, build: RelWithAssert, testset: SMOKE },
{ name: cb100, label: ubuntu-24.04-arm, threading: OMP, toolset: gcc, build: RelWithAssert, testset: SMOKE },
{ name: c6g, label: ah-ubuntu_22_04-c6g_4x-50, threading: OMP, toolset: gcc, build: Release, testset: CI }, # Performance testing requires Release
{ name: c6g, label: ah-ubuntu_22_04-c6g_2x-50, threading: OMP, toolset: clang, build: RelWithAssert, testset: SMOKE },
{ name: c7g, label: ah-ubuntu_22_04-c7g_4x-50, threading: OMP, toolset: gcc, build: Release, testset: CI } # Performance testing requires Release
{ name: cb100, label: ubuntu-24.04-arm, threading: OMP, toolset: clang, build: RelWithAssert, testset: SMOKE },
]
name: ${{ matrix.config.name }}, ${{ matrix.config.toolset }}, ${{ matrix.config.threading }}, ${{ matrix.config.build }}
@ -116,91 +148,145 @@ jobs:
with:
version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.clang }}
- name: Build oneDNN
uses: ./oneDNN/.github/actions/build-onednn-aarch64
with:
threading: ${{ matrix.config.threading }}
toolset: ${{ matrix.config.toolset }}
build: ${{ matrix.config.build }}
testset: ${{ matrix.config.testset }}
- name: Run oneDNN tests
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/test.sh ${{ github.workspace }}/test_results.xml
working-directory: ${{ github.workspace }}/oneDNN_pkg/oneDNN/build
env:
CTEST_PARALLEL_LEVEL: 6
DYLD_LIBRARY_PATH: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary/build:${{ github.workspace }}/oneDNN_pkg/oneDNN/build/src
ONEDNN_THREADING: ${{ matrix.config.threading }}
unit-test:
needs: build-artifacts
strategy:
matrix:
config: [
{ name: c6g, label: ah-ubuntu_22_04-c6g_4x-50 },
{ name: c7g, label: ah-ubuntu_22_04-c7g_4x-50 },
{ name: c8g, label: ah-ubuntu_22_04-c8g_8x },
]
name: ${{ matrix.config.name }} unit test
runs-on: ${{ matrix.config.label }}
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Read version file
id: get-versions
run: |
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
# Note: This will create a github actions cache
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@56d043d188c3612951d8755da8f4b709ec951ad6 # v3.31.6
with:
cmakeVersion: 3.31.0
ninjaVersion: 1.12.0
- name: Install dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y libomp-dev g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: Download oneDNN
uses: actions/download-artifact@v5
with:
name: onednn-unit
path: oneDNN_pkg
- name: Prepare oneDNN for execution
run: chmod -R +x oneDNN_pkg
- name: Run oneDNN tests
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/test.sh ${{ github.workspace }}/test_results.xml ${{ github.workspace }}/test_results.log
working-directory: ${{ github.workspace }}/oneDNN_pkg/oneDNN/build
env:
CTEST_PARALLEL_LEVEL: 6
LD_LIBRARY_PATH: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary/build
perf-test:
needs: build-artifacts
strategy:
matrix:
config: [
{ name: c6g, label: ah-ubuntu_22_04-c6g_4x-50 },
{ name: c7g, label: ah-ubuntu_22_04-c7g_4x-50 },
{ name: c8g, label: ah-ubuntu_22_04-c8g_8x },
]
name: ${{ matrix.config.name }} perf test
runs-on: ${{ matrix.config.label }}
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Read version file
id: get-versions
run: |
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: setup python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.10'
- name: Install dependencies
if: ${{ matrix.config.build == 'Release' }}
run: pip install scipy statistics gitpython
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y patchelf libomp-dev g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
pip install scipy statistics gitpython
- name: Build ComputeLibrary
uses: ./oneDNN/.github/actions/build-acl
- name: Download oneDNN base
uses: actions/download-artifact@v5
with:
toolset: ${{ matrix.config.toolset }}
build: ${{ matrix.config.build }}
threading: ${{ matrix.config.threading }}
acl_hash: ${{ fromJson(steps.get-versions.outputs.output).dependencies.acl }}
gcc_version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
name: onednn-perf-base
path: oneDNN_pkg
- name: Prepare oneDNN base for execution
run: |
mv oneDNN_pkg oneDNN_base
chmod -R +x oneDNN_base
patchelf --add-rpath ${{ github.workspace }}/oneDNN_base/ComputeLibrary/build ${{ github.workspace }}/oneDNN_base/oneDNN/build/src/libdnnl.so.3
- name: Configure oneDNN
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
ONEDNN_THREADING: ${{ matrix.config.threading }}
- name: Build oneDNN
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN
env:
ONEDNN_ACTION: build
- name: Run oneDNN tests
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/test.sh ${{ github.workspace }}/test_results.xml ${{ github.workspace }}/test_results.log
working-directory: ${{ github.workspace }}/oneDNN/build
env:
CTEST_PARALLEL_LEVEL: 6
DYLD_LIBRARY_PATH: ${{ github.workspace }}/ComputeLibrary/build
ONEDNN_THREADING: ${{ matrix.config.threading }}
## Performance test steps ##
- name: Checkout oneDNN base
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Download oneDNN new
uses: actions/download-artifact@v5
with:
ref: ${{ github.base_ref }}
path: oneDNN_base
- name: Configure oneDNN base
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_base
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
ONEDNN_THREADING: ${{ matrix.config.threading }}
- name: Build oneDNN base
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_base
env:
ONEDNN_ACTION: build
name: onednn-perf-new
path: oneDNN_pkg
- name: Prepare oneDNN new for execution
run: |
mv oneDNN_pkg oneDNN_new
chmod -R +x oneDNN_new
patchelf --add-rpath ${{ github.workspace }}/oneDNN_new/ComputeLibrary/build ${{ github.workspace }}/oneDNN_new/oneDNN/build/src/libdnnl.so.3
- name: Run performance tests
shell: bash
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
run: |
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
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
env:
DYLD_LIBRARY_PATH: ${{ github.workspace }}/ComputeLibrary/build
OMP_NUM_THREADS=4 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_pr_performance.sh ${{ github.workspace }}/oneDNN_base/oneDNN/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN_new/oneDNN/build/tests/benchdnn/benchdnn base_4.txt new_4.txt
OMP_NUM_THREADS=16 bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_pr_performance.sh ${{ github.workspace }}/oneDNN_base/oneDNN/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN_new/oneDNN/build/tests/benchdnn/benchdnn base_16.txt new_16.txt
- name: Compare performance test results
if: ${{ github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
id: performance-test
continue-on-error: true
run: |
@ -210,13 +296,13 @@ jobs:
python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base_16.txt new_16.txt
- name: Check performance test failure
if: ${{ steps.performance-test.outputs.pass != 'True' && github.event_name == 'pull_request' && matrix.config.build == 'Release' && matrix.config.name != 'cb100' && matrix.config.name != 'MacOS' }}
if: ${{ steps.performance-test.outputs.pass != 'True' }}
run: echo "::warning file=.github/workflows/ci-aarch64.yml,line=1,col=1::${{ steps.performance-test.outputs.message }}"
# This job adds a check named "CI AArch64" that represents overall
# workflow status and can be used in branch rulesets
status:
needs: build-and-test
needs: [smoke-test, unit-test, perf-test]
runs-on: ubuntu-latest
name: "CI AArch64"
steps:

View File

@ -37,13 +37,32 @@ permissions: write-all
jobs:
test-performance:
uses: ./.github/workflows/performance-aarch64.yml
build:
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
build-and-test:
- name: Build oneDNN
uses: ./oneDNN/.github/actions/build-onednn-aarch64
with:
artifact_name: onednn-nightly
threading: OMP
toolset: gcc
build: RelWithAssert
testset: NIGHTLY
test:
needs: build
strategy:
matrix:
config: [
{ name: c6g, label: ah-ubuntu_22_04-c6g_8x-100, threading: OMP, toolset: gcc, build: RelWithAssert, testset: NIGHTLY },
{ name: c7g, label: ah-ubuntu_22_04-c7g_8x-100, threading: OMP, toolset: gcc, build: RelWithAssert, testset: NIGHTLY }
{ name: c7g, label: ah-ubuntu_22_04-c7g_8x-100, threading: OMP, toolset: gcc, build: RelWithAssert, testset: NIGHTLY },
{ name: c8g, label: ah-ubuntu_22_04-c8g_8x, threading: OMP, toolset: gcc, build: RelWithAssert, testset: NIGHTLY }
]
name: ${{ matrix.config.name }}, ${{ matrix.config.toolset }}, ${{ matrix.config.threading }}, ${{ matrix.config.build }}
@ -57,18 +76,6 @@ jobs:
fetch-tags: true
fetch-depth: 0
# Note: This will create a github actions cache
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@56d043d188c3612951d8755da8f4b709ec951ad6 # v3.31.6
with:
cmakeVersion: 3.31.0
ninjaVersion: 1.12.0
- if: ${{ matrix.config.threading == 'OMP' }}
name: Install openmp
run: |
sudo apt install -y libomp-dev
- name: Read version file
id: get-versions
run: |
@ -76,56 +83,44 @@ jobs:
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: Install gcc
# Note: This will create a github actions cache
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@56d043d188c3612951d8755da8f4b709ec951ad6 # v3.31.6
with:
cmakeVersion: 3.31.0
ninjaVersion: 1.12.0
- name: Install dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
sudo apt install -y libomp-dev g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: setup python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.10'
- name: Build ComputeLibrary
uses: ./oneDNN/.github/actions/build-acl
- name: Download oneDNN
uses: actions/download-artifact@v5
with:
toolset: ${{ matrix.config.toolset }}
build: ${{ matrix.config.build }}
threading: ${{ matrix.config.threading }}
acl_hash: ${{ fromJson(steps.get-versions.outputs.output).dependencies.acl }}
gcc_version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: Configure oneDNN
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
ONEDNN_THREADING: ${{ matrix.config.threading }}
- name: Build oneDNN
run: ${{ github.workspace }}/oneDNN/.github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN
env:
ONEDNN_ACTION: build
name: onednn-nightly
path: oneDNN_pkg
- name: Prepare oneDNN for execution
run: chmod -R +x oneDNN_pkg
- name: Run oneDNN tests
run: |
set -o pipefail
${{ github.workspace }}/oneDNN/.github/automation/aarch64/test.sh ${{ github.workspace }}/test_results.xml ${{ github.workspace }}/test_results.log
working-directory: ${{ github.workspace }}/oneDNN/build
working-directory: ${{ github.workspace }}/oneDNN_pkg/oneDNN/build
env:
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CTEST_PARALLEL_LEVEL: 8
DYLD_LIBRARY_PATH: ${{ github.workspace }}/ComputeLibrary/build
ONEDNN_THREADING: ${{ matrix.config.threading }}
LD_LIBRARY_PATH: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary/build
- name: Find last successful run
if: failure()
@ -148,10 +143,13 @@ jobs:
if: failure()
shell: bash
working-directory: ${{ github.workspace }}/oneDNN
run: python .github/automation/aarch64/bisect_ctest.py --unique ${{ steps.get-stable.outputs.stable-hash }} ${{ github.workspace }}/test_results.log
run: |
mkdir build
python .github/automation/aarch64/bisect_ctest.py --unique ${{ steps.get-stable.outputs.stable-hash }} ${{ github.workspace }}/test_results.log ${{ github.workspace }}/oneDNN/build
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary
ACL_ROOT_DIR: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary
LD_LIBRARY_PATH: ${{ github.workspace }}/oneDNN_pkg/ComputeLibrary/build
- name: Reset to HEAD
if: failure()
working-directory: ${{ github.workspace }}/oneDNN
@ -167,7 +165,7 @@ jobs:
save-success-hash:
runs-on: ubuntu-latest
needs: build-and-test
needs: test
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@ -187,7 +185,7 @@ jobs:
#* This job adds a check named "Nightly AArch64" that represents overall
#* workflow status and can be used in branch rulesets
status:
needs: build-and-test
needs: test
runs-on: ubuntu-latest
name: "Nightly AArch64"
steps:

View File

@ -56,34 +56,68 @@ concurrency:
permissions: write-all
jobs:
build-oneDNN-base:
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Read version file
id: get-versions
run: |
content=`cat ${{ github.workspace }}/oneDNN/.github/automation/aarch64/ci.json`
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: Build oneDNN base
uses: ./oneDNN/.github/actions/build-onednn-aarch64
with:
artifact_name: onednn-base
threading: OMP
toolset: gcc
build: Release
testset: SMOKE
acl_hash: ${{ inputs.acl_base_hash }}
onednn_hash: ${{ inputs.onednn_base_hash || fromJson(steps.get-versions.outputs.output).dependencies.onednn-base }}
cache: ${{ inputs.onednn_base_hash == '' && 'true' || 'false'}}
build-oneDNN-new:
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
- name: Build oneDNN new
uses: ./oneDNN/.github/actions/build-onednn-aarch64
with:
artifact_name: onednn-new
threading: OMP
toolset: gcc
build: Release
testset: SMOKE
acl_hash: ${{ inputs.acl_new_hash }}
onednn_hash: ${{ inputs.onednn_new_hash }}
build-and-test-performance:
needs: [build-oneDNN-new, build-oneDNN-base]
strategy:
matrix:
config: [
{ name: c7g, label: ah-ubuntu_22_04-c7g_m-100, threading: OMP, toolset: gcc, build: Release, testset: NIGHTLY }
{ name: c7g, label: ah-ubuntu_22_04-c7g_m-100, threading: OMP, toolset: gcc, build: Release, testset: NIGHTLY },
{ name: c8g, label: ah-ubuntu_22_04-c8g_m, threading: OMP, toolset: gcc, build: Release, testset: NIGHTLY }
]
name: ${{ matrix.config.name }}, ${{ matrix.config.toolset }}, ${{ matrix.config.threading }}, ${{ matrix.config.build }}
runs-on: ${{ matrix.config.label }}
continue-on-error: true
steps:
- name: Checkout oneDNN
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
path: oneDNN
# Note: This will create a github actions cache
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@56d043d188c3612951d8755da8f4b709ec951ad6 # v3.31.6
with:
cmakeVersion: 3.31.0
ninjaVersion: 1.12.0
- if: ${{ matrix.config.threading == 'OMP' }}
name: Install openmp
run: |
sudo apt install -y libomp-dev
path: oneDNN
- name: Read version file
id: get-versions
@ -92,101 +126,50 @@ jobs:
content="${content//[$'\t\r\n$ ']}"
echo "output=$content" >> $GITHUB_OUTPUT
- name: Install gcc
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: setup python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.10'
- name: Install scipy
if: ${{ matrix.config.build == 'Release' }}
run: pip install scipy statistics GitPython
- name: Install dependencies
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update -y
sudo apt install -y patchelf libomp-dev g++-${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
pip install scipy statistics GitPython
- name: Build Base ComputeLibrary
uses: ./oneDNN/.github/actions/build-acl
- name: Download oneDNN base
uses: actions/download-artifact@v5
with:
toolset: ${{ matrix.config.toolset }}
build: ${{ matrix.config.build }}
threading: ${{ matrix.config.threading }}
acl_hash: ${{ inputs.acl_base_hash || fromJson(steps.get-versions.outputs.output).dependencies.acl }}
gcc_version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
name: onednn-base
path: oneDNN_pkg
- name: Prepare oneDNN base for execution
run: |
mv oneDNN_pkg oneDNN_base
chmod -R +x oneDNN_base
patchelf --add-rpath ${{ github.workspace }}/oneDNN_base/ComputeLibrary/build ${{ github.workspace }}/oneDNN_base/oneDNN/build/src/libdnnl.so.3
- name: Rename to ComputeLibrary_base
run: mv ${{ github.workspace }}/ComputeLibrary ${{ github.workspace }}/ComputeLibrary_base
- name: Build New ComputeLibrary
uses: ./oneDNN/.github/actions/build-acl
- name: Download oneDNN new
uses: actions/download-artifact@v5
with:
toolset: ${{ matrix.config.toolset }}
build: ${{ matrix.config.build }}
threading: ${{ matrix.config.threading }}
acl_hash: ${{ inputs.acl_new_hash || fromJson(steps.get-versions.outputs.output).dependencies.acl }}
gcc_version: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
- name: Move to ComputeLibrary_new
run: mv ${{ github.workspace }}/ComputeLibrary ${{ github.workspace }}/ComputeLibrary_new
- name: Checkout oneDNN base
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{inputs.onednn_base_hash || fromJson(steps.get-versions.outputs.output).dependencies.onednn-base }}
path: oneDNN_base
- name: Checkout oneDNN new
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# when the input is non empty use it otherwise falls back to github.sha
ref: ${{ inputs.onednn_new_hash != '' && inputs.onednn_new_hash || github.sha }}
path: oneDNN_new
- name: Configure oneDNN base
run: .github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_base
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary_base
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
ONEDNN_THREADING: ${{ matrix.config.threading }}
- name: Build oneDNN base
run: .github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_base
env:
ONEDNN_ACTION: build
- name: Configure oneDNN new
run: .github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_new
env:
ACL_ROOT_DIR: ${{ github.workspace }}/ComputeLibrary_new
BUILD_TOOLSET: ${{ matrix.config.toolset }}
CMAKE_BUILD_TYPE: ${{ matrix.config.build }}
CMAKE_GENERATOR: Ninja
GCC_VERSION: ${{ fromJson(steps.get-versions.outputs.output).dependencies.gcc }}
ONEDNN_ACTION: configure
ONEDNN_TEST_SET: ${{ matrix.config.testset }}
ONEDNN_THREADING: ${{ matrix.config.threading }}
- name: Build oneDNN new
run: .github/automation/aarch64/build.sh
working-directory: ${{ github.workspace }}/oneDNN_new
env:
ONEDNN_ACTION: build
name: onednn-new
path: oneDNN_pkg
- name: Prepare oneDNN new for execution
run: |
mv oneDNN_pkg oneDNN_new
chmod -R +x oneDNN_new
patchelf --add-rpath ${{ github.workspace }}/oneDNN_new/ComputeLibrary/build ${{ github.workspace }}/oneDNN_new/oneDNN/build/src/libdnnl.so.3
- name: Run nightly performance tests
if: ${{ inputs.benchdnn_command == '' }}
shell: bash
run: |
OMP_NUM_THREADS=${{ inputs.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_new/build/tests/benchdnn/benchdnn base.txt new.txt
OMP_NUM_THREADS=${{ inputs.num_threads || 16 }} \
bash ${{ github.workspace }}/oneDNN/.github/automation/performance/bench_nightly_performance.sh \
${{ github.workspace }}/oneDNN_base/oneDNN/build/tests/benchdnn/benchdnn ${{ github.workspace }}/oneDNN_new/oneDNN/build/tests/benchdnn/benchdnn base.txt new.txt
python ${{ github.workspace }}/oneDNN/.github/automation/performance/benchdnn_comparison.py base.txt new.txt --out-file perf_table.md
- name: Update wiki
@ -203,8 +186,8 @@ jobs:
run: |
OMP_NUM_THREADS=${{ inputs.num_threads || 16 }} \
bash ${{ github.workspace }}/oneDNN/.github/automation/performance/run_benchdnn_compare.sh \
"${{ github.workspace }}/oneDNN_base/build/tests/benchdnn/benchdnn" \
"${{ github.workspace }}/oneDNN_new/build/tests/benchdnn/benchdnn" \
"${{ github.workspace }}/oneDNN_base/oneDNN/build/tests/benchdnn/benchdnn" \
"${{ github.workspace }}/oneDNN_new/oneDNN/build/tests/benchdnn/benchdnn" \
base.txt new.txt ${{ inputs.benchdnn_command }}
- name: Print speed comparisons