diff --git a/0001-softmax-fallback-to-ref.patch b/0001-softmax-fallback-to-ref.patch new file mode 100644 index 0000000000000000000000000000000000000000..765d2ca6227d1341ca4cd54022806274fb34b32b --- /dev/null +++ b/0001-softmax-fallback-to-ref.patch @@ -0,0 +1,33 @@ +From dc794aa2bd4c970a64d931b82db026d4900de18f Mon Sep 17 00:00:00 2001 +From: lilinjie +Date: Mon, 4 Aug 2025 20:14:37 +0800 +Subject: [PATCH] fix softmax bug + +--- + src/cpu/aarch64/acl_softmax.hpp | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/cpu/aarch64/acl_softmax.hpp b/src/cpu/aarch64/acl_softmax.hpp +index a4bfd0c3bd..a45919903d 100644 +--- a/src/cpu/aarch64/acl_softmax.hpp ++++ b/src/cpu/aarch64/acl_softmax.hpp +@@ -94,11 +94,12 @@ struct acl_softmax_fwd_t : public primitive_t { + status_t init(engine_t *engine) { + + bool ok = is_fwd() +- // ACL only supports matching src/dst data types +- && src_md()->data_type == dst_md()->data_type ++ && set_default_formats() == status::success ++ // ACL only supports matching src/dst (this must come after ++ // set_default_formats() to handle format_kind::any) ++ && *src_md() == *dst_md() + && utils::one_of(src_md()->data_type, data_type::f32) +- && attr()->has_default_values() +- && set_default_formats() == status::success; ++ && attr()->has_default_values(); + if (!ok) return status::unimplemented; + + // Get memory desc to find sizes and dims +-- +2.24.3 (Apple Git-128) + diff --git a/onednn.spec b/onednn.spec index 527329ce73fedb89eacf9c6b817a709335c502db..77a137f4598b20a2597812ed1aafa50740518f0f 100644 --- a/onednn.spec +++ b/onednn.spec @@ -2,13 +2,14 @@ Name: onednn Version: 2.6 -Release: 2 +Release: 3 Summary: Deep Neural Network Library License: ASL 2.0 and BSD and Boost and MIT URL: https://github.com/oneapi-src/oneDNN/ Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz +Patch0: 0001-softmax-fallback-to-ref.patch # This package only work in 64bit arches for now ExclusiveArch: x86_64 aarch64 riscv64 @@ -89,6 +90,8 @@ rm -rf %{buildroot}%{_docdir}/dnnl %{_libdir}/cmake/dnnl/*.cmake %changelog +* Mon Aug 4 2025 lilinjie - 2.6-3 +- Bug fix sync * Wed Feb 8 2023 laokz - 2.6-2 - Add riscv64 to ExclusiveArch. * Sat Aug 6 2022 wisespreading - 2.6-1