[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
69/203: gnu: tensorflow: Enable parallel build (at least partially).
From: |
guix-commits |
Subject: |
69/203: gnu: tensorflow: Enable parallel build (at least partially). |
Date: |
Wed, 3 Nov 2021 21:10:02 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 34996248067f2f3093a63814234ec94220ca63ce
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Oct 9 00:19:56 2021 -0400
gnu: tensorflow: Enable parallel build (at least partially).
There are still many parts of the build that happen sequentially, but at
least
this hastens the long build somewhat.
* gnu/packages/machine-learning.scm (tensorflow)[phases]: Remove trailing
#t.
{build-pip-package}: Honor the PARALLEL-BUILD? argument.
---
gnu/packages/machine-learning.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index d714280..11c9b02 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1730,7 +1730,7 @@ Python.")
((guix build python-build-system)
#:select (python-version)))
#:imported-modules (,@%cmake-build-system-modules
- (guix build python-build-system))
+ (guix build python-build-system))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-source-file-times-to-1980
@@ -1853,8 +1853,7 @@ set(eigen_INCLUDE_DIRS
${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
(("tf_core_cpu grpc") "tf_core_cpu"))
;; This directory is a dependency of many targets.
- (mkdir-p "protobuf")
- #t))
+ (mkdir-p "protobuf")))
(add-after 'configure 'unpack-third-party-sources
(lambda* (#:key inputs #:allow-other-keys)
;; This is needed to configure bundled packages properly.
@@ -1932,17 +1931,20 @@ COMPILE_FLAGS ${target_compile_flags} \
INSTALL_RPATH_USE_LINK_PATH TRUE \
INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))))
(add-after 'build 'build-pip-package
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key outputs parallel-build? #:allow-other-keys)
(setenv "LDFLAGS"
(string-append "-Wl,-rpath="
(assoc-ref outputs "out") "/lib"))
- (invoke "make" "tf_python_build_pip_package")))
+ (invoke "make" "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")
+ "tf_python_build_pip_package")))
(add-after 'build-pip-package 'install-python
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(wheel (car (find-files "../build/tf_python/dist/"
"\\.whl$")))
(python-version (python-version
- (assoc-ref inputs "python"))))
+ (assoc-ref inputs "python"))))
(invoke "python" "-m" "pip" "install" wheel
(string-append "--prefix=" out))
- 164/203: gnu: gdb: Update to 11.1 and remove gdb-9.2., (continued)
- 164/203: gnu: gdb: Update to 11.1 and remove gdb-9.2., guix-commits, 2021/11/03
- 165/203: gnu: ldc: Update to 1.27.1., guix-commits, 2021/11/03
- 166/203: gnu: python2-lit: Remove package., guix-commits, 2021/11/03
- 167/203: gnu: python-lit: Update to 12.0.1., guix-commits, 2021/11/03
- 169/203: gnu: Add meson-0.59., guix-commits, 2021/11/03
- 181/203: gnu: accountsservice: Use meson 0.59.4 to work around a bug in 0.60.0., guix-commits, 2021/11/03
- 188/203: gnu: gnome-online-accounts: Update to 3.43.1., guix-commits, 2021/11/03
- 195/203: gnu: openblas: Update to 0.3.18., guix-commits, 2021/11/03
- 197/203: gnu: ansible-core: Update to 2.11.6., guix-commits, 2021/11/03
- 57/203: gnu: Add a missing copyright., guix-commits, 2021/11/03
- 69/203: gnu: tensorflow: Enable parallel build (at least partially).,
guix-commits <=
- 61/203: gnu: gst-plugins-base: Update to 1.18.5., guix-commits, 2021/11/03
- 64/203: gnu: gst-plugins-ugly: Update to 1.18.5., guix-commits, 2021/11/03
- 68/203: gnu: gstreamer-docs: Update to 1.18.5., guix-commits, 2021/11/03
- 73/203: bluez: Update to 5.61., guix-commits, 2021/11/03
- 75/203: gnu: glibc: Remove unneeded nscd patching., guix-commits, 2021/11/03
- 80/203: gnu: diffutils: Update to 3.8., guix-commits, 2021/11/03
- 76/203: gnu: glibc: Look for the current timezone in /etc/localtime., guix-commits, 2021/11/03
- 84/203: gnu: make-ld-wrapper: Add a LINKER argument., guix-commits, 2021/11/03
- 86/203: gnu: gdb: Patch references to /bin/sh and add debug output., guix-commits, 2021/11/03
- 87/203: gnu: gdb: Normalize indentation., guix-commits, 2021/11/03