Skip to content

Commit 67f0f5a

Browse files
Sqvidalvoron
authored andcommitted
build: aarch64: Update minimum ACL version to 52.0.0
ComputeLibrary-v52.0.0 is the first release to use semantic versioning. The CMake rules have been updated to add sanity checks based on this new paradigm. Signed-off-by: Siddhartha Menon <[email protected]>
1 parent a4ed4a7 commit 67f0f5a

File tree

5 files changed

+53
-26
lines changed

5 files changed

+53
-26
lines changed

.github/automation/aarch64/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"acl": "v25.02",
3+
"acl": "v52.0.0",
44
"gcc": "13",
55
"clang": "17",
66
"onednn-base": "v3.7"

.github/automation/aarch64/get_acl.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ echo "github workspace $GITHUB_WORKSPACE"
2525
os_type=$(uname)
2626

2727
ACL_WITH_ASSERTS=${ACL_WITH_ASSERTS:-0}
28-
ACL_VERSION=${ACL_VERSION:-v24.08.1}
28+
ACL_VERSION=${ACL_VERSION:-v52.0.0}
2929

3030
if [[ "$os_type" == "Linux" ]]; then
3131
echo "This machine is running Linux"
@@ -91,5 +91,3 @@ ACL_LIB_DIR=$(find_acl_lib_dir)
9191
echo "Using ACL lib from ${ACL_LIB_DIR}"
9292
echo "cp contents from ${ACL_LIB_DIR} to ${ACL_ROOT_DIR}/lib"
9393
cp -rf "$ACL_LIB_DIR"* "$ACL_ROOT_DIR/lib/"
94-
95-
echo "${ACL_VERSION}" >"${ACL_ROOT_DIR}/arm_compute/arm_compute_version.embed"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ On a CPU based on Arm AArch64 architecture, oneDNN CPU engine can be built with
174174
machine learning applications and provides AArch64 optimized implementations
175175
of core functions. This functionality currently requires that ACL is downloaded
176176
and built separately. See [Build from Source] section of the Developer Guide for
177-
details. oneDNN only supports Compute Library versions 24.11.1 or later.
177+
details. oneDNN only supports Compute Library version 52.
178178

179179
[Arm Compute Library (ACL)]: https://github.com/arm-software/ComputeLibrary
180180

cmake/ACL.cmake

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ******************************************************************************
2-
# Copyright 2020-2024 Arm Limited and affiliates.
2+
# Copyright 2020-2025 Arm Limited and affiliates.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,31 +31,62 @@ endif()
3131

3232
find_package(ACL REQUIRED)
3333

34-
set(ACL_MINIMUM_VERSION "24.11.1")
34+
# Required. The minimum compatible major-version as per Semantic Versioning.
35+
set(ACL_MIN_MAJOR_VERSION "52")
36+
37+
# Optional. Maximum known compatible version if any.
38+
# Set to an empty-string if none.
39+
set(ACL_MAX_MAJOR_VERSION "")
3540

