[PATCH] WIP: Add mxnet.

  • Open
  • quality assurance status badge
Details
One participant
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 9 Mar 2020 19:25
(address . guix-patches@gnu.org)
20200309182508.14144-1-mail@ambrevar.xyz
* gnu/packages/machine-learning.scm (mxnet): New variable.
---
gnu/packages/machine-learning.scm | 62 +++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)

Toggle diff (79 lines)
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)))
--
2.25.1
P
P
Pierre Neidhardt wrote on 9 Mar 2020 19:38
Re: bug#40002: Acknowledgement ([PATCH] WIP: Add mxnet.)
(address . 40002@debbugs.gnu.org)
87a74pgyr4.fsf@ambrevar.xyz
This definitions build the library.

One obstacle: The tests take a very long time to complete, typically
some 30+ minutes on one core. But CMake has a default timeout set to
1500 sec (25 minutes). I've passed "--timeout 6000" to `ctest` to fix
it.
What do you think? It seems that it's the first package to need this.

openexr sets

Toggle snippet (3 lines)
(setenv "CTEST_TEST_TIMEOUT" "2000")

but that does not work for MXNet for some reason.

Thoughts?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5mjQ8ACgkQm9z0l6S7
zH+GKwf+NelJONcPSr8G9chYD8ffVf0N4EQei9PCUGR3SbNliHb32eNN4ND2vLqB
uJuZcbY2PVsPCOug/deYgSKjKmVxJjtrp4g9yjwp3tloaqJdkWBMAD5kzMz2ki17
m9eiNvcV8fkDpREKFZYhysm4XQ5Qw3vlxIedNwvQE5OOSl6NBxYrkEzjsJELZ1rG
PD3BARXwEuMVR/w9zMYGy7e4gVSmxdWEgL4l81TuAVutqAeKTDAMm4plm3Am+QtP
Pj8qWEhg78QFbxu7RVUwS5ltH29aq7u4SDU4hg5rXuY5fh8yW8UqMkDNyEIXkJbw
ADv5T2JxcRvN1dV+NuKknxatJZyS7g==
=aT6s
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 40002@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40002
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch