Skip to content

Commit 13d942e

Browse files
authored
Merge branch 'oneapi-src:main' into feat-stateless-softmax
2 parents a61ebae + 44160a1 commit 13d942e

File tree

240 files changed

+7287
-3987
lines changed

Some content is hidden

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

240 files changed

+7287
-3987
lines changed

.github/CODEOWNERS

-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@
4141
# Graph API
4242
/src/graph/ @oneapi-src/onednn-graph @intel-innersource/dnn-graph
4343

44-
# Graph compiler
45-
/src/graph/backend/graph_compiler/ @intel-innersource/dnn-compiler
46-
/tests/gtests/graph/unit/backend/graph_compiler/ @intel-innersource/dnn-compiler
47-
4844
# Documentation
4945
*.md @oneapi-src/onednn-doc @oneapi-src/onednn-arch @intel-innersource/dnn-doc @intel-innersource/dnn-arch
5046
/doc/ @oneapi-src/onednn-doc @oneapi-src/onednn-arch @intel-innersource/dnn-doc @intel-innersource/dnn-arch

.github/automation/build_aarch64.sh

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#! /bin/bash
2+
3+
# *******************************************************************************
4+
# Copyright 2024 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+
# Build oneDNN for aarch64.
21+
22+
set -o errexit -o pipefail -o noclobber
23+
24+
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
25+
26+
# Defines MP, CC, CXX and OS.
27+
source ${SCRIPT_DIR}/common_aarch64.sh
28+
29+
export ACL_ROOT_DIR=${ACL_ROOT_DIR:-"${PWD}/ComputeLibrary"}
30+
31+
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-"Release"}
32+
ONEDNN_TEST_SET=SMOKE
33+
34+
# ACL is not built with OMP on macOS.
35+
if [[ "$OS" == "Darwin" ]]; then
36+
ONEDNN_THREADING=SEQ
37+
fi
38+
39+
set -x
40+
cmake \
41+
-Bbuild -S. \
42+
-DDNNL_AARCH64_USE_ACL=ON \
43+
-DONEDNN_BUILD_GRAPH=0 \
44+
-DDNNL_CPU_RUNTIME=$ONEDNN_THREADING \
45+
-DONEDNN_WERROR=ON \
46+
-DDNNL_BUILD_FOR_CI=ON \
47+
-DONEDNN_TEST_SET=$ONEDNN_TEST_SET \
48+
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
49+
50+
cmake --build build $MP
51+
set +x

.github/automation/build_acl.sh

+61-43
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/bash
22

33
# *******************************************************************************
4-
# Copyright 2020-2023 Arm Limited and affiliates.
4+
# Copyright 2020-2024 Arm Limited and affiliates.
55
# SPDX-License-Identifier: Apache-2.0
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,45 +17,63 @@
1717
# limitations under the License.
1818
# *******************************************************************************
1919

