[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#69591] [PATCH 20/31] gnu: Add qnnpack.
From: |
David Elsing |
Subject: |
[bug#69591] [PATCH 20/31] gnu: Add qnnpack. |
Date: |
Wed, 6 Mar 2024 19:40:26 +0000 |
* gnu/packages/machine-learning.scm (qnnpack): New variable.
---
gnu/packages/machine-learning.scm | 49 +++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index 5825955d3e..c883af54d9 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4024,6 +4024,55 @@ (define-public nnpack
(supported-systems '("x86_64-linux" "armhf-linux" "aarch64-linux"))
(license license:bsd-2))))
+(define-public qnnpack
+ (let ((commit "7d2a4e9931a82adc3814275b6219a03e24e36b4c")
+ (revision "0"))
+ (package
+ (name "qnnpack")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pytorch/qnnpack")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1dgzriiaz9arsrfwhx42y4l74wbzn6xvdmllfb66v4pmvi5gpxc5"))
+ (modules '((guix build utils)))
+ (snippet
+ '(delete-file-recursively "deps"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; The shared library build fails with linker errors, so we build the
+ ;; static library with -fPIC as in the bundled PyTorch version.
+ #:configure-flags
+ ''("-DQNNPACK_LIBRARY_TYPE=static"
+ "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("IF.*SOURCE_DIR.*")
+ "IF(FALSE)\n")
+ (("IF\\(NOT TARGET.*")
+ "IF(FALSE)\n")
+ (("TARGET_LINK_LIBRARIES.*(fxdiv|psimd|fp16)\\).*")
+ "")
+ (("(TARGET_LINK_LIBRARIES.*) fp16 (.*)" _ before after)
+ (string-append before " " after))))))))
+ (inputs (list clog cpuinfo fp16 fxdiv psimd pthreadpool))
+ (native-inputs (list googletest googlebenchmark))
+ (home-page "https://github.com/pytorch/qnnpack")
+ (synopsis "Quantized Neural Network PACKage")
+ (description "QNNPACK is a library for low-precision neural network
+inference. It contains the implementation of common neural network operators
+on quantized 8-bit tensors.")
+ (license license:bsd-3))))
+
(define-public xnnpack
;; There's currently no tag on this repo.
(let ((version "0.0")
--
2.41.0
- [bug#69591] [PATCH 06/31] gnu: Add python-expecttest., (continued)
- [bug#69591] [PATCH 06/31] gnu: Add python-expecttest., David Elsing, 2024/03/06
- [bug#69591] [PATCH 08/31] gnu: Add miniz., David Elsing, 2024/03/06
- [bug#69591] [PATCH 11/31] gnu: Remove flatbuffers-next-shared., David Elsing, 2024/03/06
- [bug#69591] [PATCH 16/31] gnu: nnpack: Update to commit 70a77f4., David Elsing, 2024/03/06
- [bug#69591] [PATCH 14/31] gnu: cpuinfo: Update to commit aa4b216., David Elsing, 2024/03/06
- [bug#69591] [PATCH 12/31] gnu: python-flatbuffers-next: Update to 23.5.26., David Elsing, 2024/03/06
- [bug#69591] [PATCH 22/31] gnu: Add ideep-pytorch., David Elsing, 2024/03/06
- [bug#69591] [PATCH 13/31] gnu: pthreadpool: Update to commit 178e3e0., David Elsing, 2024/03/06
- [bug#69591] [PATCH 23/31] gnu: xnnpack: Update to commit 51a9875., David Elsing, 2024/03/06
- [bug#69591] [PATCH 15/31] gnu: clog: Add "-DUSE_SYSTEM_LIBS=ON" configure flag., David Elsing, 2024/03/06
- [bug#69591] [PATCH 20/31] gnu: Add qnnpack.,
David Elsing <=
- [bug#69591] [PATCH 17/31] gnu: oneapi-dnnl: Update to 3.3.5., David Elsing, 2024/03/06
- [bug#69591] [PATCH 25/31] gnu: Add qnnpack-pytorch., David Elsing, 2024/03/06
- [bug#69591] [PATCH 19/31] gnu: Add fbgemm., David Elsing, 2024/03/06
- [bug#69591] [PATCH 30/31] gnu: Add qnnpack-pytorch-for-r-torch., David Elsing, 2024/03/06
- [bug#69591] [PATCH 26/31] gnu: python-pytorch: Update to 2.2.1 and unbundle dependencies., David Elsing, 2024/03/06
- [bug#69591] [PATCH 27/31] gnu: python-torchvision: Update to 0.17.1., David Elsing, 2024/03/06
- [bug#69591] [PATCH 18/31] gnu: Add tensorpipe., David Elsing, 2024/03/06
- [bug#69591] [PATCH 24/31] gnu: Remove xnnpack-for-torch2., David Elsing, 2024/03/06
- [bug#69591] [PATCH 29/31] gnu: Add oneapi-dnnl-for-r-torch., David Elsing, 2024/03/06
- [bug#69591] [PATCH 21/31] gnu: Add foxi., David Elsing, 2024/03/06