3641
if(ACL_FOUND)
3742
file(GLOB_RECURSE ACL_VERSION_FILE ${ACL_INCLUDE_DIR}/*/arm_compute_version.embed)
3843
if ("${ACL_VERSION_FILE}" STREQUAL "")
3944
message(WARNING
4045
"Build may fail. Could not determine ACL version.\n"
41-
"Supported ACL versions:\n"
42-
"- minimum required is ${ACL_MINIMUM_VERSION}\n"
46+
"File 'arm_compute_version.embed' not found in ${ACL_INCLUDE_DIR}/**\n"
47+
"Minimum compatible ACL version is ${ACL_MIN_MAJOR_VERSION}\n"
4348
)
4449
else()
4550
file(READ ${ACL_VERSION_FILE} ACL_VERSION_STRING)
46-
string(REGEX MATCH "v([0-9]+\\.[0-9]+\\.?[0-9]*)" ACL_VERSION "${ACL_VERSION_STRING}")
47-
set(ACL_VERSION "${CMAKE_MATCH_1}")
48-
if ("${ACL_VERSION}" VERSION_EQUAL "0.0")
49-
# Unreleased ACL versions come with version string "v0.0-unreleased", and may not be compatible with oneDNN.
50-
# It is recommended to use the latest release of ACL.
51+
52+
if("${ACL_VERSION_STRING}" MATCHES "arm_compute_version=v([0-9]+)\\.([0-9]+)\\.?([0-9]*)")
53+
set(ACL_MAJOR_VERSION "${CMAKE_MATCH_1}")
54+
set(ACL_MINOR_VERSION "${CMAKE_MATCH_2}")
55+
56+
if ("${ACL_MAJOR_VERSION}.${ACL_MINOR_VERSION}" VERSION_EQUAL "0.0")
57+
# Unreleased ACL versions come with version string "v0.0-unreleased", and may not be compatible with oneDNN.
58+
# It is recommended to use a supported major-version of ACL.
59+
message(WARNING
60+
"Build may fail. Using an unreleased ACL version.\n"
61+
"Minimum compatible ACL version is ${ACL_MIN_MAJOR_VERSION}\n"
62+
)
63+
elseif("${ACL_MAJOR_VERSION}" LESS "${ACL_MIN_MAJOR_VERSION}")
64+
message(FATAL_ERROR
65+
"Detected ACL version ${ACL_MAJOR_VERSION}, but minimum "
66+
"compatible is ${ACL_MIN_MAJOR_VERSION}\n"
67+
)
68+
elseif("${ACL_MAJOR_VERSION}" GREATER "${ACL_MIN_MAJOR_VERSION}")
69+
# This is not necessarily an error. Need to check if there is a
70+
# known incompatible maximum version:
71+
if("${ACL_MAX_MAJOR_VERSION}" STREQUAL "")
72+
message(WARNING
73+
"Build may fail. Using a newer ACL version than officially supported.\n"
74+
"Detected ACL version ${ACL_MAJOR_VERSION}, but "
75+
"supported version is ${ACL_MIN_MAJOR_VERSION}\n"
76+
)
77+
else()
78+
if("${ACL_MAJOR_VERSION}" GREATER "${ACL_MAX_MAJOR_VERSION}")
79+
message(FATAL_ERROR
80+
"Detected ACL version ${ACL_MAJOR_VERSION}, but maximum "
81+
"compatible version is ${ACL_MAX_MAJOR_VERSION}\n"
82+
)
83+
endif()
84+
endif()
85+
endif()
86+
else()
5187
message(WARNING
52-
"Build may fail. Using unreleased ACL version.\n"
53-
"Supported ACL versions:\n"
54-
"- minimum required is ${ACL_MINIMUM_VERSION}\n"
55-
)
56-
elseif("${ACL_VERSION}" VERSION_LESS "${ACL_MINIMUM_VERSION}")
57-
message(FATAL_ERROR
58-
"Detected ACL version ${ACL_VERSION}, but minimum required is ${ACL_MINIMUM_VERSION}\n"
88+
"Build may fail. Could not determine ACL version.\n"
89+
"Unexpected version string format in ${ACL_VERSION_FILE}.\n"
5990
)
6091
endif()
6192
endif()

src/cpu/acl/matmul/acl_matmul.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,9 @@ status_t acl_matmul_t::execute_forward(const exec_ctx_t &ctx) const {
178178

179179
std::unique_lock<std::mutex> locker {mtx_, std::defer_lock};
180180

181-
// Some of the underlying kernels used by ACL still require some state and
182-
// are not safe to be called in parallel with different execution contexts.
183-
// Eventually when all kernels are truly stateless, this guard can be
184-
// removed.
185-
if (!acl_obj_->asm_gemm.has_stateless_impl()) { locker.lock(); }
181+
// Non-fixed-format kernels in ACL hold shared state and are not safe to be
182+
// called in parallel with different execution contexts.
183+
if (!IsFixedFormat) { locker.lock(); }
186184

187185
bool is_transA = amp.is_transA;
188186
bool is_transB = amp.is_transB;

0 commit comments

Comments
 (0)