Skip to content

Commit

Permalink
Merge pull request #272 from regro-cf-autotick-bot/0.4.30_hc48cda
Browse files Browse the repository at this point in the history
jaxlib v0.4.30
  • Loading branch information
h-vetinari authored Jul 12, 2024
2 parents f427bcc + 7dc1907 commit e769031
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 33 deletions.
8 changes: 0 additions & 8 deletions .ci_support/migrations/flatbuffers24325.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euxo pipefail

export JAX_RELEASE=$PKG_VERSION

if [[ "${target_platform}" == osx-* ]]; then
export LDFLAGS="${LDFLAGS} -lz -framework CoreFoundation -Xlinker -undefined -Xlinker dynamic_lookup"
# Remove stdlib=libc++; this is the default and errors on C sources.
Expand Down
12 changes: 7 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "0.4.28" %}
{% set version = "0.4.30" %}
{% set build = 0 %}

{% if cuda_compiler_version != "None" %}
Expand All @@ -13,7 +13,7 @@ package:
source:
# only pull sources after upstream PyPI release...
url: https://github.com/google/jax/archive/jaxlib-v{{ version }}.tar.gz
sha256: 4dd11577d4ba5a095fbc35258ddd4e4c020829ed6e6afd498c9e38ccbcdfe20b
sha256: 0ef9635c734d9bbb44fcc87df4f1c3ccce1cfcfd243572c80d36fcdf826fe1e6
patches:
- patches/0001-Allow-for-custom-CUDA-build.patch
- patches/0002-Consolidated-build-fixes-for-XLA.patch
Expand Down Expand Up @@ -93,13 +93,15 @@ test:
- test_jaxlib.py
requires:
- pip
commands:
- pip check
- python test_jaxlib.py
imports:
- jaxlib
# Only this import actually triggers the load of XLA
- jaxlib.xla_client
commands:
- pip check
- python test_jaxlib.py
# ensure that the package metadata did not mangle in the git hash, see #274
- test -f $SP_DIR/jaxlib-{{ version }}.dist-info/METADATA

about:
home: http://github.com/google/jax
Expand Down
8 changes: 4 additions & 4 deletions recipe/patches/0001-Allow-for-custom-CUDA-build.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 6c265042420d4894d9454403c53263f386d5ca42 Mon Sep 17 00:00:00 2001
From e61eb1329c100625a8b738c0b3be4f1aa0e83958 Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
Date: Sun, 8 Oct 2023 19:34:34 +0200
Subject: [PATCH 1/2] Allow for custom CUDA build
Subject: [PATCH 1/3] Allow for custom CUDA build

