summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-01-25 09:23:36 +0100
committerRicardo Wurmus <rekado@elephly.net>2024-01-25 09:23:36 +0100
commitb287b3be1da40ccf61559d0575ddc1958f60c625 (patch)
tree8506124ba4f88a4a6b88fa96b8ef0a651bfe76be
parent58112a498b46a45511fb9d6f063ca4e68518d9c4 (diff)
python: python-jax: Update to 0.4.20.
* guix-science/packages/python.scm (python-jaxlib/wheel): Update to 0.4.20. [arguments]: Pass bazel arguments to override included platforms repo; disable patching of xla protobuf. [native-inputs]: Add bazel-platforms. (python-jax): Update to 0.4.20.
-rw-r--r--guix-science/packages/python.scm31
1 files changed, 23 insertions, 8 deletions
diff --git a/guix-science/packages/python.scm b/guix-science/packages/python.scm
index 143dd5e..f198c74 100644
--- a/guix-science/packages/python.scm
+++ b/guix-science/packages/python.scm
@@ -548,7 +548,7 @@ NumPy @code{dtype} extensions used in machine learning libraries, including:
548(define python-jaxlib/wheel 548(define python-jaxlib/wheel
549 (package 549 (package
550 (name "python-jaxlib") 550 (name "python-jaxlib")
551 (version "0.4.18") 551 (version "0.4.20")
552 (source 552 (source
553 (origin 553 (origin
554 (method git-fetch) 554 (method git-fetch)
@@ -557,7 +557,7 @@ NumPy @code{dtype} extensions used in machine learning libraries, including:
557 (commit (string-append "jaxlib-v" version)))) 557 (commit (string-append "jaxlib-v" version))))
558 (file-name (git-file-name name version)) 558 (file-name (git-file-name name version))
559 (sha256 559 (sha256
560 (base32 "1pfk7z3kkair6xi92yn0pvs3zlaxajhmk6r2yq020q13mwfxcfxc")))) 560 (base32 "15dmxmfjybg1289v822cmk9raagl9mcbkjk990xa0f91sx91gdjq"))))
561 (build-system bazel-build-system) 561 (build-system bazel-build-system)
562 (arguments 562 (arguments
563 (list 563 (list
@@ -587,13 +587,17 @@ NumPy @code{dtype} extensions used in machine learning libraries, including:
587 (_ "UNSUPPORTED")))) 587 (_ "UNSUPPORTED"))))
588 #:bazel-arguments 588 #:bazel-arguments
589 #~(list "-c" "opt" 589 #~(list "-c" "opt"
590 ;; We need a more recent version of platforms, because the
591 ;; included cpu package does not define cpu:wasm32.
592 (string-append "--override_repository=platforms="
593 #$(this-package-native-input "bazel-platforms"))
590 "--config=mkl_open_source_only" 594 "--config=mkl_open_source_only"
591 (string-append "--define=" 595 (string-append "--define="
592 "PROTOBUF_INCLUDE_PATH=" 596 "PROTOBUF_INCLUDE_PATH="
593 #$static-protobuf 597 #$static-protobuf
594 "/include")) 598 "/include"))
595 #:vendored-inputs-hash 599 #:vendored-inputs-hash
596 "1k9zwarax0654dr4swb394n47ia22ixdpl4214jys5jg6xzpivxq" 600 "1fa4f8qx0765zdwmqaz1jnc60nvb3j4qxqy0mxrpqj58qdclycfs"
597 #:phases 601 #:phases
598 #~(modify-phases %standard-phases 602 #~(modify-phases %standard-phases
599 (add-after 'unpack-vendored-inputs 'configure 603 (add-after 'unpack-vendored-inputs 'configure
@@ -604,6 +608,7 @@ NumPy @code{dtype} extensions used in machine learning libraries, including:
604 ;; doesn't help us. 608 ;; doesn't help us.
605 (let ((bazel-out 609 (let ((bazel-out
606 (string-append (getenv "NIX_BUILD_TOP") "/output"))) 610 (string-append (getenv "NIX_BUILD_TOP") "/output")))
611 #;
607 (substitute* (string-append bazel-out "/external/xla/third_party/systemlibs/protobuf.BUILD") 612 (substitute* (string-append bazel-out "/external/xla/third_party/systemlibs/protobuf.BUILD")
608 (("-lprotobuf") "-l:libprotobuf.a") 613 (("-lprotobuf") "-l:libprotobuf.a")
609 (("-lprotoc") "-l:libprotoc.a")) 614 (("-lprotoc") "-l:libprotoc.a"))
@@ -673,9 +678,19 @@ build --local_cpu_resources=HOST_CPUS*.75
673 python-protobuf-for-tensorflow-2 678 python-protobuf-for-tensorflow-2
674 python-scipy)) 679 python-scipy))
675 (native-inputs 680 (native-inputs
676 (list python-pypa-build 681 `(("python-pypa-build" ,python-pypa-build)
677 python-setuptools 682 ("python-setuptools" ,python-setuptools)
678 python-wheel)) 683 ("python-wheel" ,python-wheel)
684 ("bazel-platforms"
685 ,(origin
686 (method git-fetch)
687 (uri (git-reference
688 (url "https://github.com/bazelbuild/platforms")
689 (commit "0.0.8")))
690 (file-name (git-file-name "bazel-platforms" "0.0.8"))
691 (sha256
692 (base32
693 "1wx2348w49vxr3z9kjfls5zsrwr0div6r3irbvdlawan87sx5yfs"))))))
679 (home-page "https://github.com/google/jax") 694 (home-page "https://github.com/google/jax")
680 (synopsis "Differentiate, compile, and transform Numpy code.") 695 (synopsis "Differentiate, compile, and transform Numpy code.")
681 (description "JAX is Autograd and XLA, brought together for 696 (description "JAX is Autograd and XLA, brought together for
@@ -712,13 +727,13 @@ arbitrarily to any order.")
712(define-public python-jax 727(define-public python-jax
713 (package 728 (package
714 (name "python-jax") 729 (name "python-jax")
715 (version "0.4.18") 730 (version "0.4.20")
716 (source 731 (source
717 (origin 732 (origin
718 (method url-fetch) 733 (method url-fetch)
719 (uri (pypi-uri "jax" version)) 734 (uri (pypi-uri "jax" version))
720 (sha256 735 (sha256
721 (base32 "0cl1j8y7664i0rn7ckixk7372wkjm88azya5izlh620hj0wg6v3p")))) 736 (base32 "1b6j3svq35f06iygc8nh3k862d0nvss9l5fi7533gadim1isg5pa"))))
722 (build-system pyproject-build-system) 737 (build-system pyproject-build-system)
723 (arguments 738 (arguments
724 (list #:tests? #false)) ;unclear how to run them 739 (list #:tests? #false)) ;unclear how to run them