From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0oanHJs3bmDKqQAAgWs5BA (envelope-from ) for ; Thu, 08 Apr 2021 00:52:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2BNeFZs3bmC6UwAAbx9fmQ (envelope-from ) for ; Wed, 07 Apr 2021 22:52:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8F106285E1 for ; Thu, 8 Apr 2021 00:52:10 +0200 (CEST) Received: from localhost ([::1]:49820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUH1t-0003px-O9 for larch@yhetil.org; Wed, 07 Apr 2021 18:52:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUH1m-0003ph-LZ for guix-patches@gnu.org; Wed, 07 Apr 2021 18:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33939) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUH1m-000515-EJ for guix-patches@gnu.org; Wed, 07 Apr 2021 18:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUH1m-0000DG-CE for guix-patches@gnu.org; Wed, 07 Apr 2021 18:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47646] [PATCH] gnu: blis: Update to 0.8.1. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Apr 2021 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47646 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47646@debbugs.gnu.org Cc: Philip McGrath X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1617835917805 (code B ref -1); Wed, 07 Apr 2021 22:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2021 22:51:57 +0000 Received: from localhost ([127.0.0.1]:45485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUH1g-0000Cv-GI for submit@debbugs.gnu.org; Wed, 07 Apr 2021 18:51:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:51430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUH1e-0000Cm-OZ for submit@debbugs.gnu.org; Wed, 07 Apr 2021 18:51:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUH1e-0003pU-GT for guix-patches@gnu.org; Wed, 07 Apr 2021 18:51:54 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:35730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUH1c-0004uj-Ie for guix-patches@gnu.org; Wed, 07 Apr 2021 18:51:54 -0400 Received: by mail-qv1-xf35.google.com with SMTP id x27so9929249qvd.2 for ; Wed, 07 Apr 2021 15:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r+opNAQPLcZQZnOJ1VJRjnXxNTkXjen3eILZJeDqra4=; b=Uj5YrGSeJe2A7mFtyOrLSC6+jay+vYiW9/2S7WtEX8PwvHHRGpjbfNQCUVPvSH5NeK F44Vh6GafWwEc4doEfznSc6WXUG5dNY1KVdt4HiTmMkMb3Xvg88EF/RNF0Y9qjHCV7OH lDPgukSrIsNQx5GAUXCf6luB0O4CPzDmoxE8TOBJfDHsWTKJX+KzIoW5dZ4OFmL9sGkl 59ejZosyLxbQnDsS/C/X9ovY726eX0FbwZqTLZQRb3HAgxrvTKO10L1ObECGPUeEH/24 y2kHJ3KjM0m91hCWGjbN9dSIwkNwFjhQTqkQHSbYAp4gFM4Wilh7qRVZ49UDkSd3h7bf SEIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r+opNAQPLcZQZnOJ1VJRjnXxNTkXjen3eILZJeDqra4=; b=dky3ZQlU1tNQho85c5RtWZR0qNKrOMX9kXWE67lpZD+6yrkRiWc7sSmsTlSrPnZKgp +5bO62QUmnpfMsl+GJGJxe2haRb4NWRNfvmpSYVkstRiP/1b3b5PbkxAh0zqGaMeGfzt N7SHss+kqDDbtviAl4CmV8Oc7Wvpv67coxz8SQtcqqi74NnQBINFYmikcxIqPsnyl+Rq ZubpT8pwfGxo9Typ9w9xx6H82wIMpfmYHMEUNcuQxD/ghrOIpXDE12ZbCT307VmlD0eI DtHbgpJZQ0PPCP6x+j4dF6lhdfs8aCW5Yko184PFwghfr79/WYmLoMrF7E3xw9U+GCKT lGhQ== X-Gm-Message-State: AOAM533ui/29zfTrK64mCtLikPEu/50RqAfavm0jNRTj29RsLtKSxlXi wcHHt85O6FPfz4wwNYj3bBU7bG7OfcOJ1NldQ3c= X-Google-Smtp-Source: ABdhPJyrQYoS6efvYgq+G1/vxvY/8e5S1r51zpuXk816tj8W/7JkbBwu9lpzQyXSMIgFK4ATTr6baQ== X-Received: by 2002:a05:6214:1633:: with SMTP id e19mr5976481qvw.3.1617835910979; Wed, 07 Apr 2021 15:51:50 -0700 (PDT) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id a10sm8593450qtd.7.2021.04.07.15.51.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Apr 2021 15:51:50 -0700 (PDT) From: Philip McGrath Date: Wed, 7 Apr 2021 18:51:23 -0400 Message-Id: <20210407225123.17837-1-philip@philipmcgrath.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: neutral client-ip=2607:f8b0:4864:20::f35; envelope-from=philip@philipmcgrath.com; helo=mail-qv1-xf35.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617835931; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=r+opNAQPLcZQZnOJ1VJRjnXxNTkXjen3eILZJeDqra4=; b=YK97/readYDgbic3rwfQJHfe21296wZIX3UpCrOhQUQNusIacXcgKRFnVTLj72UA4vKsHe YmJXoi/iuDABw724bDxIdkJm/dWOtp2BOYYmIS2z2kpE89tc5hJcCLb5+/O5UaAzrOI1Xv oVckDGvdkdAC0pGMApLV7ENk7EUx72qC9UmTpdSrd8WSVz1S/MVqAC5iZyRHw6wt+PykJl hEDzYlhRfq0BlFTMY6dft/mXtXMiZJMzpRwpp9oUz4/wzRNUYguef0acAIzAW3aMLGHfq4 uVhAniOHrHwr1H6pufOyHTxgZ12JzS5tjf1ttUZMyprOofI9jGtHsTtXg3XqBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617835931; a=rsa-sha256; cv=none; b=eWYgzJIjqc1ZGWvL7KJrFA30W7NdFkuJViAeyqoFeYSCAR2IkBFMSCaW9ovsuotmF88frM fpoySauhrkwvmS7aYyM16rXU24H9iVDmvnEm51XgIGbRGSbQbjwVVvgcdRSKo74tZgntG/ CcuWidhQDrxc79FcMj1NgnI5fRuEMUBz5SlEj3VNWmwoQG5nVItyOSlbf5plRchGavZk9B /pCQTD+OfTubq6FgtKxTWBp6HtzyZNiGt0MUSOmbFCtLBqRB2T64eYhI5K9qcrdWPEiAQe +pfjMxWYP/wBIMMjdN5htVBKhfnFuzyiik8sCA9Ot9nhePyjdCgzrSyKzLDkaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=Uj5YrGSe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=Uj5YrGSe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8F106285E1 X-Spam-Score: -0.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: X7FHT0bWo+cM * gnu/packages/maths.scm (make-blis): Remove internal function. Inline into ... (bliss): ... this variable. Update to 0.8.1. [native-inputs]: Add "python" and "perl". [arguments]: Adjust 'configure' phase to take advantage of new support for "configuration families" with runtime hardware detection. Select configuration automatically based on target systems, and allow "--blis-config=" in #:configure-flags to override the default. When building for x86_64, include all supported microarchetecture specializations. Add "--enable-verbose-make" configure flag for better build logs. Stop ignoring other flags from #:configure-flags. Remove explicit #:substitutable? argument: the package is now always substitutable. Add (srfi srfi-1) to #:modules. (blis/x86_64): Remove internal macro. (blis-sandybridge): Remove package: included in 'blis'. (blis-haswell): Remove package: included in 'blis'. (blis-knl): Remove package: included in 'blis'. --- gnu/packages/maths.scm | 142 +++++++++++++++++++++++------------------ 1 file changed, 79 insertions(+), 63 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ff1b46f095..e7d6eef893 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -44,6 +44,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Franck Pérignon +;;; Copyright © 2021 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -3824,52 +3825,94 @@ parts of it.") (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") (license license:bsd-3))) -(define* (make-blis implementation #:optional substitutable?) - "Return a BLIS package with the given IMPLEMENTATION (see config/ in the -source tree for a list of implementations.) - -SUBSTITUTABLE? determines whether the package is made available as a -substitute. - -Currently the specialization must be selected at configure-time, but work is -underway to allow BLIS to select the right optimized kernels at run time: -." +(define-public blis (package - (name (if (string=? implementation "reference") - "blis" - (string-append "blis-" implementation))) - (version "0.2.2") + (name "blis") + (version "0.8.1") (home-page "https://github.com/flame/blis") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit version))) (sha256 (base32 - "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh")) + "05ifil6jj9424sr8kmircl8k4bmxnl3y12a79vwj1kxxva5gz50g")) (file-name (git-file-name "blis" version)))) + (native-inputs + `(("python" ,python) + ("perl" ,perl))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - - #:substitutable? ,substitutable? - - #:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This is a home-made 'configure' script. - (let ((out (assoc-ref outputs "out"))) - (invoke "./configure" "-p" out - "-d" "opt" - "--disable-static" - "--enable-shared" - "--enable-threading=openmp" - - ,implementation)))) - (add-before 'check 'show-test-output - (lambda _ - ;; By default "make check" is silent. Make it verbose. - (system "tail -F output.testsuite &") - #t))))) + `(#:modules + ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs + target + system + (configure-flags '()) + #:allow-other-keys) + ;; This is a home-made 'configure' script. + (let* ((out (assoc-ref outputs "out")) + ;; Guix-specific support for choosing the configuration + ;; via #:configure-flags: see below for details. + (config-flag-prefix "--blis-config=") + (maybe-config-flag (find + (lambda (s) + (string-prefix? config-flag-prefix s)) + configure-flags)) + (configure-flags (if maybe-config-flag + (delete maybe-config-flag + configure-flags) + configure-flags)) + ;; Select the "configuration" to build. + ;; The "generic" configuration is non-optimized but + ;; portable (no assembly). + ;; The "x86_64" configuration family includes + ;; sub-configurations for all supported + ;; x86_64 microarchitectures. + ;; BLIS currently lacks runtime hardware detection + ;; for other architectures: see + ;; . + ;; Conservatively, we stick to "generic" on armhf, + ;; aarch64, and ppc64le for now. (But perhaps + ;; "power9", "cortexa9", and "cortexa57" might be + ;; general enough to use?) + ;; Another approach would be to use the "auto" + ;; configuration and make this package + ;; non-substitutable. + ;; The build is fairly intensive, though. + (blis-config + (cond + (maybe-config-flag + (substring maybe-config-flag + (string-length config-flag-prefix))) + ((string-prefix? "x86_64" (or target system)) + "x86_64") + (else + "generic"))) + (configure-args + `("-p" ,out + "-d" "opt" + "--disable-static" + "--enable-shared" + "--enable-threading=openmp" + "--enable-verbose-make" + ,@configure-flags + ,blis-config))) + (format #t "configure args: ~s~%" configure-args) + (apply invoke + "./configure" + configure-args) + #t))) + (add-before 'check 'show-test-output + (lambda _ + ;; By default "make check" is silent. Make it verbose. + (system "tail -F output.testsuite &") + #t))))) (synopsis "High-performance basic linear algebra (BLAS) routines") (description "BLIS is a portable software framework for instantiating high-performance @@ -3881,35 +3924,8 @@ it also includes a BLAS compatibility layer which gives application developers access to BLIS implementations via traditional BLAS routine calls.") (license license:bsd-3))) -(define-public blis - ;; This is the "reference" implementation, which is the non-optimized but - ;; portable variant (no assembly). - (make-blis "reference" #t)) - (define ignorance blis) -(define-syntax-rule (blis/x86_64 processor) - "Expand to a package specialized for PROCESSOR." - (package - (inherit (make-blis processor)) - (supported-systems '("x86_64-linux")))) - -(define-public blis-sandybridge - ;; BLIS specialized for Sandy Bridge processors (launched 2011): - ;; . - (blis/x86_64 "sandybridge")) - -(define-public blis-haswell - ;; BLIS specialized for Haswell processors (launched 2013): - ;; . - (blis/x86_64 "haswell")) - -(define-public blis-knl - ;; BLIS specialized for Knights Landing processor (launched 2016): - ;; . - (blis/x86_64 "knl")) - - (define-public openlibm (package (name "openlibm") -- 2.21.1 (Apple Git-122.3)