Skip to content

Commit 8ac4a19

Browse files
alvoronxczhai
authored andcommitted
[ARM] Revert uxlfoundation#2235 "fix, build, docs: aarch64: mutex lock if the ACL kernel is not stateless"
1 parent 23d94f8 commit 8ac4a19

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

.github/automation/build_acl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ source ${SCRIPT_DIR}/common_aarch64.sh
2828

2929
ACL_CONFIG=${ACL_CONFIG:-"Release"}
3030
ACL_ROOT_DIR=${ACL_ROOT_DIR:-"${PWD}/ComputeLibrary"}
31-
ACL_VERSION=${ACL_VERSION:-v24.11.1}
31+
ACL_VERSION=${ACL_VERSION:-v24.09}
3232
ACL_ARCH=${ACL_ARCH:-"armv8.2-a"}
3333
ACL_REPO="https://github.com/ARM-software/ComputeLibrary.git"
3434

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ On a CPU based on Arm AArch64 architecture, oneDNN CPU engine can be built with
173173
machine learning applications and provides AArch64 optimized implementations
174174
of core functions. This functionality currently requires that ACL is downloaded
175175
and built separately. See [Build from Source] section of the Developer Guide for
176-
details. oneDNN only supports Compute Library versions 24.11.1 or later.
176+
details. oneDNN only supports Compute Library versions 24.09 or later.
177177

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

cmake/ACL.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif()
3131

3232
find_package(ACL REQUIRED)
3333

34-
set(ACL_MINIMUM_VERSION "24.11.1")
34+
set(ACL_MINIMUM_VERSION "24.09")
3535

3636
if(ACL_FOUND)
3737
file(GLOB_RECURSE ACL_VERSION_FILE ${ACL_INCLUDE_DIR}/*/arm_compute_version.embed)

src/cpu/acl/matmul/acl_matmul.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*******************************************************************************/
1616

1717
#include "cpu/acl/matmul/acl_matmul.hpp"
18-
#include <mutex>
1918

2019
namespace dnnl {
2120
namespace impl {
@@ -176,16 +175,7 @@ status_t acl_matmul_t::execute_forward(const exec_ctx_t &ctx) const {
176175
auto src_base = CTX_IN_MEM(const data_t *, DNNL_ARG_SRC);
177176
auto wei_base = CTX_IN_MEM(const data_t *, DNNL_ARG_WEIGHTS);
178177

179-
const auto &amp = pd()->amp_;
180-
181-
std::unique_lock<std::mutex> locker {mtx_, std::defer_lock};
182-
183-
// Some of the underlying kernels used by ACL still require some state and
184-
// are not safe to be called in parallel with different execution contexts.
185-
// Eventually when all kernels are truly stateless, this guard can be
186-
// removed.
187-
if (!acl_obj_->asm_gemm.has_stateless_impl()) { locker.lock(); }
188-
178+
auto amp = pd()->amp_;
189179
bool is_transA = amp.is_transA;
190180
bool is_transB = amp.is_transB;
191181
bool do_transC = amp.do_transC;

src/cpu/acl/matmul/acl_matmul.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#ifndef ACL_MATMUL_HPP
1818
#define ACL_MATMUL_HPP
1919

20-
#include <mutex>
2120
#include "common/utils.hpp"
2221
#include "cpu/acl/acl_post_ops.hpp"
2322
#include "cpu/acl/matmul/acl_matmul_utils.hpp"
@@ -72,7 +71,6 @@ struct acl_matmul_t : public primitive_t {
7271
const pd_t *pd() const { return (const pd_t *)primitive_t::pd().get(); }
7372

7473
std::unique_ptr<acl_matmul_obj_t> acl_obj_;
75-
mutable std::mutex mtx_;
7674
}; // acl_matmul_t
7775

7876
} // namespace matmul

0 commit comments

Comments
 (0)