From patchwork Mon Mar 9 18:25:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 20613 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 96A6C27BBEA; Mon, 9 Mar 2020 18:26:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 44B4727BBE4 for ; Mon, 9 Mar 2020 18:26:13 +0000 (GMT) Received: from localhost ([::1]:47790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBN6S-0006S1-S5 for patchwork@mira.cbaines.net; Mon, 09 Mar 2020 14:26:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40367) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBN6K-0006Rj-1M for guix-patches@gnu.org; Mon, 09 Mar 2020 14:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBN6I-0005Ty-LZ for guix-patches@gnu.org; Mon, 09 Mar 2020 14:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBN6I-0005Tu-I7 for guix-patches@gnu.org; Mon, 09 Mar 2020 14:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jBN6I-0004Z3-DM for guix-patches@gnu.org; Mon, 09 Mar 2020 14:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40002] [PATCH] WIP: Add mxnet. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Mar 2020 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40002 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40002@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158377831917480 (code B ref -1); Mon, 09 Mar 2020 18:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2020 18:25:19 +0000 Received: from localhost ([127.0.0.1]:51451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBN5a-0004Xs-Ll for submit@debbugs.gnu.org; Mon, 09 Mar 2020 14:25:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:39816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jBN5Y-0004Xj-DH for submit@debbugs.gnu.org; Mon, 09 Mar 2020 14:25:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40284) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBN5W-0006K8-VS for guix-patches@gnu.org; Mon, 09 Mar 2020 14:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBN5V-0005CA-5v for guix-patches@gnu.org; Mon, 09 Mar 2020 14:25:14 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34151) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBN5U-00057a-WD for guix-patches@gnu.org; Mon, 09 Mar 2020 14:25:13 -0400 X-Originating-IP: 92.169.129.147 Received: from localhost.localdomain (lfbn-idf2-1-1315-147.w92-169.abo.wanadoo.fr [92.169.129.147]) (Authenticated sender: mail@ambrevar.xyz) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B2224E0002 for ; Mon, 9 Mar 2020 18:25:08 +0000 (UTC) From: Pierre Neidhardt Date: Mon, 9 Mar 2020 19:25:08 +0100 Message-Id: <20200309182508.14144-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-GND-Spam-Score: 173 X-GND-Status: SPAM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (mxnet): New variable. --- gnu/packages/machine-learning.scm | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 50c41dc113..9408c4b8e0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -60,6 +60,8 @@ #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages image) + #:use-module (gnu packages image-processing) + #:use-module (gnu packages jemalloc) #:use-module (gnu packages linux) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages maths) @@ -2121,3 +2123,63 @@ These include a barrier, broadcast, and allreduce.") technique that can be used for visualisation similarly to t-SNE, but also for general non-linear dimension reduction.") (license license:bsd-3))) + +(define-public mxnet + (package + (name "mxnet") + (version "1.6.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apache/incubator-mxnet") + (commit version) + ;; TODO: Test if possible to include system version of those deps: + ;; mkldnn + ;; openmp + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jlk0a9kls4fxxq4sap21hk6k3vhqhlflx5jm8i2amwh1z22sj09")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags '("-DUSE_CUDA=OFF") + #:parallel-build? #f ; TODO: Try rebuilding in parallel. + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; Skip tests that require internet access. + (invoke "ctest" "--timeout" "6000"))) + ;; (add-before 'check 'increase-test-timeout + ;; (lambda _ + ;; ;; TODO: Set right timeout. + ;; (setenv "CTEST_TEST_TIMEOUT" "6000") + ;; #t)) + ))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("perl" ,perl) + ;; TODO: Use our gtest + ;; ("googletest" ,googletest) + )) + (inputs + `(("lapack" ,lapack) + ("openblas" ,openblas) + ("opencv" ,opencv) + ("jemalloc" ,jemalloc))) + (home-page "https://mxnet.apache.org/") + (synopsis "Distributed/Mobile Deep Learning") + (description + "Apache MXNet (incubating) is a deep learning framework. It allows you +to mix symbolic and imperative programming. At its core, MXNet contains a +dynamic dependency scheduler that automatically parallelizes both symbolic and +imperative operations on the fly. A graph optimization layer on top of that +makes symbolic execution fast and memory efficient. MXNet is portable and +lightweight, scaling effectively to multiple GPUs and multiple machines. + +MXNet is more than a deep learning project. It is a collection of blue prints +and guidelines for building deep learning systems, and interesting insights of +DL systems for hackers.") + (license license:asl2.0)))