20-
# Compute Library build defaults
21-
ACL_VERSION="v23.11"
22-
ACL_DIR="${PWD}/ComputeLibrary"
23-
ACL_ARCH="armv8a"
24-
ACL_MULTI_ISA_SUPPORT=0
25-
26-
while [[ $# -gt 0 ]]; do
27-
case $1 in
28-
--version)
29-
ACL_VERSION="v$2"
30-
shift
31-
;;
32-
--arch)
33-
ACL_ARCH="$2"
34-
shift
35-
;;
36-
--multi_isa)
37-
ACL_MULTI_ISA_SUPPORT=1
38-
;;
39-
--root-dir)
40-
ACL_DIR="$2"
41-
shift
42-
;;
43-
*)
44-
echo "Unknown option: $1"
45-
exit 1
46-
;;
47-
esac
48-
shift
49-
done
50-
51-
readonly ACL_REPO="https://github.com/ARM-software/ComputeLibrary.git"
52-
MAKE_NP="-j$(grep -c processor /proc/cpuinfo)"
53-
54-
git clone --branch $ACL_VERSION --depth 1 $ACL_REPO $ACL_DIR
55-
cd $ACL_DIR
56-
57-
scons --silent $MAKE_NP Werror=0 debug=0 neon=1 opencl=0 embed_kernels=0 \
58-
os=linux arch=$ACL_ARCH build=native multi_isa=$ACL_MULTI_ISA_SUPPORT \
59-
fixed_format_kernels=1
60-
61-
exit $?
20+
# Build ACL from github.
21+
22+
set -o errexit -o pipefail -o noclobber
23+
24+
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
25+
26+
# Defines MP, CC, CXX and OS.
27+
source ${SCRIPT_DIR}/common_aarch64.sh
28+
29+
ACL_CONFIG=${ACL_CONFIG:-"Release"}
30+
ACL_ROOT_DIR=${ACL_ROOT_DIR:-"${PWD}/ComputeLibrary"}
31+
ACL_VERSION=${ACL_VERSION:-v24.09}
32+
ACL_ARCH=${ACL_ARCH:-"armv8.2-a"}
33+
ACL_REPO="https://github.com/ARM-software/ComputeLibrary.git"
34+
35+
if [[ "$OS" == "Linux" ]]; then
36+
ACL_MULTI_ISA_SUPPORT=1
37+
if [[ "$ACL_THREADING" == "OMP" ]]; then
38+
ACL_OPENMP=1
39+
elif [[ "$ACL_THREADING" == "SEQ" ]]; then
40+
ACL_OPENMP=0
41+
fi
42+
ACL_OS="linux"
43+
elif [[ "$OS" == "Darwin" ]]; then
44+
ACL_MULTI_ISA_SUPPORT=0
45+
ACL_OPENMP=0
46+
ACL_OS="macos"
47+
else
48+
echo "Unknown OS: $OS"
49+
exit 1
50+
fi
51+
52+
if [[ "$ACL_CONFIG" == "Release" ]]; then
53+
ACL_DEBUG=0
54+
elif [[ "$ACL_CONFIG" == "Debug" ]]; then
55+
ACL_DEBUG=1
56+
else
57+
echo "Unknown build config: $ACL_CONFIG"
58+
exit 1
59+
fi
60+
61+
echo "Compiler version:"
62+
$CC --version
63+
64+
if [[ "$ACL_ACTION" == "clone" ]]; then
65+
set -x
66+
git clone --branch $ACL_VERSION --depth 1 $ACL_REPO $ACL_ROOT_DIR
67+
set +x
68+
elif [[ "$ACL_ACTION" == "build" ]]; then
69+
cd $ACL_ROOT_DIR
70+
set -x
71+
scons $MP Werror=0 debug=$ACL_DEBUG neon=1 opencl=0 embed_kernels=0 \
72+
os=$ACL_OS arch=$ACL_ARCH build=native multi_isa=$ACL_MULTI_ISA_SUPPORT \
73+
fixed_format_kernels=1 cppthreads=0 openmp=$ACL_OPENMP examples=0 \
74+
validation_tests=0
75+
set +x
76+
else
77+
echo "Unknown action: $ACL_ACTION"
78+
exit 1
79+
fi
+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/usr/bin/python3
2+
3+
# *******************************************************************************
4+
# Copyright 2024 Arm Limited and affiliates.
5+
# Copyright 2024 Intel Corporation
6+
# SPDX-License-Identifier: Apache-2.0
7+
#
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
# *******************************************************************************
20+
21+
import argparse
22+
import subprocess
23+
24+
# * Ensuring the scopes end in colon and same level scopes are comma delimited.
25+
# TODO: Limit scopes to an acceptable list of tags.
26+
def __scopeCheck(msg: str):
27+
firstLine = (msg.partition("\n")[0]).strip()
28+
29+
if not ":" in firstLine:
30+
raise ValueError(
31+
f"Please see contribution guidelines. First line must contain a scope ending in a colon. Got: {firstLine}"
32+
)
33+
34+
# The last element of the split is the title, which we don't care about. Remove it.
35+
scopesArray = firstLine.split(":")[:-1]
36+
print("---")
37+
print(f"Scopes: {scopesArray}")
38+
39+
for scopes in scopesArray:
40+
print("---")
41+
print(f"Same-level scope: {scopes}")
42+
numWords = len(scopes.split())
43+
numCommas = scopes.count(",")
44+
print(f"Number of words in scope: {numWords}")
45+
print(f"Number of commas in scope: {numCommas}")
46+
47+
if numWords != numCommas + 1:
48+
raise ValueError(
49+
f"Please see contribution guidelines. Same-level scopes must be seperated by a comma. If this is true then words == commas + 1."
50+
)
51+
52+
53+
# * Ensuring a character limit for the first line.
54+
def __numCharacterCheck(msg: str):
55+
summary = msg.partition("\n")[0]
56+
msgSummaryLen = len(summary)
57+
if msgSummaryLen >= 72:
58+
raise ValueError(
59+
f"Please see contribution guidelines. Message summary must be less than 72. Got: {msgSummaryLen}"
60+
)
61+
62+
63+
def main():
64+
parser = argparse.ArgumentParser()
65+
parser.add_argument("head", help="Head commit of PR branch")
66+
parser.add_argument("base", help="Base commit of PR branch")
67+
args = parser.parse_args()
68+
base: str = args.base
69+
head: str = args.head
70+
71+
commit_range = base + ".." + head
72+
messages = subprocess.run(["git", "rev-list", "--ancestry-path", commit_range, "--format=oneline"], capture_output=True, text=True).stdout
73+
74+
for i in messages.splitlines():
75+
commit_msg=i.split(' ', 1)[1]
76+
print(f"msg: {commit_msg}")
77+
__numCharacterCheck(commit_msg)
78+
__scopeCheck(commit_msg)
79+
80+
81+
if __name__ == "__main__":
82+
main()

.github/automation/common_aarch64.sh

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#! /bin/bash
2+
3+
# *******************************************************************************
4+
# Copyright 2024 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+
# Common variables for aarch64 ci. Exports:
21+
# CC, CXX, OS, MP
22+
23+
set -o errexit -o pipefail -o noclobber
24+
25+
export OS=$(uname)
26+
27+
# Num threads on system.
28+
if [[ "$OS" == "Darwin" ]]; then
29+
export MP="-j$(sysctl -n hw.ncpu)"
30+
elif [[ "$OS" == "Linux" ]]; then
31+
export MP="-j$(nproc)"
32+
fi
33+
34+
if [[ "$BUILD_TOOLSET" == "gcc" ]]; then
35+
export CC=gcc-${GCC_VERSION}
36+
export CXX=g++-${GCC_VERSION}
37+
elif [[ "$BUILD_TOOLSET" == "clang" ]]; then
38+
export CC=clang
39+
export CXX=clang++
40+
fi
41+
42+
# Print every exported variable.
43+
echo "OS: $OS"
44+
echo "Toolset: $BUILD_TOOLSET"
45+
echo "CC: $CC"
46+
echo "CXX: $CXX"
47+
echo "MP: $MP"

0 commit comments

Comments
 (0)