[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
69/136: gnu: tensorflow: Enable parallel build (at least partially).
From: |
guix-commits |
Subject: |
69/136: gnu: tensorflow: Enable parallel build (at least partially). |
Date: |
Sun, 17 Oct 2021 05:16:05 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 92fc9461a949b5525047a0585cc83da16b22eea9
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))
- 118/136: gnu: cmake-bootstrap: Update to 3.21.3., (continued)
- 118/136: gnu: cmake-bootstrap: Update to 3.21.3., guix-commits, 2021/10/17
- 123/136: gnu: pango: Update to 1.48.10., guix-commits, 2021/10/17
- 125/136: gnu: glib: Update to 2.70, specify a bindir prefix and hide package., guix-commits, 2021/10/17
- 132/136: gnu: gtk: Add the generate-gdk-pixbuf-loaders-cache-file phase., guix-commits, 2021/10/17
- 133/136: build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase., guix-commits, 2021/10/17
- 134/136: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/10/17
- 37/136: gnu: python-sphinxcontrib-serializinghtml: Update to 1.1.5., guix-commits, 2021/10/17
- 53/136: gnu: googletest: Update to 1.11.0., guix-commits, 2021/10/17
- 56/136: gnu: mozjs-78: Update to 78.13.0., guix-commits, 2021/10/17
- 61/136: gnu: gst-plugins-base: Update to 1.18.5., guix-commits, 2021/10/17
- 69/136: gnu: tensorflow: Enable parallel build (at least partially).,
guix-commits <=
- 90/136: gnu: glade3: Remove sitecustomize.py workaround., guix-commits, 2021/10/17
- 93/136: gnu: Build all Rust packages using the latest rustc., guix-commits, 2021/10/17
- 96/136: gnu: python-pypa-build: Update to 0.7.0., guix-commits, 2021/10/17
- 100/136: gnu: python-pytest-6: Fix version via setuptools-scm., guix-commits, 2021/10/17
- 99/136: gnu: python-setuptools-scm: Update to 6.3.2, guix-commits, 2021/10/17
- 115/136: gnu: inkscape: Remove the legacy 0.92 version., guix-commits, 2021/10/17
- 105/136: gnu: at-spi2-core: Reverse inheritance relationship with minimal variant., guix-commits, 2021/10/17
- 116/136: gnu: mesa: Update to 21.2.4., guix-commits, 2021/10/17
- 126/136: gnu: glib-networking: Update to 2.70.rc., guix-commits, 2021/10/17
- 136/136: gnu: gtk: Deprecate gdk-pixbuf+svg in favor of librsvg., guix-commits, 2021/10/17