Skip to content

Commit 7f08c90

Browse files
committed
f
Change-Id: I9ed6fd6eaa27050abf196068e9e49e0912227927
1 parent 8eaa520 commit 7f08c90

File tree

2 files changed

+43
-15
lines changed

2 files changed

+43
-15
lines changed

.github/automation/build_aarch64.sh

+43-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,48 @@
1818
# *******************************************************************************
1919

2020
# Build oneDNN for aarch64.
21-
2221
set -o errexit -o pipefail -o noclobber
2322

2423
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
2524

25+
26+
# Function to clone and install Eigen
27+
install_eigen() {
28+
local eigen_repo="https://gitlab.com/libeigen/eigen.git"
29+
local eigen_commit="aa6964bf3a34fd607837dd8123bc42465185c4f8"
30+
31+
echo "Cloning Eigen repository..."
32+
if ! git clone "$eigen_repo" --depth 1; then
33+
echo "Error: Failed to clone Eigen repository."
34+
return 1
35+
fi
36+
37+
cd eigen
38+
39+
if ! git fetch --depth 1 origin "$eigen_commit" || ! git checkout "$eigen_commit"; then
40+
echo "Error: Failed to fetch or checkout commit."
41+
return 1
42+
fi
43+
44+
cd ..
45+
46+
mkdir -p eigen-build && cd eigen-build
47+
48+
if ! cmake -DCMAKE_INSTALL_PREFIX="${EIGEN_INSTALL_PATH}" "$EIGEN_PATH"; then
49+
echo "Error: CMake configuration failed."
50+
return 1
51+
fi
52+
53+
# Build and install Eigen
54+
echo "Building and installing Eigen..."
55+
if ! make -s -j install; then
56+
echo "Error: Build or installation failed."
57+
return 1
58+
fi
59+
60+
echo "Eigen installed successfully!"
61+
}
62+
2663
# Defines MP, CC, CXX and OS.
2764
source ${SCRIPT_DIR}/common_aarch64.sh
2865

@@ -46,7 +83,11 @@ CMAKE_OPTIONS="-Bbuild -S. \
4683
"
4784

4885
if [[ "$SCHEDULER" == 'TP' ]]; then
49-
EIGEN_INSTALL_PATH=${EIGEN_INSTALL_PATH:-"$PWD"}
86+
# install eigen
87+
export EIGEN_INSTALL_PATH=${EIGEN_INSTALL_PATH:-"$PWD"}
88+
export EIGEN_PATH=${EIGEN_PATH:-"$PWD/eigen"}
89+
install_eigen
90+
5091
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DDNNL_CPU_RUNTIME=THREADPOOL \
5192
-D_DNNL_TEST_THREADPOOL_IMPL=EIGEN -DEigen3_DIR=${EIGEN_INSTALL_PATH}/share/eigen3/cmake"
5293
elif [[ "$SCHEDULER" == "OMP" ] || [ "$SCHEDULER" == "SEQ" ]]; then

.github/workflows/ci-aarch64.yml

-13
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,6 @@ jobs:
122122
with:
123123
version: "17"
124124

125-
- if: matrix.threading == 'TP'
126-
name: Install eigen3
127-
working-directory: ${{ github.workspace }}
128-
env:
129-
COMPILER: ${{ matrix.toolset }}
130-
run: |
131-
git clone https://gitlab.com/libeigen/eigen.git --depth 1
132-
cd eigen
133-
git fetch --depth 1 origin aa6964bf3a34fd607837dd8123bc42465185c4f8
134-
git checkout aa6964bf3a34fd607837dd8123bc42465185c4f8
135-
cd ..
136-
${{ github.workspace }}/oneDNN/.github/automation/build-eigen-headers.sh
137-
138125
- name: Build ACL
139126
run: ${{ github.workspace }}/oneDNN/.github/automation/build_acl.sh
140127
env:

0 commit comments

Comments
 (0)