diff --git a/.ci_support/linux_64_cuda_compiler_version12.9python3.11.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version12.9python3.11.____cpython.yaml index 07ee063f..3a7dad99 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.9python3.11.____cpython.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9python3.11.____cpython.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_version12.9python3.12.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_version12.9python3.12.____cpython.yaml index d097af2e..80180fdf 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.9python3.12.____cpython.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9python3.12.____cpython.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_version12.9python3.13.____cp313.yaml b/.ci_support/linux_64_cuda_compiler_version12.9python3.13.____cp313.yaml index 2e4bd074..697dc4e8 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.9python3.13.____cp313.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9python3.13.____cp313.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_version12.9python3.14.____cp314.yaml b/.ci_support/linux_64_cuda_compiler_version12.9python3.14.____cp314.yaml index dfabdd90..1a1fabf8 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.9python3.14.____cp314.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9python3.14.____cp314.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_versionNonepython3.11.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_versionNonepython3.11.____cpython.yaml index cab5a878..20735b18 100644 --- a/.ci_support/linux_64_cuda_compiler_versionNonepython3.11.____cpython.yaml +++ b/.ci_support/linux_64_cuda_compiler_versionNonepython3.11.____cpython.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_versionNonepython3.12.____cpython.yaml b/.ci_support/linux_64_cuda_compiler_versionNonepython3.12.____cpython.yaml index e02ebead..8c9250bb 100644 --- a/.ci_support/linux_64_cuda_compiler_versionNonepython3.12.____cpython.yaml +++ b/.ci_support/linux_64_cuda_compiler_versionNonepython3.12.____cpython.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_versionNonepython3.13.____cp313.yaml b/.ci_support/linux_64_cuda_compiler_versionNonepython3.13.____cp313.yaml index 8be07734..005c848b 100644 --- a/.ci_support/linux_64_cuda_compiler_versionNonepython3.13.____cp313.yaml +++ b/.ci_support/linux_64_cuda_compiler_versionNonepython3.13.____cp313.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_64_cuda_compiler_versionNonepython3.14.____cp314.yaml b/.ci_support/linux_64_cuda_compiler_versionNonepython3.14.____cp314.yaml index 2d471835..a062abd0 100644 --- a/.ci_support/linux_64_cuda_compiler_versionNonepython3.14.____cp314.yaml +++ b/.ci_support/linux_64_cuda_compiler_versionNonepython3.14.____cp314.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.11.____cpython.yaml b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.11.____cpython.yaml index 8b1f0e54..0a0466e1 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.11.____cpython.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.11.____cpython.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.12.____cpython.yaml b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.12.____cpython.yaml index e1816000..8c0f36e8 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.12.____cpython.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.12.____cpython.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.13.____cp313.yaml b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.13.____cp313.yaml index 21dcf97e..4534ca92 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.13.____cp313.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.13.____cp313.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.14.____cp314.yaml b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.14.____cp314.yaml index 83c7a601..5fd252fa 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.14.____cp314.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_version12.9python3.14.____cp314.yaml @@ -15,7 +15,7 @@ cuda_compiler: cuda_compiler_version: - '12.9' cudnn: -- '9.10' +- '9' cxx_compiler: - clangxx cxx_compiler_version: @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.11.____cpython.yaml b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.11.____cpython.yaml index 1fdcaf5f..83d1cd28 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.11.____cpython.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.11.____cpython.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.12.____cpython.yaml b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.12.____cpython.yaml index 12ff7036..d7607322 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.12.____cpython.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.12.____cpython.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.13.____cp313.yaml b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.13.____cp313.yaml index fe3e4715..c17c074a 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.13.____cp313.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.13.____cp313.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.14.____cp314.yaml b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.14.____cp314.yaml index 0514de9a..fc7593d1 100644 --- a/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.14.____cp314.yaml +++ b/.ci_support/linux_aarch64_cuda_compiler_versionNonepython3.14.____cp314.yaml @@ -49,6 +49,5 @@ zip_keys: - cxx_compiler_version - c_stdlib_version - cuda_compiler_version - - cudnn zlib: - '1' diff --git a/.ci_support/migrations/cudnn910.yaml b/.ci_support/migrations/cudnn910.yaml deleted file mode 100644 index 0a657ef1..00000000 --- a/.ci_support/migrations/cudnn910.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# needs to be ordered before CUDA 13.0 migrator -migrator_ts: 1755016000 -__migrator: - kind: - version - migration_number: - 1 - build_number: - 1 - ordering: - cudnn: - - None - - 9 - - 9.10 - commit_message: | - Rebuild for cudnn 9.10 - - Conda-forge assumed cudnn 9.x builds would stay compatible with each other. - This is the case for the API/ABI of the library, but nvidia dropped support - for older GPU architectures in cudnn 9.11. Since we have no package-level - metadata about compatibility with specific GPU architectures, this effectively - breaks all packages built atop cudnn for users on affected older GPUs. - - In order to remedy this situation, we need to rebuild all cudnn-dependent - feedstocks against cudnn 9.10 (the last version with full architecture support), - before we mark all those newer cudnn builds as broken. This only affects artefacts - for CUDA 12.x; those for CUDA 13.x are not affected, since CUDA 13 never supported - those older architectures in the first place. - - For more details see: https://github.com/conda-forge/cudnn-feedstock/issues/124 - -cudnn: - - None - - 9.10 # [((linux and not ppc64le) or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index f2fcf855..463cbc88 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -53,6 +53,25 @@ if [[ "${sha:-}" == "" ]]; then sha=$(git rev-parse HEAD) fi +if [[ "${OSX_SDK_DIR:-}" == "" ]]; then + if [[ "${CI:-}" == "" ]]; then + echo "Please set OSX_SDK_DIR to a directory where SDKs can be downloaded to. Aborting" + exit 1 + else + export OSX_SDK_DIR=/opt/conda-sdks + /usr/bin/sudo mkdir -p "${OSX_SDK_DIR}" + /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" + fi +else + if tmpf=$(mktemp -p "$OSX_SDK_DIR" tmp.XXXXXXXX 2>/dev/null); then + rm -f "$tmpf" + echo "OSX_SDK_DIR is writeable without sudo, continuing" + else + echo "User-provided OSX_SDK_DIR is not writeable for current user! Aborting" + exit 1 + fi +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup diff --git a/pixi.toml b/pixi.toml index 99ba19ab..e977555a 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,24 +1,22 @@ +# -*- mode: toml -*- # This file was generated automatically from conda-smithy. To update this configuration, # update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: toml -*- +"$schema" = "https://pixi.sh/v0.59.0/schema/manifest/schema.json" -# VVVVVV minimum `pixi` version -"$schema" = "https://pixi.sh/v0.36.0/schema/manifest/schema.json" - -[project] +[workspace] name = "jaxlib-feedstock" -version = "3.52.3" # conda-smithy version used to generate this file +version = "3.54.1" # conda-smithy version used to generate this file description = "Pixi configuration for conda-forge/jaxlib-feedstock" authors = ["@conda-forge/jaxlib"] channels = ["conda-forge"] platforms = ["linux-64", "osx-64", "win-64"] +requires-pixi = ">=0.59.0" [dependencies] conda-build = ">=24.1" conda-forge-ci-setup = "4.*" rattler-build = "*" -[tasks] [tasks.inspect-all] cmd = "inspect_artifacts --all-packages" description = "List contents of all packages found in rattler-build build directory." @@ -172,7 +170,6 @@ description = "List contents of jaxlib-feedstock packages built for variant osx_ [feature.smithy.dependencies] conda-smithy = "*" -shellcheck = "*" [feature.smithy.tasks.build-locally] cmd = "python ./build-locally.py" description = "Build packages locally using the same setup scripts used in conda-forge's CI" @@ -188,5 +185,6 @@ description = "Lint the feedstock recipe" [environments] smithy = ["smithy"] + # This is a copy of default, to be enabled by build_steps.sh during Docker builds # __PLATFORM_SPECIFIC_ENV__ = [] diff --git a/recipe/patches/0001-Allow-for-custom-CUDA-build.patch b/recipe/patches/0001-Allow-for-custom-CUDA-build.patch index f8fa5578..5a691515 100644 --- a/recipe/patches/0001-Allow-for-custom-CUDA-build.patch +++ b/recipe/patches/0001-Allow-for-custom-CUDA-build.patch @@ -1,4 +1,4 @@ -From c850b31214595ff30a3612f9f95369685f6f0bb5 Mon Sep 17 00:00:00 2001 +From 876de58156635246f591f3afa05f35edad95169f Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 8 Oct 2023 19:34:34 +0200 Subject: [PATCH 1/4] Allow for custom CUDA build @@ -8,11 +8,11 @@ Subject: [PATCH 1/4] Allow for custom CUDA build 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/build.py b/build/build.py -index 2b4f71d..653204c 100755 +index 020d93a49..78ed788cf 100755 --- a/build/build.py +++ b/build/build.py -@@ -701,10 +701,9 @@ async def main(): - if wheel =="jax": +@@ -706,10 +706,9 @@ async def main(): + if wheel == "jax": wheel_build_command.append("--//jax:build_jaxlib=false") - result = await executor.run(wheel_build_command.get_command_as_string(), args.dry_run, args.detailed_timestamped_log) diff --git a/recipe/patches/0002-Consolidated-build-fixes-for-XLA.patch b/recipe/patches/0002-Consolidated-build-fixes-for-XLA.patch index 64e9c6f8..075c6b4f 100644 --- a/recipe/patches/0002-Consolidated-build-fixes-for-XLA.patch +++ b/recipe/patches/0002-Consolidated-build-fixes-for-XLA.patch @@ -1,4 +1,4 @@ -From 225a60e4fdf661415d95bf6a01296fb9e732ad80 Mon Sep 17 00:00:00 2001 +From d52cbabc99236c0c3f277d7eff56795219f5be27 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 14 Dec 2023 17:06:15 +0100 Subject: [PATCH 2/4] Consolidated build fixes for XLA @@ -15,37 +15,31 @@ which is also where we're patching in the list of patches to apply to xla. Co-Authored-By: H. Vetinari --- third_party/grpc_systemlib.BUILD | 71 +++ - ...pport-third-party-build-of-boringssl.patch | 50 +++ - third_party/xla/0002-Fix-abseil-headers.patch | 101 +++++ - .../xla/0003-Omit-usage-of-StrFormat.patch | 25 ++ - .../xla/0004-Re-enable-system-abseil.patch | 411 ++++++++++++++++++ + third_party/xla/0001-Fix-abseil-headers.patch | 99 +++++ + .../xla/0002-Re-enable-system-abseil.patch | 411 ++++++++++++++++++ ...ther-absl-log-is-already-initialized.patch | 58 +++ - third_party/xla/0006-Unbundle-grpc.patch | 152 +++++++ + third_party/xla/0004-Unbundle-grpc.patch | 153 +++++++ ...-coordination_agent_recoverable-flag.patch | 35 ++ ...al-variant-_access-is-now-header-onl.patch | 29 ++ ...d-dependency-on-proto_bazel_features.patch | 72 +++ - .../xla/0010-Update-gloo-version.patch | 24 + - .../0011-Add-macos_x86_64-to-mkl_deps.patch | 21 + - .../xla/0012-Add-systemlib-for-oneDNN.patch | 35 ++ - third_party/xla/workspace.bzl | 16 +- - 14 files changed, 1099 insertions(+), 1 deletion(-) + .../0008-Add-macos_x86_64-to-mkl_deps.patch | 21 + + .../xla/0009-Add-systemlib-for-oneDNN.patch | 35 ++ + third_party/xla/workspace.bzl | 11 + + 11 files changed, 995 insertions(+) create mode 100644 third_party/grpc_systemlib.BUILD - create mode 100644 third_party/xla/0001-Support-third-party-build-of-boringssl.patch - create mode 100644 third_party/xla/0002-Fix-abseil-headers.patch - create mode 100644 third_party/xla/0003-Omit-usage-of-StrFormat.patch - create mode 100644 third_party/xla/0004-Re-enable-system-abseil.patch - create mode 100644 third_party/xla/0005-Check-whether-absl-log-is-already-initialized.patch - create mode 100644 third_party/xla/0006-Unbundle-grpc.patch - create mode 100644 third_party/xla/0007-Disable-coordination_agent_recoverable-flag.patch - create mode 100644 third_party/xla/0008-absl_bad_-optional-variant-_access-is-now-header-onl.patch - create mode 100644 third_party/xla/0009-Add-dependency-on-proto_bazel_features.patch - create mode 100644 third_party/xla/0010-Update-gloo-version.patch - create mode 100644 third_party/xla/0011-Add-macos_x86_64-to-mkl_deps.patch - create mode 100644 third_party/xla/0012-Add-systemlib-for-oneDNN.patch + create mode 100644 third_party/xla/0001-Fix-abseil-headers.patch + create mode 100644 third_party/xla/0002-Re-enable-system-abseil.patch + create mode 100644 third_party/xla/0003-Check-whether-absl-log-is-already-initialized.patch + create mode 100644 third_party/xla/0004-Unbundle-grpc.patch + create mode 100644 third_party/xla/0005-Disable-coordination_agent_recoverable-flag.patch + create mode 100644 third_party/xla/0006-absl_bad_-optional-variant-_access-is-now-header-onl.patch + create mode 100644 third_party/xla/0007-Add-dependency-on-proto_bazel_features.patch + create mode 100644 third_party/xla/0008-Add-macos_x86_64-to-mkl_deps.patch + create mode 100644 third_party/xla/0009-Add-systemlib-for-oneDNN.patch diff --git a/third_party/grpc_systemlib.BUILD b/third_party/grpc_systemlib.BUILD new file mode 100644 -index 0000000..0e4e862 +index 000000000..0e4e862ce --- /dev/null +++ b/third_party/grpc_systemlib.BUILD @@ -0,0 +1,71 @@ @@ -120,72 +114,16 @@ index 0000000..0e4e862 + srcs = ["grpc_python_plugin.bin"], + visibility = ["//visibility:public"], +) -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 +diff --git a/third_party/xla/0001-Fix-abseil-headers.patch b/third_party/xla/0001-Fix-abseil-headers.patch new file mode 100644 -index 0000000..2e4b647 +index 000000000..d1cb79d73 --- /dev/null -+++ b/third_party/xla/0001-Support-third-party-build-of-boringssl.patch -@@ -0,0 +1,50 @@ -+From a2851a49bb15b571ad78bbb0aef805bd1016e26c Mon Sep 17 00:00:00 2001 -+From: "Uwe L. Korn" -+Date: Thu, 14 Dec 2023 15:04:51 +0100 -+Subject: [PATCH 01/12] Support third-party build of boringssl -+ -+--- -+ third_party/boringssl.BUILD | 21 +++++++++++++++++++++ -+ workspace2.bzl | 1 + -+ 2 files changed, 22 insertions(+) -+ create mode 100644 third_party/boringssl.BUILD -+ -+diff --git a/third_party/boringssl.BUILD b/third_party/boringssl.BUILD -+new file mode 100644 -+index 0000000000..bc4c533403 -+--- /dev/null -++++ b/third_party/boringssl.BUILD -+@@ -0,0 +1,21 @@ -++licenses(["notice"]) -++ -++filegroup( -++ name = "LICENSE", -++ visibility = ["//visibility:public"], -++) -++ -++cc_library( -++ name = "crypto", -++ linkopts = ["-lcrypto"], -++ visibility = ["//visibility:public"], -++) -++ -++cc_library( -++ name = "ssl", -++ linkopts = ["-lssl"], -++ visibility = ["//visibility:public"], -++ deps = [ -++ ":crypto", -++ ], -++) -+diff --git a/workspace2.bzl b/workspace2.bzl -+index f0196f12c2..17458789c4 100644 -+--- a/workspace2.bzl -++++ b/workspace2.bzl -+@@ -456,6 +456,7 @@ def _tf_repositories(): -+ name = "boringssl", -+ sha256 = "9dc53f851107eaf87b391136d13b815df97ec8f76dadb487b58b2fc45e624d2c", -+ strip_prefix = "boringssl-c00d7ca810e93780bd0c8ee4eea28f4f2ea4bcdc", -++ system_build_file = "//third_party:boringssl.BUILD", -+ urls = tf_mirror_urls("https://github.com/google/boringssl/archive/c00d7ca810e93780bd0c8ee4eea28f4f2ea4bcdc.tar.gz"), -+ ) -+ -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 0000000..5a74714 ---- /dev/null -+++ b/third_party/xla/0002-Fix-abseil-headers.patch -@@ -0,0 +1,101 @@ -+From aae46f4c56e5e426d3d1c9516d343f94484e4b78 Mon Sep 17 00:00:00 2001 ++++ b/third_party/xla/0001-Fix-abseil-headers.patch +@@ -0,0 +1,99 @@ ++From 5cc573c289895d659a5a05670f8650b357dc5424 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Thu, 23 May 2024 15:45:52 +0200 -+Subject: [PATCH 02/12] Fix abseil headers ++Subject: [PATCH 1/9] Fix abseil headers + +--- + xla/backends/cpu/codegen/ir_compiler.cc | 2 +- @@ -193,14 +131,14 @@ index 0000000..5a74714 + xla/python/ifrt_proxy/common/BUILD | 3 +++ + xla/tsl/distributed_runtime/rpc/BUILD | 1 + + xla/tsl/platform/default/BUILD | 2 ++ -+ xla/tsl/profiler/rpc/client/BUILD | 4 ++++ -+ 6 files changed, 12 insertions(+), 2 deletions(-) ++ xla/tsl/profiler/rpc/client/BUILD | 2 ++ ++ 6 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/xla/backends/cpu/codegen/ir_compiler.cc b/xla/backends/cpu/codegen/ir_compiler.cc -+index 288d5e6ce7..66adf57ad6 100644 ++index a532b353ce..091fe73f1f 100644 +--- a/xla/backends/cpu/codegen/ir_compiler.cc ++++ b/xla/backends/cpu/codegen/ir_compiler.cc -+@@ -139,7 +139,7 @@ static std::unique_ptr ParseXlaBackendExtraOptions( ++@@ -137,7 +137,7 @@ static std::unique_ptr ParseXlaBackendExtraOptions( + // of the proto should be ignored since they're just the default values. + // We could instead return an unordered_map, but we already have + // helpers that expect a DebugOptions, so this ends up being simpler. @@ -210,10 +148,10 @@ index 0000000..5a74714 + llvm::Metadata* md = llvm_module.getModuleFlag("xla_backend_extra_options"); + if (md == nullptr) return nullptr; +diff --git a/xla/hlo/transforms/simplifiers/algebraic_simplifier.h b/xla/hlo/transforms/simplifiers/algebraic_simplifier.h -+index d55d927cd1..54d9e69ab2 100644 ++index da0eb0f861..dcefad1bd3 100644 +--- a/xla/hlo/transforms/simplifiers/algebraic_simplifier.h ++++ b/xla/hlo/transforms/simplifiers/algebraic_simplifier.h -+@@ -825,7 +825,7 @@ class AlgebraicSimplifierVisitor : public DfsHloRewriteVisitor { ++@@ -840,7 +840,7 @@ class AlgebraicSimplifierVisitor : public DfsHloRewriteVisitor { + // slice instruction is replaced). + // - For example in slices=([0:X:X]), where X == dimension + absl::StatusOr RemoveRedundantStride( @@ -223,7 +161,7 @@ index 0000000..5a74714 + // Helper function for HandleReduce. Replaces a reduce with a broadcast of the + // init values if the reduce is operating on a zero-element array or the +diff --git a/xla/python/ifrt_proxy/common/BUILD b/xla/python/ifrt_proxy/common/BUILD -+index 432b4db904..cb0fa67a62 100644 ++index 71ae38996d..e580f58608 100644 +--- a/xla/python/ifrt_proxy/common/BUILD ++++ b/xla/python/ifrt_proxy/common/BUILD +@@ -51,6 +51,9 @@ cc_library( @@ -237,93 +175,60 @@ index 0000000..5a74714 + ], + alwayslink = True, +diff --git a/xla/tsl/distributed_runtime/rpc/BUILD b/xla/tsl/distributed_runtime/rpc/BUILD -+index 073a198a60..22381e348b 100644 ++index 31deb7b8e5..3bc72f2294 100644 +--- a/xla/tsl/distributed_runtime/rpc/BUILD ++++ b/xla/tsl/distributed_runtime/rpc/BUILD -+@@ -39,6 +39,7 @@ cc_library( -+ "//xla/tsl/platform:status", -+ "//xla/tsl/protobuf:distributed_runtime_payloads_proto_cc", ++@@ -41,6 +41,7 @@ cc_library( ++ "@com_github_grpc_grpc//:grpc++", ++ "@com_github_grpc_grpc//:grpc++_codegen_proto", + "@com_google_absl//absl/status", ++ "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/strings:cord", -+ "@tsl//tsl/platform:protobuf", -+ "@tsl//tsl/platform:stringpiece", ++ "@com_google_absl//absl/strings:str_format", ++ "@com_google_absl//absl/strings:string_view", +diff --git a/xla/tsl/platform/default/BUILD b/xla/tsl/platform/default/BUILD -+index c118b2f877..5ef81fcdd5 100644 ++index 306ca175aa..9e44816857 100644 +--- a/xla/tsl/platform/default/BUILD ++++ b/xla/tsl/platform/default/BUILD -+@@ -251,6 +251,8 @@ cc_library( -+ deps = [ ++@@ -265,6 +265,8 @@ cc_library( + "//xla/tsl/platform:logging", ++ "@com_github_grpc_grpc//:grpc++", + "@com_google_absl//absl/log:check", ++ "@com_google_absl//absl/status", ++ "@com_google_absl//absl/status:statusor", -+ ] + tsl_grpc_cc_dependencies(), ++ ], + ) + +diff --git a/xla/tsl/profiler/rpc/client/BUILD b/xla/tsl/profiler/rpc/client/BUILD -+index ce37e1624b..b0ea3c03f3 100644 ++index a4bfffec7d..220d605a38 100644 +--- a/xla/tsl/profiler/rpc/client/BUILD ++++ b/xla/tsl/profiler/rpc/client/BUILD -+@@ -102,6 +102,8 @@ cc_library( ++@@ -105,6 +105,7 @@ cc_library( + deps = [ + ":profiler_client_impl", -+ "//xla/tsl/platform:status", -++ "@com_google_absl//absl/status", ++ "@com_google_absl//absl/status", ++ "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/time", + "@tsl//tsl/profiler/protobuf:profiler_analysis_cc_grpc_proto", -+@@ -130,6 +132,8 @@ cc_library( -+ "//xla/tsl/platform:status", -+ "//xla/tsl/platform:types", -+ "//xla/tsl/protobuf:error_codes_proto_impl_cc", -++ "@com_google_absl//absl/status", -++ "@com_google_absl//absl/status:statusor", ++@@ -134,6 +135,7 @@ cc_library( ++ "@com_github_grpc_grpc//:grpc++", + "@com_google_absl//absl/memory", ++ "@com_google_absl//absl/status", +++ "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/time", -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 0000000..fc03f77 ---- /dev/null -+++ b/third_party/xla/0003-Omit-usage-of-StrFormat.patch -@@ -0,0 +1,25 @@ -+From 2a76daeb6f08cd8987c9e3ceda6d493479fecae1 Mon Sep 17 00:00:00 2001 -+From: "Uwe L. Korn" -+Date: Thu, 4 Jul 2024 10:36:03 +0200 -+Subject: [PATCH 03/12] Omit usage of StrFormat -+ -+--- -+ xla/stream_executor/gpu/gpu_executor.h | 5 +++++ -+ 1 file changed, 5 insertions(+) -+ -+diff --git a/xla/stream_executor/gpu/gpu_executor.h b/xla/stream_executor/gpu/gpu_executor.h -+index ad9b10e3aa..a261c3071d 100644 -+--- a/xla/stream_executor/gpu/gpu_executor.h -++++ b/xla/stream_executor/gpu/gpu_executor.h -+@@ -17,6 +17,11 @@ limitations under the License. -+ #define XLA_STREAM_EXECUTOR_GPU_GPU_EXECUTOR_H_ -+ -+ #include -++#include -++#include -++#include -++#include -++#include -+ #include -+ #include -+ #include -diff --git a/third_party/xla/0004-Re-enable-system-abseil.patch b/third_party/xla/0004-Re-enable-system-abseil.patch ++ "@tsl//tsl/profiler/protobuf:profiler_analysis_cc_grpc_proto", +diff --git a/third_party/xla/0002-Re-enable-system-abseil.patch b/third_party/xla/0002-Re-enable-system-abseil.patch new file mode 100644 -index 0000000..7b8db67 +index 000000000..400ec7f98 --- /dev/null -+++ b/third_party/xla/0004-Re-enable-system-abseil.patch ++++ b/third_party/xla/0002-Re-enable-system-abseil.patch @@ -0,0 +1,411 @@ -+From ffbd2bf30c2cb7448418abdd017d6cf0e16f5a12 Mon Sep 17 00:00:00 2001 ++From e06dd95487d9be217f4c3a9760224c675759b406 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Thu, 4 Jul 2024 15:58:32 +0200 -+Subject: [PATCH 04/12] Re-enable system abseil ++Subject: [PATCH 2/9] Re-enable system abseil + +partially revert https://github.com/openxla/xla/commit/1fc2a846d259d3c896a6177485abcc68d97627a9 +and add missing pieces @@ -688,11 +593,11 @@ index 0000000..7b8db67 ++ visibility = ["//visibility:public"], ++) +diff --git a/third_party/absl/workspace.bzl b/third_party/absl/workspace.bzl -+index 6599b00908..bf22e44e97 100644 ++index 3538e8b3f1..5707abf373 100644 +--- a/third_party/absl/workspace.bzl ++++ b/third_party/absl/workspace.bzl +@@ -11,9 +11,39 @@ def repo(): -+ ABSL_SHA256 = "ed8f7d9f39139c449e79fd19765e23c96fdb774172d32d191323d3e3ea06e5ff" ++ ABSL_SHA256 = "f56086f4cdb0ab9b7c3ac46831b1faba3753248d0f06f8bca4c917a1de2a560a" + # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/abseil-cpp.cmake) + ++ SYS_DIRS = [ @@ -731,16 +636,16 @@ index 0000000..7b8db67 + strip_prefix = "abseil-cpp-{commit}".format(commit = ABSL_COMMIT), + urls = tf_mirror_urls("https://github.com/abseil/abseil-cpp/archive/{commit}.tar.gz".format(commit = ABSL_COMMIT)), + patch_file = [ -diff --git a/third_party/xla/0005-Check-whether-absl-log-is-already-initialized.patch b/third_party/xla/0005-Check-whether-absl-log-is-already-initialized.patch +diff --git a/third_party/xla/0003-Check-whether-absl-log-is-already-initialized.patch b/third_party/xla/0003-Check-whether-absl-log-is-already-initialized.patch new file mode 100644 -index 0000000..a42504a +index 000000000..c018b2b89 --- /dev/null -+++ b/third_party/xla/0005-Check-whether-absl-log-is-already-initialized.patch ++++ b/third_party/xla/0003-Check-whether-absl-log-is-already-initialized.patch @@ -0,0 +1,58 @@ -+From 34736e8d0b80576b7280ee2677d63377f2f38860 Mon Sep 17 00:00:00 2001 ++From d613190f915a0413692ab731e8275e68ea4ede0b Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Fri, 22 Nov 2024 10:51:18 +0100 -+Subject: [PATCH 05/12] Check whether absl log is already initialized ++Subject: [PATCH 3/9] Check whether absl log is already initialized + +--- + xla/pjrt/c/pjrt_c_api_gpu.cc | 7 ++++++- @@ -795,29 +700,29 @@ index 0000000..a42504a ++} + + } // namespace xla -diff --git a/third_party/xla/0006-Unbundle-grpc.patch b/third_party/xla/0006-Unbundle-grpc.patch +diff --git a/third_party/xla/0004-Unbundle-grpc.patch b/third_party/xla/0004-Unbundle-grpc.patch new file mode 100644 -index 0000000..6128f25 +index 000000000..59f600f97 --- /dev/null -+++ b/third_party/xla/0006-Unbundle-grpc.patch -@@ -0,0 +1,152 @@ -+From 24d5bcd89c961e0e1394ff89e622b75c6279776d Mon Sep 17 00:00:00 2001 ++++ b/third_party/xla/0004-Unbundle-grpc.patch +@@ -0,0 +1,153 @@ ++From bf19e2949ae1fe046af79abded9f42bfaecf804f Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Wed, 23 Jul 2025 13:19:52 +0200 -+Subject: [PATCH 06/12] Unbundle grpc ++Subject: [PATCH 4/9] Unbundle grpc + +--- -+ third_party/zlib.BUILD | 37 +------------------------------------ ++ third_party/zlib.BUILD | 39 +-------------------------------------- + workspace0.bzl | 5 +---- + workspace1.bzl | 3 --- + workspace2.bzl | 24 +++++++++++++++++++----- -+ 4 files changed, 21 insertions(+), 48 deletions(-) ++ 4 files changed, 21 insertions(+), 50 deletions(-) + +diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD -+index b8464cf2db..99cf443f8a 100644 ++index 1f2f29af2b..99cf443f8a 100644 +--- a/third_party/zlib.BUILD ++++ b/third_party/zlib.BUILD -+@@ -4,40 +4,5 @@ licenses(["notice"]) # BSD/MIT-like license (for zlib) ++@@ -4,42 +4,5 @@ licenses(["notice"]) # BSD/MIT-like license (for zlib) + + cc_library( + name = "zlib", @@ -844,11 +749,13 @@ index 0000000..6128f25 +- "trees.c", +- "trees.h", +- "uncompr.c", -+- "zconf.h", +- "zutil.c", +- "zutil.h", +- ], -+- hdrs = ["zlib.h"], ++- hdrs = [ ++- "zconf.h", ++- "zlib.h", ++- ], +- copts = select({ +- "@xla//xla/tsl:windows": [], +- "//conditions:default": [ @@ -860,7 +767,7 @@ index 0000000..6128f25 ++ linkopts = ["-lz"], + ) +diff --git a/workspace0.bzl b/workspace0.bzl -+index 4d7dd87430..eef1a162f9 100644 ++index 52e509da92..4630ffad7a 100644 +--- a/workspace0.bzl ++++ b/workspace0.bzl +@@ -5,7 +5,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") @@ -869,9 +776,9 @@ index 0000000..6128f25 + load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") +-load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") + load("@com_google_benchmark//:bazel/benchmark_deps.bzl", "benchmark_deps") ++ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") + -+ def _tf_bind(): -+@@ -20,7 +19,7 @@ def _tf_bind(): ++@@ -21,7 +20,7 @@ def _tf_bind(): + # Needed by Protobuf + native.bind( + name = "grpc_cpp_plugin", @@ -890,19 +797,18 @@ index 0000000..6128f25 + # shadowing previous loads and trigger a buildifier warning. + xla_workspace0 = workspace +diff --git a/workspace1.bzl b/workspace1.bzl -+index 05121708fc..efb2042936 100644 ++index cbd3d24aec..3d063fa2c8 100644 +--- a/workspace1.bzl ++++ b/workspace1.bzl -+@@ -1,7 +1,6 @@ ++@@ -1,6 +1,5 @@ + """TensorFlow workspace initialization. Consult the WORKSPACE on how to use it.""" + -+ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +-load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") + load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") + load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") -+ load("//third_party/llvm:setup.bzl", "llvm_setup") -+@@ -25,8 +24,6 @@ def workspace(): -+ ], ++ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") ++@@ -24,8 +23,6 @@ def workspace(): ++ ), + ) + +- grpc_deps() @@ -911,14 +817,13 @@ index 0000000..6128f25 + # shadowing previous loads and trigger a buildifier warning. + xla_workspace1 = workspace +diff --git a/workspace2.bzl b/workspace2.bzl -+index 17458789c4..a577783d44 100644 ++index 8430d9842b..b07fcdf403 100644 +--- a/workspace2.bzl ++++ b/workspace2.bzl -+@@ -125,6 +125,23 @@ def _tf_toolchains(): -+ aarch64_repo = "../aarch64_linux_toolchain", ++@@ -155,6 +155,23 @@ def _tf_toolchains(): + armhf_repo = "../armhf_linux_toolchain", + ) -++ ++ ++def _grpc_impl(ctx): ++ path = ctx.os.environ["GRPC_BAZEL_DIR"] ++ ctx.execute(["cp", "-r", path, "."]) @@ -935,9 +840,10 @@ index 0000000..6128f25 ++ "systemlib": attr.label(mandatory=True), ++ }, ++) -+ +++ + # Define all external repositories required by TensorFlow + def _tf_repositories(): ++ """All external dependencies for TF builds.""" +@@ -365,12 +382,9 @@ def _tf_repositories(): + urls = tf_mirror_urls("https://curl.se/download/curl-8.11.0.tar.gz"), + ) @@ -953,23 +859,23 @@ index 0000000..6128f25 + ) + + # Load the raw llvm-project. llvm does not have build rules set up by default, -diff --git a/third_party/xla/0007-Disable-coordination_agent_recoverable-flag.patch b/third_party/xla/0007-Disable-coordination_agent_recoverable-flag.patch +diff --git a/third_party/xla/0005-Disable-coordination_agent_recoverable-flag.patch b/third_party/xla/0005-Disable-coordination_agent_recoverable-flag.patch new file mode 100644 -index 0000000..c223006 +index 000000000..911e2db15 --- /dev/null -+++ b/third_party/xla/0007-Disable-coordination_agent_recoverable-flag.patch ++++ b/third_party/xla/0005-Disable-coordination_agent_recoverable-flag.patch @@ -0,0 +1,35 @@ -+From e629f844604a26a5faf9fe5a343715e38c4f84e0 Mon Sep 17 00:00:00 2001 ++From 4c929f9a7f870cfe413761424aae8bae69cd2526 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Thu, 11 Sep 2025 21:30:50 +0200 -+Subject: [PATCH 07/12] Disable coordination_agent_recoverable flag ++Subject: [PATCH 5/9] Disable coordination_agent_recoverable flag + +--- + .../coordination/coordination_service_agent.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc b/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc -+index 58fca32ed1..7dc305e058 100644 ++index f44159c986..55a376f688 100644 +--- a/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc ++++ b/xla/tsl/distributed_runtime/coordination/coordination_service_agent.cc +@@ -57,9 +57,9 @@ limitations under the License. @@ -994,16 +900,16 @@ index 0000000..c223006 + LOG(WARNING) + << "Using experimental recoverable task feature. The default shutdown " + "barrier will only block non-recoverable tasks. If a synchronized " -diff --git a/third_party/xla/0008-absl_bad_-optional-variant-_access-is-now-header-onl.patch b/third_party/xla/0008-absl_bad_-optional-variant-_access-is-now-header-onl.patch +diff --git a/third_party/xla/0006-absl_bad_-optional-variant-_access-is-now-header-onl.patch b/third_party/xla/0006-absl_bad_-optional-variant-_access-is-now-header-onl.patch new file mode 100644 -index 0000000..433938e +index 000000000..62bf93334 --- /dev/null -+++ b/third_party/xla/0008-absl_bad_-optional-variant-_access-is-now-header-onl.patch ++++ b/third_party/xla/0006-absl_bad_-optional-variant-_access-is-now-header-onl.patch @@ -0,0 +1,29 @@ -+From c11358c6345d2727d0d0e6643660c548a9d2d32b Mon Sep 17 00:00:00 2001 ++From 6b0f2bcd2d715094a286bfd19c6a021d2749dc00 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Thu, 11 Sep 2025 21:33:07 +0200 -+Subject: [PATCH 08/12] absl_bad_{optional,variant}_access is now header-only ++Subject: [PATCH 6/9] absl_bad_{optional,variant}_access is now header-only + +--- + third_party/absl/system.absl.types.BUILD | 2 -- @@ -1029,16 +935,16 @@ index 0000000..433938e + deps = [ + "//absl/base:raw_logging_internal", + ], -diff --git a/third_party/xla/0009-Add-dependency-on-proto_bazel_features.patch b/third_party/xla/0009-Add-dependency-on-proto_bazel_features.patch +diff --git a/third_party/xla/0007-Add-dependency-on-proto_bazel_features.patch b/third_party/xla/0007-Add-dependency-on-proto_bazel_features.patch new file mode 100644 -index 0000000..cc0bb70 +index 000000000..698c4979c --- /dev/null -+++ b/third_party/xla/0009-Add-dependency-on-proto_bazel_features.patch ++++ b/third_party/xla/0007-Add-dependency-on-proto_bazel_features.patch @@ -0,0 +1,72 @@ -+From 3178784d768554de923e1be09bd47a8c8dfa5926 Mon Sep 17 00:00:00 2001 ++From 8685713f47728b579e6be5f79fd85caf9f4abc5e Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Fri, 12 Sep 2025 16:06:30 +0200 -+Subject: [PATCH 09/12] Add dependency on proto_bazel_features ++Subject: [PATCH 7/9] Add dependency on proto_bazel_features + +--- + workspace2.bzl | 4 +++- @@ -1046,7 +952,7 @@ index 0000000..cc0bb70 + 2 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/workspace2.bzl b/workspace2.bzl -+index a577783d44..6c70188ace 100644 ++index b07fcdf403..caacfc497b 100644 +--- a/workspace2.bzl ++++ b/workspace2.bzl +@@ -1,6 +1,7 @@ @@ -1056,8 +962,8 @@ index 0000000..cc0bb70 ++load("@proto_bazel_features//:deps.bzl", proto_bazel_features_deps = "bazel_features_deps") + load("@bazel_skylib//lib:versions.bzl", "versions") + load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") -+ load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external") -+@@ -723,7 +724,8 @@ def workspace(): ++ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") ++@@ -712,7 +713,8 @@ def workspace(): + # written according to common practice to query native.existing_rule()). + _tf_repositories() + @@ -1068,14 +974,14 @@ index 0000000..cc0bb70 + # Alias so it can be loaded without assigning to a different symbol to prevent + # shadowing previous loads and trigger a buildifier warning. +diff --git a/workspace3.bzl b/workspace3.bzl -+index feee699160..3167c567ff 100644 ++index 10212d4171..4ee266c676 100644 +--- a/workspace3.bzl ++++ b/workspace3.bzl -+@@ -25,6 +25,14 @@ def workspace(): -+ ], ++@@ -23,6 +23,14 @@ def workspace(): ++ ), + ) + -++ http_archive( +++ tf_http_archive( ++ name = "rules_java", ++ urls = [ ++ "https://github.com/bazelbuild/rules_java/releases/download/7.12.5/rules_java-7.12.5.tar.gz", @@ -1083,21 +989,21 @@ index 0000000..cc0bb70 ++ sha256 = "17b18cb4f92ab7b94aa343ce78531b73960b1bed2ba166e5b02c9fdf0b0ac270", ++ ) ++ -+ http_archive( ++ tf_http_archive( + name = "rules_license", -+ urls = [ -+@@ -44,12 +52,19 @@ def workspace(): ++ urls = tf_mirror_urls( ++@@ -40,12 +48,19 @@ def workspace(): + ) + -+ http_archive( ++ tf_http_archive( +- name = "bazel_features", ++ name = "proto_bazel_features", + sha256 = "4fd9922d464686820ffd8fcefa28ccffa147f7cdc6b6ac0d8b07fde565c65d66", + strip_prefix = "bazel_features-1.25.0", -+ url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.25.0/bazel_features-v1.25.0.tar.gz", ++ urls = tf_mirror_urls("https://github.com/bazel-contrib/bazel_features/releases/download/v1.25.0/bazel_features-v1.25.0.tar.gz"), + ) + -++ http_archive( +++ tf_http_archive( ++ name = "bazel_features", ++ sha256 = "c41853e3b636c533b86bf5ab4658064e6cc9db0a3bce52cbff0629e094344ca9", ++ strip_prefix = "bazel_features-1.33.0", @@ -1106,74 +1012,44 @@ index 0000000..cc0bb70 ++ + # Maven dependencies. + RULES_JVM_EXTERNAL_TAG = "4.3" -+ http_archive( -diff --git a/third_party/xla/0010-Update-gloo-version.patch b/third_party/xla/0010-Update-gloo-version.patch -new file mode 100644 -index 0000000..6657c48 ---- /dev/null -+++ b/third_party/xla/0010-Update-gloo-version.patch -@@ -0,0 +1,24 @@ -+From 2264ea2571f99a33056c81e2632ffde344201cf5 Mon Sep 17 00:00:00 2001 -+From: "Uwe L. Korn" -+Date: Mon, 15 Sep 2025 13:08:44 +0200 -+Subject: [PATCH 10/12] Update gloo version -+ -+--- -+ third_party/gloo/workspace.bzl | 4 ++-- -+ 1 file changed, 2 insertions(+), 2 deletions(-) -+ -+diff --git a/third_party/gloo/workspace.bzl b/third_party/gloo/workspace.bzl -+index ede168395a..64041780cd 100644 -+--- a/third_party/gloo/workspace.bzl -++++ b/third_party/gloo/workspace.bzl -+@@ -5,8 +5,8 @@ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") -+ def repo(): -+ """Imports Gloo.""" -+ -+- GLOO_COMMIT = "5354032ea08eadd7fc4456477f7f7c6308818509" -+- GLOO_SHA256 = "5759a06e6c8863c58e8ceadeb56f7c701fec89b2559ba33a103a447207bf69c7" -++ GLOO_COMMIT = "54cbae0d3a67fa890b4c3d9ee162b7860315e341" -++ GLOO_SHA256 = "61089361dbdbc9d6f75e297148369b13f615a3e6b78de1be56cce74ca2f64940" -+ + tf_http_archive( -+ name = "gloo", -diff --git a/third_party/xla/0011-Add-macos_x86_64-to-mkl_deps.patch b/third_party/xla/0011-Add-macos_x86_64-to-mkl_deps.patch +diff --git a/third_party/xla/0008-Add-macos_x86_64-to-mkl_deps.patch b/third_party/xla/0008-Add-macos_x86_64-to-mkl_deps.patch new file mode 100644 -index 0000000..0907f79 +index 000000000..9592e43ff --- /dev/null -+++ b/third_party/xla/0011-Add-macos_x86_64-to-mkl_deps.patch ++++ b/third_party/xla/0008-Add-macos_x86_64-to-mkl_deps.patch @@ -0,0 +1,21 @@ -+From 9eb91fcb7bcdeb14962fd5dfb91a3f1fb37a3c00 Mon Sep 17 00:00:00 2001 ++From 8815c952dfd06d73376f94b1c92156c3e9fc2ef7 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Sat, 20 Sep 2025 08:15:14 +0200 -+Subject: [PATCH 11/12] Add macos_x86_64 to mkl_deps ++Subject: [PATCH 8/9] Add macos_x86_64 to mkl_deps + +--- + xla/tsl/mkl/build_defs.bzl | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xla/tsl/mkl/build_defs.bzl b/xla/tsl/mkl/build_defs.bzl -+index d247197d46..bea4f8fc2e 100644 ++index 81f8015b39..fa62eaf299 100644 +--- a/xla/tsl/mkl/build_defs.bzl ++++ b/xla/tsl/mkl/build_defs.bzl -+@@ -107,6 +107,7 @@ def mkl_deps(): -+ "@xla//xla/tsl/mkl:build_with_mkl_aarch64": ["@mkl_dnn_acl_compatible//:mkl_dnn_acl"], -+ "@xla//xla/tsl:linux_x86_64_with_onednn_async": ["@onednn_async//:mkl_dnn"], -+ "@xla//xla/tsl:linux_x86_64": ["@onednn//:mkl_dnn"], -++ "@xla//xla/tsl:macos_x86_64": ["@onednn//:mkl_dnn"], -+ "@xla//xla/tsl:windows": ["@onednn//:mkl_dnn"], ++@@ -111,6 +111,7 @@ def mkl_deps(): ++ Label("//xla/tsl/mkl:build_with_mkl_aarch64"): ["@mkl_dnn_acl_compatible//:mkl_dnn_acl"], ++ Label("//xla/tsl:linux_x86_64_with_onednn_async"): ["@onednn_async//:mkl_dnn"], ++ Label("//xla/tsl:linux_x86_64"): ["@onednn//:mkl_dnn"], +++ Label("//xla/tsl:macos_x86_64"): ["@onednn//:mkl_dnn"], ++ Label("//xla/tsl:windows"): ["@onednn//:mkl_dnn"], + "//conditions:default": [], + }) -diff --git a/third_party/xla/0012-Add-systemlib-for-oneDNN.patch b/third_party/xla/0012-Add-systemlib-for-oneDNN.patch +diff --git a/third_party/xla/0009-Add-systemlib-for-oneDNN.patch b/third_party/xla/0009-Add-systemlib-for-oneDNN.patch new file mode 100644 -index 0000000..a2a69d4 +index 000000000..c1c01e39e --- /dev/null -+++ b/third_party/xla/0012-Add-systemlib-for-oneDNN.patch ++++ b/third_party/xla/0009-Add-systemlib-for-oneDNN.patch @@ -0,0 +1,35 @@ -+From c524ab99bb701ff0169818a02049332da51dd359 Mon Sep 17 00:00:00 2001 ++From f7813c3979892652d09d5d163cf44ca72ae817e9 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Fri, 26 Sep 2025 17:23:37 +0200 -+Subject: [PATCH 12/12] Add systemlib for oneDNN ++Subject: [PATCH 9/9] Add systemlib for oneDNN + +--- + third_party/mkl_dnn/mkldnn_system.BUILD | 6 ++++++ @@ -1194,45 +1070,36 @@ index 0000000..a2a69d4 ++) ++ +diff --git a/workspace2.bzl b/workspace2.bzl -+index 6c70188ace..c30c4f7033 100644 ++index caacfc497b..8a1630f141 100644 +--- a/workspace2.bzl ++++ b/workspace2.bzl -+@@ -195,6 +195,7 @@ def _tf_repositories(): -+ name = "onednn", ++@@ -194,6 +194,7 @@ def _tf_repositories(): ++ name = "onednn_async", + build_file = "//third_party/mkl_dnn:mkldnn_v1.BUILD", + patch_file = ["//third_party/mkl_dnn:setting_init.patch"], ++ system_build_file = "//third_party/mkl_dnn:mkldnn_system.BUILD", -+ sha256 = "071f289dc961b43a3b7c8cbe8a305290a7c5d308ec4b2f586397749abdc88296", -+ strip_prefix = "oneDNN-3.7.3", -+ urls = tf_mirror_urls("https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.7.3.tar.gz"), ++ sha256 = "1cfa18fad65b4c3b46ef701a83c64b87411d63e79c8549cdb37f8c1fc10e2398", ++ strip_prefix = "oneDNN-dev-v3.7-thunk-preview", ++ urls = tf_mirror_urls("https://github.com/oneapi-src/oneDNN/archive/refs/heads/dev-v3.7-thunk-preview.tar.gz"), diff --git a/third_party/xla/workspace.bzl b/third_party/xla/workspace.bzl -index be345f8..f2c0bf0 100644 +index be345f8c6..a51431f3f 100644 --- a/third_party/xla/workspace.bzl +++ b/third_party/xla/workspace.bzl -@@ -26,6 +26,20 @@ def repo(): +@@ -26,6 +26,17 @@ def repo(): # web links (`/archive/`) links so we use the GitHub API endpoint to get the tarball # instead. urls = tf_mirror_urls("https://api.github.com/repos/openxla/xla/tarball/{commit}".format(commit = XLA_COMMIT)), + patch_file = [ -+ "//third_party/xla:0001-Support-third-party-build-of-boringssl.patch", -+ "//third_party/xla:0002-Fix-abseil-headers.patch", -+ "//third_party/xla:0003-Omit-usage-of-StrFormat.patch", -+ "//third_party/xla:0004-Re-enable-system-abseil.patch", -+ "//third_party/xla:0005-Check-whether-absl-log-is-already-initialized.patch", -+ "//third_party/xla:0006-Unbundle-grpc.patch", -+ "//third_party/xla:0007-Disable-coordination_agent_recoverable-flag.patch", -+ "//third_party/xla:0008-absl_bad_-optional-variant-_access-is-now-header-onl.patch", -+ "//third_party/xla:0009-Add-dependency-on-proto_bazel_features.patch", -+ "//third_party/xla:0010-Update-gloo-version.patch", -+ "//third_party/xla:0011-Add-macos_x86_64-to-mkl_deps.patch", -+ "//third_party/xla:0012-Add-systemlib-for-oneDNN.patch", ++ "//third_party/xla:0001-Fix-abseil-headers.patch", ++ "//third_party/xla:0002-Re-enable-system-abseil.patch", ++ "//third_party/xla:0003-Check-whether-absl-log-is-already-initialized.patch", ++ "//third_party/xla:0004-Unbundle-grpc.patch", ++ "//third_party/xla:0005-Disable-coordination_agent_recoverable-flag.patch", ++ "//third_party/xla:0006-absl_bad_-optional-variant-_access-is-now-header-onl.patch", ++ "//third_party/xla:0007-Add-dependency-on-proto_bazel_features.patch", ++ "//third_party/xla:0008-Add-macos_x86_64-to-mkl_deps.patch", ++ "//third_party/xla:0009-Add-systemlib-for-oneDNN.patch", + ], ) # For development, one often wants to make changes to the TF repository as well -@@ -39,4 +53,4 @@ def repo(): - # local_repository( - # name = "xla", - # path = "/path/to/xla", -- # ) -+ # ) diff --git a/recipe/patches/0003-avoid-mirror-that-doesn-t-seem-to-have-current-xla-a.patch b/recipe/patches/0003-avoid-mirror-that-doesn-t-seem-to-have-current-xla-a.patch index e44b616d..2622d28d 100644 --- a/recipe/patches/0003-avoid-mirror-that-doesn-t-seem-to-have-current-xla-a.patch +++ b/recipe/patches/0003-avoid-mirror-that-doesn-t-seem-to-have-current-xla-a.patch @@ -1,4 +1,4 @@ -From 3d45c7e1f6615b54ff8f23bc94f3872d511f0027 Mon Sep 17 00:00:00 2001 +From aac04617087f0e6c383b0bd7f138057e7f6ce818 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 27 Jul 2025 10:42:28 +1100 Subject: [PATCH 3/4] avoid mirror that doesn't seem to have current xla @@ -10,7 +10,7 @@ and tell tf_http_archive to shut up about it 1 file changed, 15 deletions(-) diff --git a/third_party/repo.bzl b/third_party/repo.bzl -index 185c5a4..ae971cf 100644 +index f09875140..98dc0c1af 100644 --- a/third_party/repo.bzl +++ b/third_party/repo.bzl @@ -23,7 +23,6 @@ def tf_mirror_urls(url): diff --git a/recipe/patches/0004-re-enable-use_fast_cpp_protos-true.patch b/recipe/patches/0004-re-enable-use_fast_cpp_protos-true.patch index 8f428bb0..6da701b3 100644 --- a/recipe/patches/0004-re-enable-use_fast_cpp_protos-true.patch +++ b/recipe/patches/0004-re-enable-use_fast_cpp_protos-true.patch @@ -1,4 +1,4 @@ -From 8dbab2b1165a13a3d047dcb879f8b2d5f0448445 Mon Sep 17 00:00:00 2001 +From 65725993d089a1e3684db0c02a62692fda2f4d48 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 31 Aug 2025 13:28:45 +1100 Subject: [PATCH 4/4] re-enable use_fast_cpp_protos=true @@ -8,15 +8,15 @@ Subject: [PATCH 4/4] re-enable use_fast_cpp_protos=true 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc -index b349564..882145c 100644 +index 371f4b78a..f554d47d0 100644 --- a/.bazelrc +++ b/.bazelrc -@@ -121,7 +121,7 @@ build --repo_env=RULES_PYTHON_ENABLE_PYSTAR=0 +@@ -134,7 +134,7 @@ common --@rules_python//python/config_settings:precompile=force_disabled # of cc_binary shared libraries artifacts, which will mess with how we link # protobuf dependencies ourselves. By default this value is false, but some # projects enable it, which we don't want here. --# build --define=use_fast_cpp_protos=true -+build --define=use_fast_cpp_protos=true +-# common --define=use_fast_cpp_protos=true ++common --define=use_fast_cpp_protos=true - build:nonccl --define=no_nccl_support=true + common:nonccl --define=no_nccl_support=true diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 94243725..cfe85db6 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -1,8 +1,8 @@ schema_version: 1 context: - version: 0.7.2 - build: 2 + version: "0.8.2" + build: 0 package: name: jaxlib @@ -11,7 +11,7 @@ package: source: # only pull sources after upstream PyPI release... url: https://github.com/jax-ml/jax/archive/jax-v${{ version }}.tar.gz - sha256: 56d92604f1bb60bb3dbd7dc7c7dc21502d10b3474b8b905ce29ce06db6a26e45 + sha256: f7e5080c97c1aaffb490a17d174cb59a83dd037800d9c41d309287bebd15b0b8 patches: - patches/0001-Allow-for-custom-CUDA-build.patch - patches/0002-Consolidated-build-fixes-for-XLA.patch @@ -21,7 +21,7 @@ source: build: number: ${{ build if cuda_compiler_version == "None" else build + 200 }} string: ${{ "cpu" if cuda_compiler_version == "None" else "cuda" + (cuda_compiler_version | replace('.', '')) }}_py${{ python | version_to_buildstring }}h${{ hash }}_${{ build if cuda_compiler_version == "None" else build + 200 }} - skip: match(python, "<3.11") or win + skip: match(python, "!=3.13") or win requirements: build: