From patchwork Sat Aug 26 18:56:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Faiz X-Patchwork-Id: 53237 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0137227BBE9; Sat, 26 Aug 2023 19:57:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A0C1427BBE2 for ; Sat, 26 Aug 2023 19:57:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZySy-00044O-PX; Sat, 26 Aug 2023 14:57:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZySw-000449-3A for guix-patches@gnu.org; Sat, 26 Aug 2023 14:56:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZySv-0007Ie-8Y for guix-patches@gnu.org; Sat, 26 Aug 2023 14:56:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZyT0-0007cx-Gf for guix-patches@gnu.org; Sat, 26 Aug 2023 14:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65553] [PATCH 6/6] gnu: Add arrayfire. References: In-Reply-To: Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Aug 2023 18:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65553 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65553@debbugs.gnu.org Received: via spool by 65553-submit@debbugs.gnu.org id=B65553.169307620829297 (code B ref 65553); Sat, 26 Aug 2023 18:57:02 +0000 Received: (at 65553) by debbugs.gnu.org; 26 Aug 2023 18:56:48 +0000 Received: from localhost ([127.0.0.1]:43427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZySl-0007cR-3U for submit@debbugs.gnu.org; Sat, 26 Aug 2023 14:56:47 -0400 Received: from layka.disroot.org ([178.21.23.139]:44688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZySi-0007cJ-Ir for 65553@debbugs.gnu.org; Sat, 26 Aug 2023 14:56:45 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id BF04140BE2 for <65553@debbugs.gnu.org>; Sat, 26 Aug 2023 20:56:38 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zgi3bwdXQLF4 for <65553@debbugs.gnu.org>; Sat, 26 Aug 2023 20:56:37 +0200 (CEST) Message-ID: <7a3dab74-0e1d-e2a5-ef82-89ca5d4df952@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1693076197; bh=oA90SP5QYGZQQ6zYXrDc6bB+cI7sxROHKGR4ibAjaEU=; h=Date:To:From:Subject; b=RYHVxZVgO7BlZsjCOVIfXVUr7VCTu5wVkZ2mwGgeDf4B46lUHEXIRqcHBxAKbgFrE U4C+DaLBQzs+31hmlvrV0k2Nn2Yeh2TnwqC1wbwN4a9iHOw8o16vLlNPnvrB/+SmGQ kk/ldVnp9hDtsf9iXgN5HGJZpe8dsiKIDAU7gvlE3+75+x3jmVxV4kLsW2Zjfloezo GNDhknm90AmSisBRgtuiHloOqLPya+WOSi7h7wFQE5MWmdYCnt4h9C4rJtb0Fvp0e3 PMldhtfgPzjTZjLesrzHBFOp8QJL4ViGlUZBJ0XtFcH43CVU5QFazHJ47f52KclUof 4VBx4lpMEkwPw== Date: Sun, 27 Aug 2023 02:56:34 +0800 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches X-Patchwork-Original-From: Adam Faiz via Guix-patches via From: Adam Faiz Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 0d1c25484158655344cbfbdc1e3e503be23654d1 Mon Sep 17 00:00:00 2001 Message-ID: <0d1c25484158655344cbfbdc1e3e503be23654d1.1693075221.git.adam.faiz@disroot.org> In-Reply-To: References: From: AwesomeAdam54321 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"))