[neon/backports-noble/xnnpack-noble/Neon/unstable] debian: backport xnnpack for onnxruntime for pipewire for kwin
Carlos De Maine
null at kde.org
Sat Sep 26 08:58:12 BST 2026
Git commit 6c0224d5bd0865ced00ce442ba5c4ffe02f1150e by Carlos De Maine.
Committed on 26/09/2026 at 07:58.
Pushed by carlosdem into branch 'Neon/unstable'.
backport xnnpack for onnxruntime for pipewire for kwin
A +189 -0 debian/changelog
A +49 -0 debian/control
A +61 -0 debian/copyright
A +3 -0 debian/libxnnpack-dev.install
A +1 -0 debian/libxnnpack0.20241108.install
A +16 -0 debian/not-installed
A +37 -0 debian/patches/fix-aarch64-ftbfs-gcc13.patch
A +2 -0 debian/patches/series
A +17 -0 debian/patches/soversion.patch
A +22 -0 debian/rules
A +1 -0 debian/source/format
A +5 -0 debian/watch
https://invent.kde.org/neon/backports-noble/xnnpack-noble/-/commit/6c0224d5bd0865ced00ce442ba5c4ffe02f1150e
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..43db3eb
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,189 @@
+xnnpack (0.0~git20241108.4ea82e5-1) unstable; urgency=medium
+
+ * d/control: add myself in uploaders
+ * Upload to unstable.
+
+ -- Shengqi Chen <harry at debian.org> Mon, 17 Feb 2025 23:45:51 +0800
+
+xnnpack (0.0~git20241108.4ea82e5-1~exp2) experimental; urgency=medium
+
+ * Team upload.
+ * d/patches: backport FTBFS fix with GCC 13 on arm64 from upstream
+
+ -- Shengqi Chen <harry at debian.org> Sun, 26 Jan 2025 00:01:33 +0800
+
+xnnpack (0.0~git20241108.4ea82e5-1~exp1) experimental; urgency=medium
+
+ * Team upload.
+ * New upstream version 0.0~git20241108.4ea82e5
+ Please use this snapshot for PyTorch/2.6+ releases.
+ * Install libmicrokernels-prod.a in libxnnpack-dev
+ * d/control: use correct std-ver 4.7.0
+ * Bump SOVERSION to libxnnpack0.20241108 to reflect API changes
+ * d/copyright: add new author names according to upstream
+
+ -- Shengqi Chen <harry at debian.org> Fri, 24 Jan 2025 13:57:27 +0800
+
+xnnpack (0.0~git20240821.87ee0b4-3) unstable; urgency=medium
+
+ * Team upload.
+ * Mark libxnnpack0 as "Multi-Arch: same"
+
+ -- Dylan Aïssi <daissi at debian.org> Tue, 21 Jan 2025 12:23:32 +0100
+
+xnnpack (0.0~git20240821.87ee0b4-2) unstable; urgency=medium
+
+ * Team upload.
+ * d/rules: disable kleidiai to fix build on arm64 (see: #1081414)
+ * d/rules: add exception in CFLAGS to fix build on arm{hf,64}
+
+ -- Shengqi Chen <harry-chen at outlook.com> Wed, 11 Sep 2024 21:45:39 +0800
+
+xnnpack (0.0~git20240821.87ee0b4-1) unstable; urgency=medium
+
+ [ Shengqi Chen ]
+ * Team upload.
+ * New upstream version 0.0~git20240821.87ee0b4
+ Please use this snapshot for PyTorch/2.4.X releases.
+ * d/patches: refresh patch and add DEP3 header
+ * d/control:
+ + add python3 in B-D, limit architecture to supported platforms
+ + bump std-ver to 4.7.0.1 (no changes required)
+ * d/rules:
+ + fix indentation
+ + remove override_dh_dwz which is now unnecessary
+ + fix wrong hardening flags
+ * d/copyright: remove unused BSD-2-Clause paragraph
+
+ [ Aron Xu ]
+ * d/rules: disable tests for known failures
+
+ -- Shengqi Chen <harry-chen at outlook.com> Thu, 05 Sep 2024 00:26:23 +0800
+
+xnnpack (0.0~git20240229.fcbf55a-1~exp1) experimental; urgency=medium
+
+ * New upstream version 0.0~git20240229.fcbf55a
+ + Please pin to this snapshot for PyTorch/2.3.X release.
+ * Refresh existing patches.
+ * Add new cmake flags to avoid cmake failure.
+ * Add version requirement to pthreadpool.
+ * Bump version requirement on B-D cpuinfo.
+ * Add a file in not-installed.
+ * Upload to experimental.
+
+ -- Mo Zhou <lumin at debian.org> Thu, 11 Jul 2024 01:05:18 -0400
+
+xnnpack (0.0~git20221221.51a9875-1) unstable; urgency=medium
+
+ * New upstream version 0.0~git20221221.51a9875
+ + Please pin to this snapshot for the PyTorch/v2.0.X release.
+ * Rebase existing patches.
+ * rules: Specify -fPIC and shared library build to prevent link failure.
+
+ -- Mo Zhou <lumin at debian.org> Fri, 18 Aug 2023 18:22:47 -0400
+
+xnnpack (0.0~git20220216.ae108ef-2) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Mo Zhou <lumin at debian.org> Sat, 25 Jun 2022 20:11:28 -0700
+
+xnnpack (0.0~git20220216.ae108ef-1) experimental; urgency=medium
+
+ * New upstream version 0.0~git20220216.ae108ef
+ Please pin to this snapshot for PyTorch/v1.12.0~rc1
+ * Remove already merged patches.
+ * Rebase soversion.patch
+ * Resolve superfluous-file-pattern in d/copyright
+ * Put binary packages to correct Sections.
+ * Add changelog entry for the 0.0~git20201221.e1ffe15-2.1 NMU.
+ Many thanks to Adrian Bunk!
+ * Upload to experimental.
+
+ -- Mo Zhou <lumin at debian.org> Sun, 22 May 2022 17:56:02 -0400
+
+xnnpack (0.0~git20201221.e1ffe15-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add upstream fix for FTBFS with gcc 11. (Closes: #997271)
+
+ -- Adrian Bunk <bunk at debian.org> Tue, 28 Dec 2021 20:29:08 +0200
+
+xnnpack (0.0~git20201221.e1ffe15-2) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Mo Zhou <lumin at debian.org> Thu, 02 Sep 2021 02:12:54 +0000
+
+xnnpack (0.0~git20201221.e1ffe15-1) experimental; urgency=medium
+
+ * New upstream version 0.0~git20201221.e1ffe15
+ Please pin to this snapshot for PyTorch/v1.8.1
+ * Remove 533.patch (merged upstream) and refresh remaining patches.
+ * Add PyTorch/v1.8.1 upstream patches.
+
+ -- Mo Zhou <lumin at debian.org> Wed, 19 May 2021 13:02:03 +0800
+
+xnnpack (0.0~git20201031.beca652+really.git20200323.1b35463-2) unstable; urgency=medium
+
+ * Don't install unwanted header files.
+ * Revert "Remove 533.patch (merged upstream) and refresh the remaining ones."
+ We need this patch again due to the rollback.
+
+ -- Mo Zhou <lumin at debian.org> Fri, 11 Dec 2020 13:50:30 +0800
+
+xnnpack (0.0~git20201031.beca652+really.git20200323.1b35463-1) unstable; urgency=medium
+
+ * Rollback to upstream snapshot 0.0~git20200323.1b35463
+ * Please pin to this snapshot for PyTorch 1.7.0
+ * Rebase existing patches.
+ * Stop tracking symbols, and update not-installed list.
+
+ -- Mo Zhou <lumin at debian.org> Fri, 11 Dec 2020 12:33:46 +0800
+
+xnnpack (0.0~git20201031.beca652-1) unstable; urgency=medium
+
+ * New upstream snapshot 0.0~git20201031.beca652
+ * Change maintainer into Debian Deep Learning Team <debian-ai at l.d.o>.
+ * Refresh symbols list for amd64 architecture.
+
+ -- Mo Zhou <lumin at debian.org> Mon, 02 Nov 2020 16:02:16 +0800
+
+xnnpack (0.0~git20200827.37297a6-1) unstable; urgency=medium
+
+ * New upstream version 0.0~git20200827.37297a6
+ * Remove 533.patch (merged upstream) and refresh the remaining ones.
+ * Refresh symbols control file.
+
+ -- Mo Zhou <lumin at debian.org> Thu, 03 Sep 2020 10:37:10 +0800
+
+xnnpack (0.0~git20200425.54f5917-4) unstable; urgency=medium
+
+ * Strip and embedded clog and remove the corresponding patch.
+ * Bump debhelper compat level to 13.
+ * Remove README.Source, as the embedded clog has been removed.
+
+ -- Mo Zhou <lumin at debian.org> Fri, 01 May 2020 14:11:14 +0800
+
+xnnpack (0.0~git20200425.54f5917-3) unstable; urgency=medium
+
+ * Make the symbols control file amd64-only.
+ * Override dh_dwz and allow it to fail on arm64.
+
+ -- Mo Zhou <lumin at debian.org> Thu, 30 Apr 2020 11:42:31 +0800
+
+xnnpack (0.0~git20200425.54f5917-2) unstable; urgency=medium
+
+ * Fixup the clog patch (it was empty in the previous upload due to mistake)
+ * Apply wrap-and-srot.
+ * Create symbols control file for libXNNPACK.so
+ * List not-installed files.
+ * Upload to unstable.
+
+ -- Mo Zhou <lumin at debian.org> Wed, 29 Apr 2020 09:27:23 +0800
+
+xnnpack (0.0~git20200425.54f5917-1) experimental; urgency=medium
+
+ * Initial release. (Closes: #958818)
+
+ -- Mo Zhou <lumin at debian.org> Sun, 26 Apr 2020 15:04:57 +0800
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..a76075e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,49 @@
+Source: xnnpack
+Section: math
+Homepage: https://github.com/google/XNNPACK
+Priority: optional
+Standards-Version: 4.7.0
+Vcs-Git: https://salsa.debian.org/deeplearning-team/xnnpack.git
+Vcs-Browser: https://salsa.debian.org/deeplearning-team/xnnpack
+Maintainer: Debian Deep Learning Team <debian-ai at lists.debian.org>
+Uploaders: Mo Zhou <lumin at debian.org>, Shengqi Chen <harry at debian.org>
+Rules-Requires-Root: no
+Build-Depends: cmake,
+ debhelper-compat (= 13),
+ googletest,
+ libcpuinfo-dev (>= 0.0~git20231104.d6860c4~),
+ libfp16-dev,
+ libfxdiv-dev,
+ libpsimd-dev,
+ libpthreadpool-dev (>= 0.0~git20240616.560c60d~),
+ ninja-build,
+ python3
+
+Package: libxnnpack-dev
+Section: libdevel
+Architecture: amd64 i386 x32 armhf arm64 riscv64
+Depends: libxnnpack0.20241108 (= ${binary:Version}), ${misc:Depends}
+Description: High-efficiency floating-point neural network inference operators (dev)
+ XNNPACK is a highly optimized library of floating-point neural network
+ inference operators for ARM, WebAssembly, and x86 platforms. XNNPACK is not
+ intended for direct use by deep learning practitioners and researchers; instead
+ it provides low-level performance primitives for accelerating high-level
+ machine learning frameworks, such as TensorFlow Lite, TensorFlow.js, PyTorch,
+ and MediaPipe.
+ .
+ This package contains the development files.
+
+Package: libxnnpack0.20241108
+Section: libs
+Architecture: amd64 i386 x32 armhf arm64 riscv64
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: High-efficiency floating-point neural network inference operators (libs)
+ XNNPACK is a highly optimized library of floating-point neural network
+ inference operators for ARM, WebAssembly, and x86 platforms. XNNPACK is not
+ intended for direct use by deep learning practitioners and researchers; instead
+ it provides low-level performance primitives for accelerating high-level
+ machine learning frameworks, such as TensorFlow Lite, TensorFlow.js, PyTorch,
+ and MediaPipe.
+ .
+ This package contains the shared object.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..5a3a212
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,61 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: XNNPACK
+Source: https://github.com/google/XNNPACK
+
+Files: *
+Copyright: 2019-2024, Google LLC
+ Facebook, Inc. and its affiliates.
+ 2018, Marat Dukhan
+ 2024, Imagination Technologies, Inc.
+ 2023, 2024, SiFive, Inc.
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: 2020-2022, Mo Zhou <lumin at debian.org>
+ 2024-2025, Shengqi Chen <harry at debian.org>
+License: Expat
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+ .
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ * Neither the name Facebook nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific
+ prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/debian/libxnnpack-dev.install b/debian/libxnnpack-dev.install
new file mode 100644
index 0000000..ddcc2f2
--- /dev/null
+++ b/debian/libxnnpack-dev.install
@@ -0,0 +1,3 @@
+usr/include/xnnpack.h
+usr/lib/*/libXNNPACK.so
+usr/lib/*/libmicrokernels-prod.a
diff --git a/debian/libxnnpack0.20241108.install b/debian/libxnnpack0.20241108.install
new file mode 100644
index 0000000..88b57d4
--- /dev/null
+++ b/debian/libxnnpack0.20241108.install
@@ -0,0 +1 @@
+usr/lib/*/libXNNPACK.so.*
diff --git a/debian/not-installed b/debian/not-installed
new file mode 100644
index 0000000..7fcc540
--- /dev/null
+++ b/debian/not-installed
@@ -0,0 +1,16 @@
+usr/lib/*/libclog.a
+usr/include/clog.h
+usr/lib/*/libcpuinfo*
+usr/lib/*/libpthreadpool*
+usr/include/cpuinfo.h
+usr/include/fp16.h
+usr/include/fp16/__init__.py
+usr/include/fp16/avx.py
+usr/include/fp16/avx2.py
+usr/include/fp16/bitcasts.h
+usr/include/fp16/fp16.h
+usr/include/fp16/psimd.h
+usr/include/fxdiv.h
+usr/include/psimd.h
+usr/include/pthreadpool.h
+usr/include/experiments-config.h
diff --git a/debian/patches/fix-aarch64-ftbfs-gcc13.patch b/debian/patches/fix-aarch64-ftbfs-gcc13.patch
new file mode 100644
index 0000000..1633b01
--- /dev/null
+++ b/debian/patches/fix-aarch64-ftbfs-gcc13.patch
@@ -0,0 +1,37 @@
+Author: XNNPACK Team <xnnpack-github-robot at google.com>
+Date: Mon, 25 Nov 2024 13:00:56 -0800
+Description: Fix FTBFS with GCC 13 on aarch64
+Forwarded: https://github.com/google/XNNPACK/issues/7489
+Applied-Upstream: https://github.com/google/XNNPACK/commit/5f23827e66cca435fa400b6e221892ac95af0079
+---
+
+--- a/src/reference/unary-elementwise.cc
++++ b/src/reference/unary-elementwise.cc
+@@ -127,6 +127,16 @@
+ }
+ };
+
++#ifdef XNN_HAVE_FLOAT16
++template <>
++struct ConvertOp<xnn_bfloat16, _Float16> {
++ explicit ConvertOp(const xnn_unary_uparams*) {}
++ _Float16 operator()(xnn_bfloat16 x) const {
++ return static_cast<_Float16>(static_cast<float>(x));
++ }
++};
++#endif
++
+ template <typename TIn, typename TOut>
+ const xnn_unary_elementwise_config* get_convert_config(
+ std::true_type /*input_quantized*/, std::true_type /*output_quantized*/) {
+--- a/src/xnnpack/simd/s16-neon.h
++++ b/src/xnnpack/simd/s16-neon.h
+@@ -70,7 +70,7 @@
+ v_low = vget_high_s16(v);
+ }
+ if (num_elements & 2) {
+- vst1_lane_s32((void*) output, vreinterpret_s32_s16(v_low), 0);
++ vst1_lane_s32((int32_t*) output, vreinterpret_s32_s16(v_low), 0);
+ output += 2;
+ v_low = vext_s16(v_low, v_low, 2);
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ae14ec0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+soversion.patch
+fix-aarch64-ftbfs-gcc13.patch
diff --git a/debian/patches/soversion.patch b/debian/patches/soversion.patch
new file mode 100644
index 0000000..428367e
--- /dev/null
+++ b/debian/patches/soversion.patch
@@ -0,0 +1,17 @@
+Description: Add soversion to built library
+Author: Mo Zhou <lumin at debian.org>
+Forwarded: not-needed
+Last-Update: 2024-09-04
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -837,7 +837,7 @@
+ TARGET_LINK_LIBRARIES(subgraph PRIVATE xnnpack-base allocator logging memory mutex operators operator-run datatype)
+ TARGET_LINK_LIBRARIES(XNNPACK PRIVATE xnnpack-base allocator cache hardware-config indirection memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing microkernels-prod subgraph datatype reference-ukernels)
+ TARGET_LINK_LIBRARIES(XNNPACK PUBLIC pthreadpool logging)
+- SET_TARGET_PROPERTIES(XNNPACK PROPERTIES C_EXTENSIONS YES)
++ SET_TARGET_PROPERTIES(XNNPACK PROPERTIES C_EXTENSIONS YES VERSION 0.20241108)
+ ENDIF()
+ IF(NOT MSVC)
+ SET_PROPERTY(SOURCE ${ALL_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-math-errno ")
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..bb654d4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+# upstream CI has numerous warnings, do not treat as errors.
+export DEB_CFLAGS_MAINT_APPEND = -fPIC -Wno-incompatible-pointer-types
+
+%:
+ dh $@ -Scmake+ninja
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ -DXNNPACK_LIBRARY_TYPE=shared \
+ -DXNNPACK_USE_SYSTEM_LIBS=ON \
+ -DXNNPACK_BUILD_TESTS=OFF \
+ -DXNNPACK_BUILD_BENCHMARKS=OFF \
+ -DXNNPACK_ENABLE_KLEIDIAI=OFF \
+ -DGOOGLETEST_SOURCE_DIR=/usr/src/googletest \
+ -DPTHREADPOOL_SOURCE_DIR=/usr \
+ -DCPUINFO_SOURCE_DIR=/usr
+
+override_dh_auto_test:
+ #dh_auto_test
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ad7509d
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="mode=git, pgpmode=none" \
+https://github.com/google/XNNPACK \
+HEAD debian uupdate
+
More information about the Neon-commits
mailing list