diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2023-12-27 13:47:10 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2024-01-01 14:35:12 +0100 |
commit | 5654f61541731442cbff191ba50e1f3c30fe89b3 (patch) | |
tree | 1fb3d65da714128bb998460d36defd27add71587 /gnu/packages/machine-learning.scm | |
parent | 71b8ed4a28c96cfd527a89d2797813f4c2b8ee4a (diff) | |
download | guix-5654f61541731442cbff191ba50e1f3c30fe89b3.tar.gz guix-5654f61541731442cbff191ba50e1f3c30fe89b3.zip |
gnu: Add xnnpack-for-torch2.
* gnu/packages/machine-learning.scm (xnnpack-for-torch2): New variable.
* gnu/packages/patches/xnnpack-for-torch2-system-libraries.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Change-Id: I1c35f5fbd064fcc6732b924d7cafaa1a7d03ce04
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 53a955bb90..c27b4b394b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3878,6 +3878,34 @@ high-level machine learning frameworks, such as TensorFlow Lite, TensorFlow.js, PyTorch, and MediaPipe.") (license license:bsd-3)))) +(define-public xnnpack-for-torch2 + ;; There's currently no tag on this repo. + (let ((version "0.0") + (commit "51a987591a6fc9f0fc0707077f53d763ac132cbf") + (revision "3")) + (package + (inherit xnnpack) + (name "xnnpack") + (version (git-version version revision commit)) + (home-page "https://github.com/google/XNNPACK") ;fork of QNNPACK + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rzby82xq8d0rl1d148yz88jh9cpsw5c8b2yw7yg39mi7qmr55rm")) + (patches (search-patches "xnnpack-for-torch2-system-libraries.patch")))) + (arguments + (list + #:tests? #false + #:configure-flags '(list "-DXNNPACK_USE_SYSTEM_LIBS=YES" + "-DBUILD_SHARED_LIBS=ON" + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + "-DXNNPACK_LIBRARY_TYPE=shared" + "-DXNNPACK_BUILD_TESTS=FALSE" ;FIXME: see below + "-DXNNPACK_BUILD_BENCHMARKS=FALSE")))))) + ;; Please also update python-torchvision when updating this package. (define-public python-pytorch (package |