Skip to content

Commit

Permalink
github: workflows: Streamline AArch64 CI
Browse files Browse the repository at this point in the history
- Reduction in runners to increase throughput
- Shift to CMake for ACL

Signed-off-by: Hamza Butt <[email protected]>
  • Loading branch information
theComputeKid committed Dec 17, 2024
1 parent f4fcbb6 commit 36c227a
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 198 deletions.
49 changes: 23 additions & 26 deletions .github/automation/build_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,27 @@ source ${SCRIPT_DIR}/common_aarch64.sh
export ACL_ROOT_DIR=${ACL_ROOT_DIR:-"${PWD}/ComputeLibrary"}

CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-"Release"}
ONEDNN_TEST_SET=SMOKE
ONEDNN_BUILD_GRAPH=1

# ACL is not built with OMP on macOS.
if [[ "$OS" == "Darwin" ]]; then
ONEDNN_THREADING=SEQ
if [[ "$BUILD_TOOLSET" == "clang" ]]; then
if [[ "$CMAKE_BUILD_TYPE" == "Debug" ]]; then
# Darwin graph tests take a lot of time in debug mode.
ONEDNN_BUILD_GRAPH=0
fi
fi
ONEDNN_TEST_SET=${ONEDNN_TEST_SET:-"SMOKE"}
ONEDNN_BUILD_GRAPH=${ONEDNN_BUILD_GRAPH:-"ON"}

if [[ "$ONEDNN_ACTION" == "configure" ]]; then
set -x
cmake \
-G $CMAKE_GENERATOR \
-Bbuild -S. \
-DDNNL_AARCH64_USE_ACL=ON \
-DONEDNN_BUILD_GRAPH=$ONEDNN_BUILD_GRAPH \
-DDNNL_CPU_RUNTIME=$ONEDNN_THREADING \
-DONEDNN_WERROR=ON \
-DDNNL_BUILD_FOR_CI=ON \
-DONEDNN_TEST_SET=$ONEDNN_TEST_SET \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
set +x
elif [[ "$ONEDNN_ACTION" == "build" ]]; then
set -x
cmake --build build
set +x
else
echo "Unknown action: $ONEDNN_ACTION"
exit 1
fi

set -x
cmake \
-Bbuild -S. \
-DDNNL_AARCH64_USE_ACL=ON \
-DONEDNN_BUILD_GRAPH=$ONEDNN_BUILD_GRAPH \
-DDNNL_CPU_RUNTIME=$ONEDNN_THREADING \
-DONEDNN_WERROR=ON \
-DDNNL_BUILD_FOR_CI=ON \
-DONEDNN_TEST_SET=$ONEDNN_TEST_SET \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE

cmake --build build $MP
set +x
49 changes: 15 additions & 34 deletions .github/automation/build_acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,33 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
# Defines MP, CC, CXX and OS.
source ${SCRIPT_DIR}/common_aarch64.sh

ACL_CONFIG=${ACL_CONFIG:-"Release"}
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-"Release"}
ACL_ROOT_DIR=${ACL_ROOT_DIR:-"${PWD}/ComputeLibrary"}
ACL_VERSION=${ACL_VERSION:-v24.11.1}
ACL_ARCH=${ACL_ARCH:-"armv8.2-a"}
ACL_REPO="https://github.com/ARM-software/ComputeLibrary.git"

if [[ "$OS" == "Linux" ]]; then
ACL_MULTI_ISA_SUPPORT=1
if [[ "$ACL_THREADING" == "OMP" ]]; then
ACL_OPENMP=1
elif [[ "$ACL_THREADING" == "SEQ" ]]; then
ACL_OPENMP=0
fi
ACL_OS="linux"
elif [[ "$OS" == "Darwin" ]]; then
ACL_MULTI_ISA_SUPPORT=0
if [[ "$ACL_THREADING" == "OMP" ]]; then
ACL_OPENMP=1
elif [[ "$ACL_THREADING" == "SEQ" ]]; then
ACL_OPENMP=0
ACL_OS="macos"
else
echo "Unknown OS: $OS"
exit 1
fi

if [[ "$ACL_CONFIG" == "Release" ]]; then
ACL_DEBUG=0
elif [[ "$ACL_CONFIG" == "Debug" ]]; then
ACL_DEBUG=1
else
echo "Unknown build config: $ACL_CONFIG"
exit 1
fi

