diff -Nru onednn-3.1.1/debian/changelog onednn-3.1.1/debian/changelog
--- onednn-3.1.1/debian/changelog	2024-01-01 02:12:13.000000000 +0100
+++ onednn-3.1.1/debian/changelog	2024-03-19 12:56:29.000000000 +0100
@@ -1,3 +1,10 @@
+onednn (3.1.1-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Build against Arm Compute Library. 
+
+ -- Emanuele Rocca <ema@debian.org>  Tue, 19 Mar 2024 12:56:29 +0100
+
 onednn (3.1.1-2) unstable; urgency=medium
 
   * Upload to unstable.
diff -Nru onednn-3.1.1/debian/control onednn-3.1.1/debian/control
--- onednn-3.1.1/debian/control	2023-12-29 19:11:31.000000000 +0100
+++ onednn-3.1.1/debian/control	2024-03-19 12:56:29.000000000 +0100
@@ -7,6 +7,7 @@
                debhelper-compat (= 13),
                libtbb-dev,
                ninja-build,
+               libarm-compute-dev [arm64],
                libsimde-dev (>= 0.7.0)
 Standards-Version: 4.6.0
 Homepage: https://github.com/oneapi-src/oneDNN
diff -Nru onednn-3.1.1/debian/patches/find-acl.diff onednn-3.1.1/debian/patches/find-acl.diff
--- onednn-3.1.1/debian/patches/find-acl.diff	1970-01-01 01:00:00.000000000 +0100
+++ onednn-3.1.1/debian/patches/find-acl.diff	2024-03-19 12:56:29.000000000 +0100
@@ -0,0 +1,64 @@
+Index: onednn-3.1.1/cmake/FindACL.cmake
+===================================================================
+--- onednn-3.1.1.orig/cmake/FindACL.cmake	2024-03-19 13:07:36.790941226 +0100
++++ onednn-3.1.1/cmake/FindACL.cmake	2024-03-19 13:07:51.761991610 +0100
+@@ -24,14 +24,12 @@
+ find_path(ACL_INCLUDE_DIR
+   NAMES arm_compute/graph.h
+   PATHS ENV ACL_ROOT_DIR
+-  NO_DEFAULT_PATH
+   )
+ 
+ find_library(ACL_LIBRARY
+   NAMES arm_compute
+   PATHS ENV ACL_ROOT_DIR
+-  PATH_SUFFIXES build
+-  NO_DEFAULT_PATH
++  PATH_SUFFIXES lib build
+   )
+ 
+ include(FindPackageHandleStandardArgs)
+@@ -56,19 +54,13 @@
+   find_library(ACL_GRAPH_LIBRARY
+     NAMES arm_compute_graph
+     PATHS ENV ACL_ROOT_DIR
+-    PATH_SUFFIXES build
+-    )
+-
+-  find_library(ACL_CORE_LIBRARY
+-    NAMES arm_compute_core
+-    PATHS ENV ACL_ROOT_DIR
+-    PATH_SUFFIXES build
++    PATH_SUFFIXES lib build
+     )
+ 
+   list(APPEND ACL_INCLUDE_DIRS
+     ${ACL_INCLUDE_DIR} ${ACL_EXTRA_INCLUDE_DIR})
+   list(APPEND ACL_LIBRARIES
+-    ${ACL_LIBRARY} ${ACL_GRAPH_LIBRARY} ${ACL_CORE_LIBRARY})
++    ${ACL_LIBRARY} ${ACL_GRAPH_LIBRARY})
+ endif()
+ 
+ 
+Index: onednn-3.1.1/src/cpu/platform.cpp
+===================================================================
+--- onednn-3.1.1.orig/src/cpu/platform.cpp	2024-03-19 13:07:36.790941226 +0100
++++ onednn-3.1.1/src/cpu/platform.cpp	2024-03-19 13:07:36.790941226 +0100
+@@ -37,8 +37,6 @@
+ #if DNNL_AARCH64_USE_ACL
+ // For checking if fp16 isa is supported on the platform
+ #include "arm_compute/core/CPP/CPPTypes.h"
+-// For setting the number of threads for ACL
+-#include "src/common/cpuinfo/CpuInfo.h"
+ #endif
+ #endif
+ 
+@@ -197,7 +195,7 @@
+ #if DNNL_X64
+     return x64::cpu().getNumCores(Xbyak::util::CoreLevel);
+ #elif DNNL_AARCH64_USE_ACL
+-    return arm_compute::cpuinfo::num_threads_hint();
++    return aarch64::cpu().getNumCores(Xbyak_aarch64::util::CoreLevel);
+ #else
+     return 1;
+ #endif
diff -Nru onednn-3.1.1/debian/patches/series onednn-3.1.1/debian/patches/series
--- onednn-3.1.1/debian/patches/series	2023-09-12 02:18:02.000000000 +0200
+++ onednn-3.1.1/debian/patches/series	2024-03-19 12:52:15.000000000 +0100
@@ -1 +1,2 @@
 fix-gcc13-ftbfs.patch
+find-acl.diff
diff -Nru onednn-3.1.1/debian/rules onednn-3.1.1/debian/rules
--- onednn-3.1.1/debian/rules	2023-12-29 19:11:03.000000000 +0100
+++ onednn-3.1.1/debian/rules	2024-03-19 12:56:29.000000000 +0100
@@ -8,11 +8,18 @@
 %:
 	dh $@ -Scmake+ninja
 
+CMAKE_OPTIONS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+				-DONEDNN_ARCH_OPT_FLAGS=""
+
+# Enable integration with Arm Compute Library on arm64
+ifeq ($(DEB_TARGET_ARCH),arm64)
+    export ACL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
+    CMAKE_OPTIONS += -DONEDNN_AARCH64_USE_ACL=ON
+endif
+
 # https://oneapi-src.github.io/oneDNN/dev_guide_build.html
 override_dh_auto_configure:
-	dh_auto_configure -- \
-		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-		-DONEDNN_ARCH_OPT_FLAGS=""
+	dh_auto_configure -- $(CMAKE_OPTIONS)
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
