From: Adam Faiz via Guix-patches via <guix-patches@gnu.org>
To: 65553@debbugs.gnu.org
Subject: [bug#65553] [PATCH 6/6] gnu: Add arrayfire.
Date: Sun, 27 Aug 2023 02:56:34 +0800 [thread overview]
Message-ID: <7a3dab74-0e1d-e2a5-ef82-89ca5d4df952@disroot.org> (raw)
In-Reply-To: <ce063967-c2d3-f383-e67e-057d941901e9@disroot.org>
From 0d1c25484158655344cbfbdc1e3e503be23654d1 Mon Sep 17 00:00:00 2001
Message-ID: <0d1c25484158655344cbfbdc1e3e503be23654d1.1693075221.git.adam.faiz@disroot.org>
In-Reply-To: <cover.1693075221.git.adam.faiz@disroot.org>
References: <cover.1693075221.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sun, 27 Aug 2023 02:12:03 +0800
Subject: [PATCH 6/6] gnu: Add arrayfire.
* gnu/packages/machine-learning.scm (arrayfire): New variable.
---
gnu/packages/machine-learning.scm | 71 +++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 6251ea9206..e2ca22821b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -69,6 +69,8 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages cran)
#:use-module (gnu packages databases)
#:use-module (gnu packages dejagnu)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
@@ -85,6 +87,7 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages logging)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages ninja)
@@ -93,6 +96,7 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages parallel)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
@@ -3102,6 +3106,73 @@ (define-public tensorflow-lite
devices.")
(license license:asl2.0)))
+(define-public arrayfire
+ (package
+ (name "arrayfire")
+ (version "3.8.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arrayfire/arrayfire.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1fvd0jvg49inhqx0mcqrfsfnqvc3n0pgnym5gina5svgh293n68a"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(\\$.*\\)") "")
+ (("NO_CMAKE_PACKAGE_REGISTRY") "")
+ (("include\\(AFconfigure_deps_vars\\)")
+ (string-append "macro(af_dep_check_and_populate dep_prefix)\n"
+ "endmacro()"))
+ (("....assets_prefix._SOURCE_DIR.")
+ "$ENV{ARRAYFIRE_DOCS_PREFIX}"))
+ (substitute* "test/CMakeLists.txt"
+ (("include\\(download_sparse_datasets\\)") ""))
+ (substitute* "CMakeModules/FindFFTW.cmake"
+ (("FFTWF_LIBRARY\\)") ")"))
+ (substitute* "src/backend/cpu/CMakeLists.txt"
+ (("....threads_prefix._.*hpp") ""))))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list arrayfire-docs
+ doxygen
+ googletest
+ pkg-config))
+ (inputs
+ (list arrayfire-forge
+ arrayfire-glad
+ arrayfire-threads
+ boost
+ fftw
+ fmt
+ fontconfig
+ freeimage
+ glfw
+ lapack
+ libomp
+ openblas
+ span-lite
+ spdlog))
+ (arguments
+ (list #:configure-flags
+ #~(list "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'set-envs
+ (lambda _
+ (setenv "ARRAYFIRE_DOCS_PREFIX"
+ #$(this-package-native-input "arrayfire-docs")))))))
+ (home-page "https://arrayfire.com/")
+ (synopsis "General purpose tensor library")
+ (description "ArrayFire is a general-purpose tensor library that simplifies
+the process of software development for the parallel architectures found in
+CPUs, GPUs, and other hardware acceleration devices.")
+ (license license:bsd-3)))
+
(define-public arrayfire-docs
(let ((commit "cd08d749611b324012555ad6f23fd76c5465bd6c")
(revision "0"))
--
2.41.0
next prev parent reply other threads:[~2023-08-26 18:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 18:46 [bug#65553] [PATCH 0/6] gnu: Add arrayfire Adam Faiz via Guix-patches via
2023-08-26 18:50 ` [bug#65553] [PATCH 1/6] gnu: Add arrayfire-glad Adam Faiz via Guix-patches via
2023-08-26 18:51 ` [bug#65553] [PATCH 2/6] gnu: Add span-lite Adam Faiz via Guix-patches via
2023-08-26 18:52 ` [bug#65553] [PATCH 3/6] gnu: Add arrayfire-threads Adam Faiz via Guix-patches via
2023-08-26 18:53 ` [bug#65553] [PATCH 4/6] gnu: Add arrayfire-forge Adam Faiz via Guix-patches via
2023-08-26 18:55 ` [bug#65553] [PATCH 5/6] gnu: Add arrayfire-docs Adam Faiz via Guix-patches via
2023-08-26 18:56 ` Adam Faiz via Guix-patches via [this message]
2023-08-26 19:18 ` [bug#65553] [PATCH 0/6] gnu: Add arrayfire Saku Laesvuori via Guix-patches via
2023-08-28 6:30 ` Adam Faiz via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a3dab74-0e1d-e2a5-ef82-89ca5d4df952@disroot.org \
--to=guix-patches@gnu.org \
--cc=65553@debbugs.gnu.org \
--cc=adam.faiz@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).