echo "Compiler version:"
$CC --version

if [[ "$ACL_ACTION" == "clone" ]]; then
set -x
git clone --branch $ACL_VERSION --depth 1 $ACL_REPO $ACL_ROOT_DIR
set +x
elif [[ "$ACL_ACTION" == "configure" ]]; then
set -x
cmake -S$ACL_ROOT_DIR -B$ACL_ROOT_DIR/build \
-DARM_COMPUTE_OPENMP=$ACL_OPENMP \
-DARM_COMPUTE_CPPTHREADS=0 \
-DARM_COMPUTE_WERROR=0 \
-DARM_COMPUTE_BUILD_EXAMPLES=1 \
-DARM_COMPUTE_BUILD_TESTING=1 \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
set +x
elif [[ "$ACL_ACTION" == "build" ]]; then
cd $ACL_ROOT_DIR
set -x
scons $MP Werror=0 debug=$ACL_DEBUG neon=1 opencl=0 embed_kernels=0 \
os=$ACL_OS arch=$ACL_ARCH build=native multi_isa=$ACL_MULTI_ISA_SUPPORT \
fixed_format_kernels=1 cppthreads=0 openmp=$ACL_OPENMP examples=0 \
validation_tests=0
cmake --build $ACL_ROOT_DIR/build
set +x
else
echo "Unknown action: $ACL_ACTION"
Expand Down
34 changes: 8 additions & 26 deletions .github/automation/test_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,24 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
# Defines MP, CC, CXX and OS.
source ${SCRIPT_DIR}/common_aarch64.sh

# Skip tests for certain config to preserve resources, while maintaining
# coverage. Skip:
# (SEQ,CLANG)
# (OMP,CLANG,DEBUG)
SKIP_TESTS=0
if [[ "$OS" == "Linux" ]]; then
if [[ "$ONEDNN_THREADING" == "SEQ" ]]; then
if [[ "$BUILD_TOOLSET" == "clang" ]]; then
SKIP_TESTS=1
fi
elif [[ "$ONEDNN_THREADING" == "OMP" ]]; then
if [[ "$BUILD_TOOLSET" == "clang" ]]; then
if [[ "$CMAKE_BUILD_TYPE" == "Debug" ]]; then
SKIP_TESTS=1
fi
fi
fi
fi

if [[ $SKIP_TESTS == 1 ]]; then
echo "Skipping tests for this configuration: $OS $ONEDNN_THREADING $BUILD_TOOLSET".
exit 0
fi

# AArch64 does not support graph for now.
# AArch64 does not officially support graph for now.
SKIPPED_GRAPH_TEST_FAILURES="test_graph_unit_dnnl_sdp_decomp_cpu"
SKIPPED_GRAPH_TEST_FAILURES+="|test_graph_unit_dnnl_mqa_decomp_cpu"

# described in issue: https://github.com/oneapi-src/oneDNN/issues/2175
SKIPPED_TEST_FAILURES="test_benchdnn_modeC_matmul_multidims_cpu"

# We currently have some OS and config specific test failures.
if [[ "$OS" == "Linux" ]]; then
if [[ "$CMAKE_BUILD_TYPE" == "Debug" ]]; then
# as test_matmul is time consuming , we only run it in release mode to save time.
SKIPPED_TEST_FAILURES+="|test_matmul"
fi
SKIPPED_TEST_FAILURES+="|test_benchdnn_modeC_binary_ci_cpu"
SKIPPED_TEST_FAILURES+="|test_benchdnn_modeC_binary_different_dt_ci_cpu"
SKIPPED_TEST_FAILURES+="|test_benchdnn_modeC_binary_different_dt_ci_cpu"

SKIPPED_GRAPH_TEST_FAILURES+="|test_benchdnn_modeC_graph_ci_cpu"
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-gqa-cpp"
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-mqa-cpp"
SKIPPED_GRAPH_TEST_FAILURES+="|cpu-graph-sdpa-cpp"
Expand All @@ -84,5 +66,5 @@ elif [[ "$OS" == "Linux" ]]; then
fi

set -x
ctest $CTEST_MP --no-tests=error --verbose --output-on-failure -E "$SKIPPED_TEST_FAILURES"
ctest $CTEST_MP --no-tests=error --output-on-failure -E "$SKIPPED_TEST_FAILURES"
set +x
Loading

0 comments on commit 36c227a

Please sign in to comment.