---
build/build.py | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/build/build.py b/build/build.py
index 6bea5fdd1..518ff7115 100755
index d525c36fb..0c25cea16 100755
--- a/build/build.py
+++ b/build/build.py
@@ -299,6 +299,11 @@ def write_bazelrc(*, python_bin_path, remote_build,
@@ -277,6 +277,11 @@ def write_bazelrc(*, remote_build,
f.write("build --action_env TF_CUDA_PATHS=\"{tf_cuda_paths}\"\n"
.format(tf_cuda_paths=",".join(tf_cuda_paths)))
if cuda_version:
Expand Down
32 changes: 16 additions & 16 deletions recipe/patches/0002-Consolidated-build-fixes-for-XLA.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 207987afda71acae0e24ebd296f67c09ba10f55c Mon Sep 17 00:00:00 2001
From ca3d33235324032170482c4b60a5f489c5372223 Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
Date: Thu, 14 Dec 2023 17:06:15 +0100
Subject: [PATCH 2/2] Consolidated build fixes for XLA
Subject: [PATCH 2/3] Consolidated build fixes for XLA

jax vendors xla, but only populates the sources through bazel, so we cannot
patch as usual through conda, but rather need to teach the bazel build file
Expand All @@ -25,11 +25,11 @@ which is also where we're patching in the list of patches to apply to xla.

diff --git a/third_party/xla/0001-Support-third-party-build-of-boringssl.patch b/third_party/xla/0001-Support-third-party-build-of-boringssl.patch
new file mode 100644
index 000000000..a1ee10b60
index 000000000..d51972ceb
--- /dev/null
+++ b/third_party/xla/0001-Support-third-party-build-of-boringssl.patch
@@ -0,0 +1,51 @@
+From 37e9126b101e646f3c6090ebee508790eca59ddb Mon Sep 17 00:00:00 2001
+From a319c974acb4e6dbd0851692d2bd2cfc2900fab0 Mon Sep 17 00:00:00 2001
+From: "Uwe L. Korn" <[email protected]>
+Date: Thu, 14 Dec 2023 15:04:51 +0100
+Subject: [PATCH 1/4] Support third-party build of boringssl
Expand Down Expand Up @@ -82,11 +82,11 @@ index 000000000..a1ee10b60
+
diff --git a/third_party/xla/0002-Fix-abseil-headers.patch b/third_party/xla/0002-Fix-abseil-headers.patch
new file mode 100644
index 000000000..4e5084489
index 000000000..23e30e232
--- /dev/null
+++ b/third_party/xla/0002-Fix-abseil-headers.patch
@@ -0,0 +1,73 @@
+From d7775566d001f014568aeb7506acdfb0e643e5d3 Mon Sep 17 00:00:00 2001
+From 96092fef5b5de38eae41f3a15e32160b774f334b Mon Sep 17 00:00:00 2001
+From: "Uwe L. Korn" <[email protected]>
+Date: Thu, 23 May 2024 15:45:52 +0200
+Subject: [PATCH 2/4] Fix abseil headers
Expand All @@ -99,7 +99,7 @@ index 000000000..4e5084489
+ 4 files changed, 10 insertions(+)
+
+diff --git a/third_party/tsl/tsl/platform/default/BUILD b/third_party/tsl/tsl/platform/default/BUILD
+index 5adfc6b58d..34387f9a25 100644
+index 223d85bfd8..522faf967a 100644
+--- a/third_party/tsl/tsl/platform/default/BUILD
++++ b/third_party/tsl/tsl/platform/default/BUILD
+@@ -220,6 +220,8 @@ cc_library(
Expand Down Expand Up @@ -134,7 +134,7 @@ index 000000000..4e5084489
+ "@com_google_absl//absl/memory",
+ "@com_google_absl//absl/strings",
+diff --git a/xla/python/ifrt_proxy/common/BUILD b/xla/python/ifrt_proxy/common/BUILD
+index 257f813a5f..65abf54caf 100644
+index a585d9f38b..045039c6e2 100644
+--- a/xla/python/ifrt_proxy/common/BUILD
++++ b/xla/python/ifrt_proxy/common/BUILD
+@@ -52,6 +52,9 @@ cc_library(
Expand All @@ -161,11 +161,11 @@ index 000000000..4e5084489
+ "@tsl//tsl/platform:status",
diff --git a/third_party/xla/0003-Omit-usage-of-StrFormat.patch b/third_party/xla/0003-Omit-usage-of-StrFormat.patch
new file mode 100644
index 000000000..5fc62e682
index 000000000..55227e995
--- /dev/null
+++ b/third_party/xla/0003-Omit-usage-of-StrFormat.patch
@@ -0,0 +1,43 @@
+From 492ff32f4405d0c05898d796b1a8aab6c36e9e97 Mon Sep 17 00:00:00 2001
+From 5e3d79f182977ddd06e0cbdd66d907709e453189 Mon Sep 17 00:00:00 2001
+From: "Uwe L. Korn" <[email protected]>
+Date: Thu, 4 Jul 2024 10:36:03 +0200
+Subject: [PATCH 3/4] Omit usage of StrFormat
Expand All @@ -175,7 +175,7 @@ index 000000000..5fc62e682
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/xla/stream_executor/gpu/gpu_executor.h b/xla/stream_executor/gpu/gpu_executor.h
+index 01e343822d..1db715328f 100644
+index 31398f60ce..4f00b2d317 100644
+--- a/xla/stream_executor/gpu/gpu_executor.h
++++ b/xla/stream_executor/gpu/gpu_executor.h
+@@ -29,6 +29,7 @@ limitations under the License.
Expand All @@ -194,7 +194,7 @@ index 000000000..5fc62e682
+ #include "absl/synchronization/mutex.h"
+ #include "absl/types/span.h"
+ #include "xla/stream_executor/blas.h"
+@@ -187,8 +187,11 @@ class GpuExecutor : public StreamExecutor {
+@@ -186,8 +186,11 @@ class GpuExecutor : public StreamExecutorCommon {
+ uint64_t size) override {
+ auto* buffer = GpuDriver::HostAllocate(context_, size);
+ if (buffer == nullptr && size > 0) {
Expand All @@ -210,11 +210,11 @@ index 000000000..5fc62e682
+ }
diff --git a/third_party/xla/0004-Add-missing-bits-absl-systemlib.patch b/third_party/xla/0004-Add-missing-bits-absl-systemlib.patch
new file mode 100644
index 000000000..18051c5bb
index 000000000..12bee2fdd
--- /dev/null
+++ b/third_party/xla/0004-Add-missing-bits-absl-systemlib.patch
@@ -0,0 +1,141 @@
+From 610b72a30f863b5c5c6e7249889927c51832cb5e Mon Sep 17 00:00:00 2001
+From 2e788307dfb10d322125f0b0fe9b36b6686fba85 Mon Sep 17 00:00:00 2001
+From: "Uwe L. Korn" <[email protected]>
+Date: Thu, 4 Jul 2024 15:58:32 +0200
+Subject: [PATCH 4/4] Add missing bits absl systemlib
Expand Down Expand Up @@ -356,10 +356,10 @@ index 000000000..18051c5bb
+ "meta",
+ "numeric",
diff --git a/third_party/xla/workspace.bzl b/third_party/xla/workspace.bzl
index 848f38627..b89fcb7b0 100644
index 3e8b0411e..230152817 100644
--- a/third_party/xla/workspace.bzl
+++ b/third_party/xla/workspace.bzl
@@ -29,6 +29,12 @@ def repo():
@@ -30,6 +30,12 @@ def repo():
sha256 = XLA_SHA256,
strip_prefix = "xla-{commit}".format(commit = XLA_COMMIT),
urls = tf_mirror_urls("https://github.com/openxla/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT)),
Expand Down

0 comments on commit e769031

Please sign in to comment.