From 1222b8dbefa00610601a16c2a1c99c251294d703 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 11 Oct 2024 10:34:45 +0200 Subject: [PATCH] Update patches --- recipe/meta.yaml | 54 ++--- recipe/patches/0001-loosen-requirements.patch | 19 +- ...absl_synchronization-linkage-to-gRPC.patch | 6 +- ...-any_invocable-target-to-absel-bazel.patch | 21 -- ...=> 0003-Fix-missing-abseil-linkages.patch} | 6 +- ...-Fix-protobuf_python-for-systemlibs.patch} | 10 +- ...atch => 0005-Add-absl_log-systemlib.patch} | 8 +- ...ayout_proto_cc-if-protobuf-linkage-.patch} | 6 +- ... => 0007-Fix-further-abseil-linkage.patch} | 6 +- ...dd-constraint-to-pybind11-systemlib.patch} | 6 +- ...file-ending-for-flatbuffers-LICENSE.patch} | 6 +- ...=> 0010-Use-correct-hermetic-python.patch} | 8 +- ..._types_py_pb2-to-protobuf-systemlib.patch} | 6 +- ...atch => 0012-Add-protobuf-toolchain.patch} | 6 +- ...genproto.patch => 0013-fix-genproto.patch} | 6 +- ...me-usage-of-absl-str_format-in-CUDA.patch} | 10 +- ...-Adjust-relative-path-for-libdevice.patch} | 6 +- ...bsl_log_flags-instead-of-absl_flags.patch} | 8 +- ...efinition-for-libabsl_vlog_config_i.patch} | 6 +- ...=> 0018-add-absl_string_view-target.patch} | 6 +- ...=> 0019-add-absl_nullability-target.patch} | 6 +- ...ch => 0020-add-absl_prefetch-target.patch} | 6 +- ...=> 0021-add-absl_die_if_null-target.patch} | 6 +- ...tch => 0022-add-absl_crc32c-targets.patch} | 8 +- ...-add-kernel_timeout_internal-target.patch} | 6 +- ...arning-that-clang-falsely-treats-as.patch} | 6 +- ...e-BUILD_PREFIX-in-build_pip_package.patch} | 9 +- ...sparse_core_layout_proto_cc-headers.patch} | 7 +- .../0027-Protobuf-5-compatability.patch | 209 ++++++++++++++++++ 29 files changed, 331 insertions(+), 142 deletions(-) delete mode 100644 recipe/patches/0003-Add-missing-any_invocable-target-to-absel-bazel.patch rename recipe/patches/{0004-Fix-missing-abseil-linkages.patch => 0003-Fix-missing-abseil-linkages.patch} (80%) rename recipe/patches/{0005-Fix-protobuf_python-for-systemlibs.patch => 0004-Fix-protobuf_python-for-systemlibs.patch} (93%) rename recipe/patches/{0006-Add-absl_log-systemlib.patch => 0005-Add-absl_log-systemlib.patch} (88%) rename recipe/patches/{0007-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch => 0006-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch} (80%) rename recipe/patches/{0008-Fix-further-abseil-linkage.patch => 0007-Fix-further-abseil-linkage.patch} (87%) rename recipe/patches/{0009-Add-constraint-to-pybind11-systemlib.patch => 0008-Add-constraint-to-pybind11-systemlib.patch} (77%) rename recipe/patches/{0010-Different-file-ending-for-flatbuffers-LICENSE.patch => 0009-Different-file-ending-for-flatbuffers-LICENSE.patch} (78%) rename recipe/patches/{0011-Use-correct-hermetic-python.patch => 0010-Use-correct-hermetic-python.patch} (88%) rename recipe/patches/{0012-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch => 0011-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch} (81%) rename recipe/patches/{0013-Add-protobuf-toolchain.patch => 0012-Add-protobuf-toolchain.patch} (87%) rename recipe/patches/{0014-fix-genproto.patch => 0013-fix-genproto.patch} (87%) rename recipe/patches/{0015-Remove-some-usage-of-absl-str_format-in-CUDA.patch => 0014-Remove-some-usage-of-absl-str_format-in-CUDA.patch} (91%) rename recipe/patches/{0019-Adjust-relative-path-for-libdevice.patch => 0015-Adjust-relative-path-for-libdevice.patch} (87%) rename recipe/patches/{0021-Link-to-absl_log_flags-instead-of-absl_flags.patch => 0016-Link-to-absl_log_flags-instead-of-absl_flags.patch} (85%) rename recipe/patches/{0022-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch => 0017-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch} (85%) rename recipe/patches/{0024-add-absl_string_view-target.patch => 0018-add-absl_string_view-target.patch} (84%) rename recipe/patches/{0025-add-absl_nullability-target.patch => 0019-add-absl_nullability-target.patch} (79%) rename recipe/patches/{0026-add-absl_prefetch-target.patch => 0020-add-absl_prefetch-target.patch} (79%) rename recipe/patches/{0027-add-absl_die_if_null-target.patch => 0021-add-absl_die_if_null-target.patch} (83%) rename recipe/patches/{0028-add-absl_crc32c-targets.patch => 0022-add-absl_crc32c-targets.patch} (92%) rename recipe/patches/{0030-add-kernel_timeout_internal-target.patch => 0023-add-kernel_timeout_internal-target.patch} (87%) rename recipe/patches/{0031-work-around-for-warning-that-clang-falsely-treats-as.patch => 0024-work-around-for-warning-that-clang-falsely-treats-as.patch} (77%) rename recipe/patches/{0001-Hardcode-BUILD_PREFIX-in-build_pip_package.patch => 0025-Hardcode-BUILD_PREFIX-in-build_pip_package.patch} (87%) rename recipe/patches/{0001-Only-link-to-sparse_core_layout_proto_cc-headers.patch => 0026-Only-link-to-sparse_core_layout_proto_cc-headers.patch} (83%) create mode 100644 recipe/patches/0027-Protobuf-5-compatability.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 21823ac4..b29c1ddd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -22,31 +22,31 @@ source: patches: - patches/0001-loosen-requirements.patch - patches/0002-Add-additional-absl_synchronization-linkage-to-gRPC.patch - # - patches/0003-Add-missing-any_invocable-target-to-absel-bazel.patch - - patches/0004-Fix-missing-abseil-linkages.patch - - patches/0005-Fix-protobuf_python-for-systemlibs.patch - - patches/0006-Add-absl_log-systemlib.patch - - patches/0007-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch - - patches/0008-Fix-further-abseil-linkage.patch - - patches/0009-Add-constraint-to-pybind11-systemlib.patch - - patches/0010-Different-file-ending-for-flatbuffers-LICENSE.patch - - patches/0011-Use-correct-hermetic-python.patch - - patches/0012-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch - - patches/0013-Add-protobuf-toolchain.patch - - patches/0014-fix-genproto.patch - - patches/0015-Remove-some-usage-of-absl-str_format-in-CUDA.patch # [(cuda_compiler_version or "").startswith("11")] - - patches/0019-Adjust-relative-path-for-libdevice.patch # [(cuda_compiler_version or "").startswith("12")] - - patches/0021-Link-to-absl_log_flags-instead-of-absl_flags.patch - - patches/0022-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch - - patches/0024-add-absl_string_view-target.patch - - patches/0025-add-absl_nullability-target.patch - - patches/0026-add-absl_prefetch-target.patch - - patches/0027-add-absl_die_if_null-target.patch - - patches/0028-add-absl_crc32c-targets.patch - - patches/0030-add-kernel_timeout_internal-target.patch - - patches/0031-work-around-for-warning-that-clang-falsely-treats-as.patch - - patches/0001-Hardcode-BUILD_PREFIX-in-build_pip_package.patch - - patches/0001-Only-link-to-sparse_core_layout_proto_cc-headers.patch + - patches/0003-Fix-missing-abseil-linkages.patch + - patches/0004-Fix-protobuf_python-for-systemlibs.patch + - patches/0005-Add-absl_log-systemlib.patch + - patches/0006-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch + - patches/0007-Fix-further-abseil-linkage.patch + - patches/0008-Add-constraint-to-pybind11-systemlib.patch + - patches/0009-Different-file-ending-for-flatbuffers-LICENSE.patch + - patches/0010-Use-correct-hermetic-python.patch + - patches/0011-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch + - patches/0012-Add-protobuf-toolchain.patch + - patches/0013-fix-genproto.patch + - patches/0014-Remove-some-usage-of-absl-str_format-in-CUDA.patch # [(cuda_compiler_version or "").startswith("11")] + - patches/0015-Adjust-relative-path-for-libdevice.patch # [(cuda_compiler_version or "").startswith("11")] + - patches/0016-Link-to-absl_log_flags-instead-of-absl_flags.patch + - patches/0017-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch + - patches/0018-add-absl_string_view-target.patch + - patches/0019-add-absl_nullability-target.patch + - patches/0020-add-absl_prefetch-target.patch + - patches/0021-add-absl_die_if_null-target.patch + - patches/0022-add-absl_crc32c-targets.patch + - patches/0023-add-kernel_timeout_internal-target.patch + - patches/0024-work-around-for-warning-that-clang-falsely-treats-as.patch + - patches/0025-Hardcode-BUILD_PREFIX-in-build_pip_package.patch + - patches/0026-Only-link-to-sparse_core_layout_proto_cc-headers.patch + - patches/0027-Protobuf-5-compatability.patch - url: https://github.com/tensorflow/estimator/archive/refs/tags/v{{ estimator_version.replace(".rc", "-rc") }}.tar.gz sha256: 2d7e100b1878084da34b5e23b49a0cbb5ee8a7add74b7dd189a82ada1cf85530 folder: tensorflow-estimator @@ -226,7 +226,7 @@ outputs: - ml_dtypes >={{ ml_dtypes_version }},<0.5 - numpy - opt_einsum >=2.3.2 - - protobuf >=3.20.3,<5,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5 + - protobuf >=3.20.3,<6,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5 - python-flatbuffers >=24.3.25 - requests >=2.21.0,<3 - six >=1.12 @@ -247,7 +247,7 @@ outputs: - h5py >=3.10 - ml_dtypes >={{ ml_dtypes_version }},<0.5 - opt_einsum >=2.3.2 - - protobuf >=3.20.3,<5,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5 + - protobuf >=3.20.3,<6,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5 - python-flatbuffers >=24.3.25 - requests >=2.21.0,<3 - six >=1.12 diff --git a/recipe/patches/0001-loosen-requirements.patch b/recipe/patches/0001-loosen-requirements.patch index 05ae8a66..c6df4eb8 100644 --- a/recipe/patches/0001-loosen-requirements.patch +++ b/recipe/patches/0001-loosen-requirements.patch @@ -1,7 +1,7 @@ -From d24a4fa081de2b6489c7d7ea478a575e85446a5a Mon Sep 17 00:00:00 2001 +From e6a16ebf1cb912b32f8fa6f9b26dbe8add0d930b Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 30 Dec 2021 06:57:09 +0200 -Subject: [PATCH 01/26] loosen requirements +Subject: [PATCH 01/27] loosen requirements * Remove unused libclang requirement * Remove unecessary tensorflow-io-gcs-filesystem @@ -9,15 +9,16 @@ Subject: [PATCH 01/26] loosen requirements Co-authored-by: Mark Harfouche Co-authored-by: ngam +Co-authored-by: Uwe L. Korn --- - tensorflow/tools/pip_package/setup.py | 6 ------ - 1 file changed, 6 deletions(-) + tensorflow/tools/pip_package/setup.py | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py -index e6bf64aefcb..8fca642c49b 100644 +index 88da8b54..ac24634f 100644 --- a/tensorflow/tools/pip_package/setup.py +++ b/tensorflow/tools/pip_package/setup.py -@@ -82,11 +82,7 @@ REQUIRED_PACKAGES = [ +@@ -82,16 +82,12 @@ REQUIRED_PACKAGES = [ 'gast >=0.2.1,!=0.5.0,!=0.5.1,!=0.5.2', 'google_pasta >= 0.1.1', 'h5py >= 3.10.0', @@ -29,6 +30,12 @@ index e6bf64aefcb..8fca642c49b 100644 'opt_einsum >= 2.3.2', 'packaging', # pylint:disable=line-too-long + ( +- 'protobuf>=3.20.3,<5.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5' ++ 'protobuf>=3.20.3,<6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5' + ), + 'requests >= 2.21.0, < 3', + 'setuptools', @@ -99,8 +95,6 @@ REQUIRED_PACKAGES = [ 'termcolor >= 1.1.0', 'typing_extensions >= 3.6.6', diff --git a/recipe/patches/0002-Add-additional-absl_synchronization-linkage-to-gRPC.patch b/recipe/patches/0002-Add-additional-absl_synchronization-linkage-to-gRPC.patch index d630fe71..db5cd2ba 100644 --- a/recipe/patches/0002-Add-additional-absl_synchronization-linkage-to-gRPC.patch +++ b/recipe/patches/0002-Add-additional-absl_synchronization-linkage-to-gRPC.patch @@ -1,14 +1,14 @@ -From a7b136cddfa93f4fb0bdd29b42171da32a1fcaa1 Mon Sep 17 00:00:00 2001 +From 14a1b6162855bfe8d8d16cbd054f98afba4f16e5 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 30 Jun 2023 08:39:32 +0000 -Subject: [PATCH 02/26] Add additional absl_synchronization linkage to gRPC +Subject: [PATCH 02/27] Add additional absl_synchronization linkage to gRPC --- third_party/systemlibs/grpc.BUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/systemlibs/grpc.BUILD b/third_party/systemlibs/grpc.BUILD -index 8b703f11556..417baf5d342 100644 +index 8b703f11..417baf5d 100644 --- a/third_party/systemlibs/grpc.BUILD +++ b/third_party/systemlibs/grpc.BUILD @@ -10,6 +10,7 @@ cc_library( diff --git a/recipe/patches/0003-Add-missing-any_invocable-target-to-absel-bazel.patch b/recipe/patches/0003-Add-missing-any_invocable-target-to-absel-bazel.patch deleted file mode 100644 index 66c85311..00000000 --- a/recipe/patches/0003-Add-missing-any_invocable-target-to-absel-bazel.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 54b33e2b2a3dd7031e42e1daafc0d92b89670dc2 Mon Sep 17 00:00:00 2001 -From: "Uwe L. Korn" -Date: Sun, 2 Jul 2023 05:36:41 +0000 -Subject: [PATCH 03/26] Add missing any_invocable target to absel bazel - ---- - third_party/absl/system.absl.functional.BUILD | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/third_party/absl/system.absl.functional.BUILD b/third_party/absl/system.absl.functional.BUILD -index 9439bd0ba22..c46e5bd8174 100644 ---- a/third_party/absl/system.absl.functional.BUILD -+++ b/third_party/absl/system.absl.functional.BUILD -@@ -13,3 +13,7 @@ cc_library( - cc_library( - name = "function_ref", - ) -+ -+cc_library( -+ name = "any_invocable", -+) diff --git a/recipe/patches/0004-Fix-missing-abseil-linkages.patch b/recipe/patches/0003-Fix-missing-abseil-linkages.patch similarity index 80% rename from recipe/patches/0004-Fix-missing-abseil-linkages.patch rename to recipe/patches/0003-Fix-missing-abseil-linkages.patch index 4e1285b6..047d0fb0 100644 --- a/recipe/patches/0004-Fix-missing-abseil-linkages.patch +++ b/recipe/patches/0003-Fix-missing-abseil-linkages.patch @@ -1,14 +1,14 @@ -From 7e6424acaf920e2fef3e76ceab9441b44b3da474 Mon Sep 17 00:00:00 2001 +From 7dc829cca3ae349278ca7f9186c5c5db5a81a390 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 3 Jul 2023 04:45:46 +0000 -Subject: [PATCH 04/26] Fix missing abseil linkages +Subject: [PATCH 03/27] Fix missing abseil linkages --- third_party/absl/system.absl.strings.BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/absl/system.absl.strings.BUILD b/third_party/absl/system.absl.strings.BUILD -index fa9a7a84f67..d04776c98bf 100644 +index fa9a7a84..d04776c9 100644 --- a/third_party/absl/system.absl.strings.BUILD +++ b/third_party/absl/system.absl.strings.BUILD @@ -26,7 +26,7 @@ cc_library( diff --git a/recipe/patches/0005-Fix-protobuf_python-for-systemlibs.patch b/recipe/patches/0004-Fix-protobuf_python-for-systemlibs.patch similarity index 93% rename from recipe/patches/0005-Fix-protobuf_python-for-systemlibs.patch rename to recipe/patches/0004-Fix-protobuf_python-for-systemlibs.patch index 3ac8f678..925704b2 100644 --- a/recipe/patches/0005-Fix-protobuf_python-for-systemlibs.patch +++ b/recipe/patches/0004-Fix-protobuf_python-for-systemlibs.patch @@ -1,7 +1,7 @@ -From a85d488fc329c1e6805467c73f1aa58cdbae5932 Mon Sep 17 00:00:00 2001 +From d70aa0acf092f069a154502100abd8c6f230129d Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 30 Aug 2023 16:58:41 +0200 -Subject: [PATCH 05/26] Fix protobuf_python for systemlibs +Subject: [PATCH 04/27] Fix protobuf_python for systemlibs --- tensorflow/workspace2.bzl | 9 ++++--- @@ -12,7 +12,7 @@ Subject: [PATCH 05/26] Fix protobuf_python for systemlibs create mode 100644 third_party/systemlibs/protobuf_python.bzl diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl -index fd29dff05f3..dc78011d154 100644 +index fd29dff0..dc78011d 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -382,6 +382,7 @@ def _tf_repositories(): @@ -40,7 +40,7 @@ index fd29dff05f3..dc78011d154 100644 tf_http_archive( diff --git a/third_party/pybind11_protobuf/0001-Add-Python-include-path.patch b/third_party/pybind11_protobuf/0001-Add-Python-include-path.patch new file mode 100644 -index 00000000000..18a1ddf84f3 +index 00000000..18a1ddf8 --- /dev/null +++ b/third_party/pybind11_protobuf/0001-Add-Python-include-path.patch @@ -0,0 +1,26 @@ @@ -72,7 +72,7 @@ index 00000000000..18a1ddf84f3 + diff --git a/third_party/systemlibs/protobuf_python.bzl b/third_party/systemlibs/protobuf_python.bzl new file mode 100644 -index 00000000000..982617a765c +index 00000000..982617a7 --- /dev/null +++ b/third_party/systemlibs/protobuf_python.bzl @@ -0,0 +1,5 @@ diff --git a/recipe/patches/0006-Add-absl_log-systemlib.patch b/recipe/patches/0005-Add-absl_log-systemlib.patch similarity index 88% rename from recipe/patches/0006-Add-absl_log-systemlib.patch rename to recipe/patches/0005-Add-absl_log-systemlib.patch index 4319b7f5..fffca4eb 100644 --- a/recipe/patches/0006-Add-absl_log-systemlib.patch +++ b/recipe/patches/0005-Add-absl_log-systemlib.patch @@ -1,7 +1,7 @@ -From 036609cde2a977e3db691f6acd7c962fe75aa3c3 Mon Sep 17 00:00:00 2001 +From 6d4c056204f6417cc7b01706d0a6b063a50e40e3 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 30 Aug 2023 16:59:28 +0200 -Subject: [PATCH 06/26] Add absl_log systemlib +Subject: [PATCH 05/27] Add absl_log systemlib --- third_party/absl/system.absl.log.BUILD | 22 ++++++++++++++++++++++ @@ -11,7 +11,7 @@ Subject: [PATCH 06/26] Add absl_log systemlib diff --git a/third_party/absl/system.absl.log.BUILD b/third_party/absl/system.absl.log.BUILD new file mode 100644 -index 00000000000..0248bda0f52 +index 00000000..0248bda0 --- /dev/null +++ b/third_party/absl/system.absl.log.BUILD @@ -0,0 +1,22 @@ @@ -38,7 +38,7 @@ index 00000000000..0248bda0f52 + ], +) diff --git a/third_party/absl/workspace.bzl b/third_party/absl/workspace.bzl -index 06f75166ce4..c54df3cfbae 100644 +index 06f75166..c54df3cf 100644 --- a/third_party/absl/workspace.bzl +++ b/third_party/absl/workspace.bzl @@ -20,6 +20,7 @@ def repo(): diff --git a/recipe/patches/0007-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch b/recipe/patches/0006-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch similarity index 80% rename from recipe/patches/0007-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch rename to recipe/patches/0006-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch index 3fac6821..77c293cb 100644 --- a/recipe/patches/0007-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch +++ b/recipe/patches/0006-Omit-linking-to-layout_proto_cc-if-protobuf-linkage-.patch @@ -1,7 +1,7 @@ -From e9feef5aac6131684d9e6bca2d77744293e8d404 Mon Sep 17 00:00:00 2001 +From 5c31fdbd5aec3c392ae578bcac615c4d2c77e564 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 15 Sep 2023 11:06:27 +0200 -Subject: [PATCH 07/26] Omit linking to layout_proto_cc if protobuf linkage is +Subject: [PATCH 06/27] Omit linking to layout_proto_cc if protobuf linkage is shared --- @@ -9,7 +9,7 @@ Subject: [PATCH 07/26] Omit linking to layout_proto_cc if protobuf linkage is 1 file changed, 1 deletion(-) diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD -index c3f9a377e01..b0432b1487a 100644 +index c3f9a377..b0432b14 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -1366,7 +1366,6 @@ tf_python_pybind_extension( diff --git a/recipe/patches/0008-Fix-further-abseil-linkage.patch b/recipe/patches/0007-Fix-further-abseil-linkage.patch similarity index 87% rename from recipe/patches/0008-Fix-further-abseil-linkage.patch rename to recipe/patches/0007-Fix-further-abseil-linkage.patch index e91923bd..000b2239 100644 --- a/recipe/patches/0008-Fix-further-abseil-linkage.patch +++ b/recipe/patches/0007-Fix-further-abseil-linkage.patch @@ -1,14 +1,14 @@ -From c1627bfe244fde6c38343d0cf31103e9e2bf1e63 Mon Sep 17 00:00:00 2001 +From 46645306963d53e96f4bde85a7a7fd4960a5a447 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 18 Sep 2023 14:47:08 +0000 -Subject: [PATCH 08/26] Fix further abseil linkage +Subject: [PATCH 07/27] Fix further abseil linkage --- third_party/absl/system.absl.base.BUILD | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/third_party/absl/system.absl.base.BUILD b/third_party/absl/system.absl.base.BUILD -index d6bf8748dee..b3e42f4dd8b 100644 +index d6bf8748..b3e42f4d 100644 --- a/third_party/absl/system.absl.base.BUILD +++ b/third_party/absl/system.absl.base.BUILD @@ -17,12 +17,22 @@ package(default_visibility = ["//visibility:public"]) diff --git a/recipe/patches/0009-Add-constraint-to-pybind11-systemlib.patch b/recipe/patches/0008-Add-constraint-to-pybind11-systemlib.patch similarity index 77% rename from recipe/patches/0009-Add-constraint-to-pybind11-systemlib.patch rename to recipe/patches/0008-Add-constraint-to-pybind11-systemlib.patch index a8a32363..64e6905e 100644 --- a/recipe/patches/0009-Add-constraint-to-pybind11-systemlib.patch +++ b/recipe/patches/0008-Add-constraint-to-pybind11-systemlib.patch @@ -1,14 +1,14 @@ -From f916b95f6d93a1d52b26679919410a2d159d59d1 Mon Sep 17 00:00:00 2001 +From 6d8aae7e5e303b9b0bb6731e13032388d4e38d50 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 27 Oct 2023 11:20:12 +0200 -Subject: [PATCH 09/26] Add constraint to pybind11 systemlib +Subject: [PATCH 08/27] Add constraint to pybind11 systemlib --- third_party/systemlibs/pybind11.BUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/third_party/systemlibs/pybind11.BUILD b/third_party/systemlibs/pybind11.BUILD -index 44e7496fc25..21ec073b7a4 100644 +index 44e7496f..21ec073b 100644 --- a/third_party/systemlibs/pybind11.BUILD +++ b/third_party/systemlibs/pybind11.BUILD @@ -6,3 +6,9 @@ cc_library( diff --git a/recipe/patches/0010-Different-file-ending-for-flatbuffers-LICENSE.patch b/recipe/patches/0009-Different-file-ending-for-flatbuffers-LICENSE.patch similarity index 78% rename from recipe/patches/0010-Different-file-ending-for-flatbuffers-LICENSE.patch rename to recipe/patches/0009-Different-file-ending-for-flatbuffers-LICENSE.patch index f5d20af1..430ed382 100644 --- a/recipe/patches/0010-Different-file-ending-for-flatbuffers-LICENSE.patch +++ b/recipe/patches/0009-Different-file-ending-for-flatbuffers-LICENSE.patch @@ -1,14 +1,14 @@ -From 0c982ab8bb100e511b4707206f1cfdbb0d38e9e7 Mon Sep 17 00:00:00 2001 +From a2a3cc6043d732aa17498ef46735405498c59bf7 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 27 Oct 2023 11:21:11 +0200 -Subject: [PATCH 10/26] Different file ending for flatbuffers LICENSE +Subject: [PATCH 09/27] Different file ending for flatbuffers LICENSE --- third_party/flatbuffers/BUILD.system | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/third_party/flatbuffers/BUILD.system b/third_party/flatbuffers/BUILD.system -index 8fe4d7a5907..297f8baf0c0 100644 +index 8fe4d7a5..297f8baf 100644 --- a/third_party/flatbuffers/BUILD.system +++ b/third_party/flatbuffers/BUILD.system @@ -5,6 +5,11 @@ filegroup( diff --git a/recipe/patches/0011-Use-correct-hermetic-python.patch b/recipe/patches/0010-Use-correct-hermetic-python.patch similarity index 88% rename from recipe/patches/0011-Use-correct-hermetic-python.patch rename to recipe/patches/0010-Use-correct-hermetic-python.patch index 3ab0e0d3..757f74b9 100644 --- a/recipe/patches/0011-Use-correct-hermetic-python.patch +++ b/recipe/patches/0010-Use-correct-hermetic-python.patch @@ -1,7 +1,7 @@ -From 145512540ada7749457103082b059ae824c9bf6a Mon Sep 17 00:00:00 2001 +From 95485b5d00566df1982a410672821a951697d05f Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 27 Oct 2023 11:21:38 +0200 -Subject: [PATCH 11/26] Use correct, hermetic python +Subject: [PATCH 10/27] Use correct, hermetic python --- .../tensorflow/gen_quantized_function_library.py | 5 +++++ @@ -9,7 +9,7 @@ Subject: [PATCH 11/26] Use correct, hermetic python 2 files changed, 7 insertions(+) diff --git a/tensorflow/compiler/mlir/quantization/tensorflow/gen_quantized_function_library.py b/tensorflow/compiler/mlir/quantization/tensorflow/gen_quantized_function_library.py -index 8352b974996..7eed8b4e373 100644 +index 8352b974..7eed8b4e 100644 --- a/tensorflow/compiler/mlir/quantization/tensorflow/gen_quantized_function_library.py +++ b/tensorflow/compiler/mlir/quantization/tensorflow/gen_quantized_function_library.py @@ -14,6 +14,11 @@ @@ -25,7 +25,7 @@ index 8352b974996..7eed8b4e373 100644 import re import string diff --git a/tensorflow/python/tools/api/generator/create_python_api.py b/tensorflow/python/tools/api/generator/create_python_api.py -index cd76ae73f77..c12533c9b57 100644 +index cd76ae73..c12533c9 100644 --- a/tensorflow/python/tools/api/generator/create_python_api.py +++ b/tensorflow/python/tools/api/generator/create_python_api.py @@ -18,6 +18,8 @@ import collections diff --git a/recipe/patches/0012-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch b/recipe/patches/0011-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch similarity index 81% rename from recipe/patches/0012-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch rename to recipe/patches/0011-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch index 9e83bc5a..ee28b292 100644 --- a/recipe/patches/0012-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch +++ b/recipe/patches/0011-Add-well_known_types_py_pb2-to-protobuf-systemlib.patch @@ -1,14 +1,14 @@ -From 7df0b7aad32debd9934f384ffa1382b70bd8d1ae Mon Sep 17 00:00:00 2001 +From a878cc2a275f4887f0309ace423a049a30b1a39e Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 15 Nov 2023 09:18:28 +0100 -Subject: [PATCH 12/26] Add well_known_types_py_pb2 to protobuf systemlib +Subject: [PATCH 11/27] Add well_known_types_py_pb2 to protobuf systemlib --- third_party/systemlibs/protobuf.BUILD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/third_party/systemlibs/protobuf.BUILD b/third_party/systemlibs/protobuf.BUILD -index c7d940605f9..504bc81af0d 100644 +index c7d94060..504bc81a 100644 --- a/third_party/systemlibs/protobuf.BUILD +++ b/third_party/systemlibs/protobuf.BUILD @@ -111,3 +111,10 @@ py_library( diff --git a/recipe/patches/0013-Add-protobuf-toolchain.patch b/recipe/patches/0012-Add-protobuf-toolchain.patch similarity index 87% rename from recipe/patches/0013-Add-protobuf-toolchain.patch rename to recipe/patches/0012-Add-protobuf-toolchain.patch index f2300ef0..4cc9dea8 100644 --- a/recipe/patches/0013-Add-protobuf-toolchain.patch +++ b/recipe/patches/0012-Add-protobuf-toolchain.patch @@ -1,14 +1,14 @@ -From 6ee6eb5bd5f9d6816db09484eea7bd3bd2f858cb Mon Sep 17 00:00:00 2001 +From de24030836aeecfa290e5f5ba11e61f9c6dbcbc5 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 15 Nov 2023 10:32:41 +0000 -Subject: [PATCH 13/26] Add protobuf toolchain +Subject: [PATCH 12/27] Add protobuf toolchain --- third_party/systemlibs/protobuf.BUILD | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/third_party/systemlibs/protobuf.BUILD b/third_party/systemlibs/protobuf.BUILD -index 504bc81af0d..4f105d33f84 100644 +index 504bc81a..4f105d33 100644 --- a/third_party/systemlibs/protobuf.BUILD +++ b/third_party/systemlibs/protobuf.BUILD @@ -65,12 +65,26 @@ cc_library( diff --git a/recipe/patches/0014-fix-genproto.patch b/recipe/patches/0013-fix-genproto.patch similarity index 87% rename from recipe/patches/0014-fix-genproto.patch rename to recipe/patches/0013-fix-genproto.patch index 6537accf..e6da4e23 100644 --- a/recipe/patches/0014-fix-genproto.patch +++ b/recipe/patches/0013-fix-genproto.patch @@ -1,14 +1,14 @@ -From b1a58cff048e984fd1172fd5b76c73846c6aa131 Mon Sep 17 00:00:00 2001 +From f9bf16ddf1cb2d288694871fa3383d90aa874a1a Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 16 Nov 2023 06:38:27 +0000 -Subject: [PATCH 14/26] fix genproto +Subject: [PATCH 13/27] fix genproto --- .../third_party/tsl/tsl/platform/default/build_config.bzl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl b/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl -index 35cdcdc503a..ca4bdd0e0da 100644 +index 35cdcdc5..ca4bdd0e 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl @@ -401,10 +401,7 @@ def py_proto_library( diff --git a/recipe/patches/0015-Remove-some-usage-of-absl-str_format-in-CUDA.patch b/recipe/patches/0014-Remove-some-usage-of-absl-str_format-in-CUDA.patch similarity index 91% rename from recipe/patches/0015-Remove-some-usage-of-absl-str_format-in-CUDA.patch rename to recipe/patches/0014-Remove-some-usage-of-absl-str_format-in-CUDA.patch index 5fce0343..ad416592 100644 --- a/recipe/patches/0015-Remove-some-usage-of-absl-str_format-in-CUDA.patch +++ b/recipe/patches/0014-Remove-some-usage-of-absl-str_format-in-CUDA.patch @@ -1,7 +1,7 @@ -From 1a923b59e4137fd1f8750fd299982a948fa115e6 Mon Sep 17 00:00:00 2001 +From ae92d44a00de6f162bdc045052be0d6140fc081f Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 23 Nov 2023 09:05:37 +0000 -Subject: [PATCH 15/26] Remove some usage of absl::str_format in CUDA +Subject: [PATCH 14/27] Remove some usage of absl::str_format in CUDA nvcc from CUDA 11 is unable to correctly handle the new C++ features used in this template. We use a different implementation that should @@ -13,7 +13,7 @@ yield the same results without the usage of absl. 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tensorflow/core/framework/resource_base.h b/tensorflow/core/framework/resource_base.h -index 46a76ea094c..2f8d0a21878 100644 +index 46a76ea0..2f8d0a21 100644 --- a/tensorflow/core/framework/resource_base.h +++ b/tensorflow/core/framework/resource_base.h @@ -18,8 +18,9 @@ limitations under the License. @@ -42,7 +42,7 @@ index 46a76ea094c..2f8d0a21878 100644 // Returns memory used by this resource. diff --git a/tensorflow/core/framework/resource_var.cc b/tensorflow/core/framework/resource_var.cc -index c441a8e2648..7e1f1fdf0ea 100644 +index c441a8e2..7e1f1fdf 100644 --- a/tensorflow/core/framework/resource_var.cc +++ b/tensorflow/core/framework/resource_var.cc @@ -18,6 +18,8 @@ limitations under the License. @@ -55,7 +55,7 @@ index c441a8e2648..7e1f1fdf0ea 100644 Status Var::AsGraphDef(GraphDefBuilder* builder, Node** out) const { diff --git a/tensorflow/core/kernels/conv_ops_gpu.h b/tensorflow/core/kernels/conv_ops_gpu.h -index 627450ef2d6..d0c97527284 100644 +index 627450ef..d0c97527 100644 --- a/tensorflow/core/kernels/conv_ops_gpu.h +++ b/tensorflow/core/kernels/conv_ops_gpu.h @@ -22,7 +22,7 @@ limitations under the License. diff --git a/recipe/patches/0019-Adjust-relative-path-for-libdevice.patch b/recipe/patches/0015-Adjust-relative-path-for-libdevice.patch similarity index 87% rename from recipe/patches/0019-Adjust-relative-path-for-libdevice.patch rename to recipe/patches/0015-Adjust-relative-path-for-libdevice.patch index 58fc84e6..3cc7bdd0 100644 --- a/recipe/patches/0019-Adjust-relative-path-for-libdevice.patch +++ b/recipe/patches/0015-Adjust-relative-path-for-libdevice.patch @@ -1,14 +1,14 @@ -From 51c1e898852804628089b7d154afb1eaaf3564e5 Mon Sep 17 00:00:00 2001 +From 38ca4efe105b78c1622f2246cc5b66c5c6aa5e7a Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 27 Jan 2024 22:27:56 -0500 -Subject: [PATCH 17/26] Adjust relative path for libdevice +Subject: [PATCH 15/27] Adjust relative path for libdevice --- .../third_party/tsl/tsl/platform/default/cuda_libdevice_path.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/cuda_libdevice_path.cc b/third_party/xla/third_party/tsl/tsl/platform/default/cuda_libdevice_path.cc -index 46321e74b5d..fd0cab0d73b 100644 +index 46321e74..fd0cab0d 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/cuda_libdevice_path.cc +++ b/third_party/xla/third_party/tsl/tsl/platform/default/cuda_libdevice_path.cc @@ -51,7 +51,7 @@ std::vector CandidateCudaRoots() { diff --git a/recipe/patches/0021-Link-to-absl_log_flags-instead-of-absl_flags.patch b/recipe/patches/0016-Link-to-absl_log_flags-instead-of-absl_flags.patch similarity index 85% rename from recipe/patches/0021-Link-to-absl_log_flags-instead-of-absl_flags.patch rename to recipe/patches/0016-Link-to-absl_log_flags-instead-of-absl_flags.patch index 5e91ddf4..a60d2f5a 100644 --- a/recipe/patches/0021-Link-to-absl_log_flags-instead-of-absl_flags.patch +++ b/recipe/patches/0016-Link-to-absl_log_flags-instead-of-absl_flags.patch @@ -1,7 +1,7 @@ -From 476ec13aa239ebef5c603e61ea9458a2852828ba Mon Sep 17 00:00:00 2001 +From 346c37a3c4273ee4d65a9275c26617b391876c33 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Mon, 26 Feb 2024 22:30:08 -0500 -Subject: [PATCH 18/26] Link to absl_log_flags instead of absl_flags +Subject: [PATCH 16/27] Link to absl_log_flags instead of absl_flags --- third_party/absl/system.absl.flags.BUILD | 2 +- @@ -9,7 +9,7 @@ Subject: [PATCH 18/26] Link to absl_log_flags instead of absl_flags 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/absl/system.absl.flags.BUILD b/third_party/absl/system.absl.flags.BUILD -index aff653c7e5b..ee2e1bfe5e3 100644 +index aff653c7..ee2e1bfe 100644 --- a/third_party/absl/system.absl.flags.BUILD +++ b/third_party/absl/system.absl.flags.BUILD @@ -97,7 +97,7 @@ cc_library( @@ -22,7 +22,7 @@ index aff653c7e5b..ee2e1bfe5e3 100644 ":config", ":flag_internal", diff --git a/third_party/xla/third_party/tsl/third_party/absl/system.absl.flags.BUILD b/third_party/xla/third_party/tsl/third_party/absl/system.absl.flags.BUILD -index aff653c7e5b..ee2e1bfe5e3 100644 +index aff653c7..ee2e1bfe 100644 --- a/third_party/xla/third_party/tsl/third_party/absl/system.absl.flags.BUILD +++ b/third_party/xla/third_party/tsl/third_party/absl/system.absl.flags.BUILD @@ -97,7 +97,7 @@ cc_library( diff --git a/recipe/patches/0022-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch b/recipe/patches/0017-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch similarity index 85% rename from recipe/patches/0022-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch rename to recipe/patches/0017-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch index e9b28b1e..a69d1c97 100644 --- a/recipe/patches/0022-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch +++ b/recipe/patches/0017-Update-ABSL-Log-Definition-for-libabsl_vlog_config_i.patch @@ -1,7 +1,7 @@ -From 5a30bd90c4ac5c0ee39d71bfbd97fdcfdb0b2d5e Mon Sep 17 00:00:00 2001 +From 81ff1b5ec7052ab02abc008d031b9a85a82069e0 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Tue, 27 Feb 2024 18:01:19 -0500 -Subject: [PATCH 19/26] Update ABSL Log Definition for +Subject: [PATCH 17/27] Update ABSL Log Definition for libabsl_vlog_config_internal.so --- @@ -9,7 +9,7 @@ Subject: [PATCH 19/26] Update ABSL Log Definition for 1 file changed, 2 insertions(+) diff --git a/third_party/absl/system.absl.log.BUILD b/third_party/absl/system.absl.log.BUILD -index 0248bda0f52..1fe1e342594 100644 +index 0248bda0..1fe1e342 100644 --- a/third_party/absl/system.absl.log.BUILD +++ b/third_party/absl/system.absl.log.BUILD @@ -5,6 +5,7 @@ package(default_visibility = ["//visibility:public"]) diff --git a/recipe/patches/0024-add-absl_string_view-target.patch b/recipe/patches/0018-add-absl_string_view-target.patch similarity index 84% rename from recipe/patches/0024-add-absl_string_view-target.patch rename to recipe/patches/0018-add-absl_string_view-target.patch index 4554d7ce..19b6e57d 100644 --- a/recipe/patches/0024-add-absl_string_view-target.patch +++ b/recipe/patches/0018-add-absl_string_view-target.patch @@ -1,14 +1,14 @@ -From a01770ed82757d7c0eaab812e4d89bd443a712e6 Mon Sep 17 00:00:00 2001 +From de7577313810f2e4f91f5f1e8bdbc7c5d947b6ef Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 12 May 2024 18:45:03 +1100 -Subject: [PATCH 20/26] add absl_string_view target +Subject: [PATCH 18/27] add absl_string_view target --- third_party/absl/system.absl.strings.BUILD | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/third_party/absl/system.absl.strings.BUILD b/third_party/absl/system.absl.strings.BUILD -index d04776c98bf..573d6c2f32d 100644 +index d04776c9..573d6c2f 100644 --- a/third_party/absl/system.absl.strings.BUILD +++ b/third_party/absl/system.absl.strings.BUILD @@ -2,6 +2,18 @@ load("@rules_cc//cc:defs.bzl", "cc_library") diff --git a/recipe/patches/0025-add-absl_nullability-target.patch b/recipe/patches/0019-add-absl_nullability-target.patch similarity index 79% rename from recipe/patches/0025-add-absl_nullability-target.patch rename to recipe/patches/0019-add-absl_nullability-target.patch index 284b61dc..00bfce5f 100644 --- a/recipe/patches/0025-add-absl_nullability-target.patch +++ b/recipe/patches/0019-add-absl_nullability-target.patch @@ -1,14 +1,14 @@ -From 34dc47b1a859592bfbf68b1edd3d8f13ebeceea8 Mon Sep 17 00:00:00 2001 +From 1ba1e57b78c37b0cd3353dceaa4633f4d98779a1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 12 May 2024 19:30:44 +1100 -Subject: [PATCH 21/26] add absl_nullability target +Subject: [PATCH 19/27] add absl_nullability target --- third_party/absl/system.absl.base.BUILD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/third_party/absl/system.absl.base.BUILD b/third_party/absl/system.absl.base.BUILD -index b3e42f4dd8b..a423d5f70da 100644 +index b3e42f4d..a423d5f7 100644 --- a/third_party/absl/system.absl.base.BUILD +++ b/third_party/absl/system.absl.base.BUILD @@ -25,6 +25,14 @@ cc_library( diff --git a/recipe/patches/0026-add-absl_prefetch-target.patch b/recipe/patches/0020-add-absl_prefetch-target.patch similarity index 79% rename from recipe/patches/0026-add-absl_prefetch-target.patch rename to recipe/patches/0020-add-absl_prefetch-target.patch index 439d50d8..885dd0ab 100644 --- a/recipe/patches/0026-add-absl_prefetch-target.patch +++ b/recipe/patches/0020-add-absl_prefetch-target.patch @@ -1,14 +1,14 @@ -From 867667301cc890804898c85db134822c55f85398 Mon Sep 17 00:00:00 2001 +From de106a1019f8d47896738692a9f526489783775f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 12 May 2024 22:29:25 +1100 -Subject: [PATCH 22/26] add absl_prefetch target +Subject: [PATCH 20/27] add absl_prefetch target --- third_party/absl/system.absl.base.BUILD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/third_party/absl/system.absl.base.BUILD b/third_party/absl/system.absl.base.BUILD -index a423d5f70da..b31592d31a3 100644 +index a423d5f7..b31592d3 100644 --- a/third_party/absl/system.absl.base.BUILD +++ b/third_party/absl/system.absl.base.BUILD @@ -116,6 +116,14 @@ cc_library( diff --git a/recipe/patches/0027-add-absl_die_if_null-target.patch b/recipe/patches/0021-add-absl_die_if_null-target.patch similarity index 83% rename from recipe/patches/0027-add-absl_die_if_null-target.patch rename to recipe/patches/0021-add-absl_die_if_null-target.patch index 9c1cb806..38cf2c11 100644 --- a/recipe/patches/0027-add-absl_die_if_null-target.patch +++ b/recipe/patches/0021-add-absl_die_if_null-target.patch @@ -1,14 +1,14 @@ -From 6a46db494422a9edae444873078a84663a4b3870 Mon Sep 17 00:00:00 2001 +From 01f2b9b583f3627d3dde023e613bf1e96f2bc348 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 12 May 2024 22:46:04 +1100 -Subject: [PATCH 23/26] add absl_die_if_null target +Subject: [PATCH 21/27] add absl_die_if_null target --- third_party/absl/system.absl.log.BUILD | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/third_party/absl/system.absl.log.BUILD b/third_party/absl/system.absl.log.BUILD -index 1fe1e342594..6606aaa5dd0 100644 +index 1fe1e342..6606aaa5 100644 --- a/third_party/absl/system.absl.log.BUILD +++ b/third_party/absl/system.absl.log.BUILD @@ -2,6 +2,17 @@ load("@rules_cc//cc:defs.bzl", "cc_library") diff --git a/recipe/patches/0028-add-absl_crc32c-targets.patch b/recipe/patches/0022-add-absl_crc32c-targets.patch similarity index 92% rename from recipe/patches/0028-add-absl_crc32c-targets.patch rename to recipe/patches/0022-add-absl_crc32c-targets.patch index 43ca8f4a..d44a8a82 100644 --- a/recipe/patches/0028-add-absl_crc32c-targets.patch +++ b/recipe/patches/0022-add-absl_crc32c-targets.patch @@ -1,7 +1,7 @@ -From dd4133515d7eefaef9eacd8a18fb75911e4d6424 Mon Sep 17 00:00:00 2001 +From 19016020cd8fbe94920856f5f6ffc3f515a05f39 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 13 May 2024 09:41:09 +1100 -Subject: [PATCH 24/26] add absl_crc32c targets +Subject: [PATCH 22/27] add absl_crc32c targets --- third_party/absl/system.absl.crc.BUILD | 70 ++++++++++++++++++++++++++ @@ -11,7 +11,7 @@ Subject: [PATCH 24/26] add absl_crc32c targets diff --git a/third_party/absl/system.absl.crc.BUILD b/third_party/absl/system.absl.crc.BUILD new file mode 100644 -index 00000000000..487c36ff45b +index 00000000..487c36ff --- /dev/null +++ b/third_party/absl/system.absl.crc.BUILD @@ -0,0 +1,70 @@ @@ -86,7 +86,7 @@ index 00000000000..487c36ff45b + ], +) diff --git a/third_party/absl/workspace.bzl b/third_party/absl/workspace.bzl -index c54df3cfbae..94ee77bb7d2 100644 +index c54df3cf..94ee77bb 100644 --- a/third_party/absl/workspace.bzl +++ b/third_party/absl/workspace.bzl @@ -14,6 +14,7 @@ def repo(): diff --git a/recipe/patches/0030-add-kernel_timeout_internal-target.patch b/recipe/patches/0023-add-kernel_timeout_internal-target.patch similarity index 87% rename from recipe/patches/0030-add-kernel_timeout_internal-target.patch rename to recipe/patches/0023-add-kernel_timeout_internal-target.patch index f0f99e21..5ddf5ad4 100644 --- a/recipe/patches/0030-add-kernel_timeout_internal-target.patch +++ b/recipe/patches/0023-add-kernel_timeout_internal-target.patch @@ -1,14 +1,14 @@ -From 6873ca66dd453159af27112fb538155614197dd6 Mon Sep 17 00:00:00 2001 +From fee7bf5d49a6c767aec631980b749e9e76bd9828 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 13 May 2024 23:36:48 +1100 -Subject: [PATCH 25/26] add kernel_timeout_internal target +Subject: [PATCH 23/27] add kernel_timeout_internal target --- .../absl/system.absl.synchronization.BUILD | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/third_party/absl/system.absl.synchronization.BUILD b/third_party/absl/system.absl.synchronization.BUILD -index c0fa37aacd7..b47309deb39 100644 +index c0fa37aa..b47309de 100644 --- a/third_party/absl/system.absl.synchronization.BUILD +++ b/third_party/absl/system.absl.synchronization.BUILD @@ -16,14 +16,29 @@ cc_library( diff --git a/recipe/patches/0031-work-around-for-warning-that-clang-falsely-treats-as.patch b/recipe/patches/0024-work-around-for-warning-that-clang-falsely-treats-as.patch similarity index 77% rename from recipe/patches/0031-work-around-for-warning-that-clang-falsely-treats-as.patch rename to recipe/patches/0024-work-around-for-warning-that-clang-falsely-treats-as.patch index d1744eaa..4e01f2a4 100644 --- a/recipe/patches/0031-work-around-for-warning-that-clang-falsely-treats-as.patch +++ b/recipe/patches/0024-work-around-for-warning-that-clang-falsely-treats-as.patch @@ -1,7 +1,7 @@ -From 0552bce35c8d495fee08ed6ae1a7381e2d5c6180 Mon Sep 17 00:00:00 2001 +From 834f80850258a7c03d83e5d6304acef4f6c950a6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 19 May 2024 20:52:35 +1100 -Subject: [PATCH 26/26] work around for warning that clang falsely treats as +Subject: [PATCH 24/27] work around for warning that clang falsely treats as error see https://github.com/llvm/llvm-project/issues/92630 @@ -10,7 +10,7 @@ see https://github.com/llvm/llvm-project/issues/92630 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc -index fb80a081c56..01668b2c67c 100644 +index fb80a081..01668b2c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -313,7 +313,7 @@ build:ios --noenable_platform_specific_config diff --git a/recipe/patches/0001-Hardcode-BUILD_PREFIX-in-build_pip_package.patch b/recipe/patches/0025-Hardcode-BUILD_PREFIX-in-build_pip_package.patch similarity index 87% rename from recipe/patches/0001-Hardcode-BUILD_PREFIX-in-build_pip_package.patch rename to recipe/patches/0025-Hardcode-BUILD_PREFIX-in-build_pip_package.patch index 4c7a5545..17f314b4 100644 --- a/recipe/patches/0001-Hardcode-BUILD_PREFIX-in-build_pip_package.patch +++ b/recipe/patches/0025-Hardcode-BUILD_PREFIX-in-build_pip_package.patch @@ -1,14 +1,14 @@ -From b91fcdcd8fb52aae43bac43c06a0e8d4c525e54a Mon Sep 17 00:00:00 2001 +From 8f47db96664195da6c7b86d9d19365e41ebda763 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 12 Jul 2024 12:52:38 +0000 -Subject: [PATCH] Hardcode BUILD_PREFIX in build_pip_package +Subject: [PATCH 25/27] Hardcode BUILD_PREFIX in build_pip_package --- tensorflow/tools/pip_package/build_pip_package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/tools/pip_package/build_pip_package.py b/tensorflow/tools/pip_package/build_pip_package.py -index 9588fc19..53bb2395 100644 +index 9588fc19..2d0718af 100644 --- a/tensorflow/tools/pip_package/build_pip_package.py +++ b/tensorflow/tools/pip_package/build_pip_package.py @@ -240,12 +240,12 @@ def patch_so(srcs_dir: str) -> None: @@ -27,6 +27,3 @@ index 9588fc19..53bb2395 100644 "{}/{}".format(srcs_dir, file)], check=True) --- -2.34.1 - diff --git a/recipe/patches/0001-Only-link-to-sparse_core_layout_proto_cc-headers.patch b/recipe/patches/0026-Only-link-to-sparse_core_layout_proto_cc-headers.patch similarity index 83% rename from recipe/patches/0001-Only-link-to-sparse_core_layout_proto_cc-headers.patch rename to recipe/patches/0026-Only-link-to-sparse_core_layout_proto_cc-headers.patch index b105de3b..ee654940 100644 --- a/recipe/patches/0001-Only-link-to-sparse_core_layout_proto_cc-headers.patch +++ b/recipe/patches/0026-Only-link-to-sparse_core_layout_proto_cc-headers.patch @@ -1,7 +1,7 @@ -From 97c624c2003176bf55144c65b327719ff83691e3 Mon Sep 17 00:00:00 2001 +From 1aa996a04bafcb8b1413c2aa4cdefae82d94bf29 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 16 Jul 2024 17:18:23 +0200 -Subject: [PATCH] Only link to sparse_core_layout_proto_cc headers +Subject: [PATCH 26/27] Only link to sparse_core_layout_proto_cc headers --- tensorflow/core/tpu/kernels/BUILD | 2 +- @@ -20,6 +20,3 @@ index 7d55de7b..c409c1b0 100644 "//tensorflow/core/platform:stringpiece", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", --- -2.39.3 (Apple Git-146) - diff --git a/recipe/patches/0027-Protobuf-5-compatability.patch b/recipe/patches/0027-Protobuf-5-compatability.patch new file mode 100644 index 00000000..ac291f0a --- /dev/null +++ b/recipe/patches/0027-Protobuf-5-compatability.patch @@ -0,0 +1,209 @@ +From e283895ada7da065acdc494d1ae7a4f78f1b3191 Mon Sep 17 00:00:00 2001 +From: "Uwe L. Korn" +Date: Thu, 10 Oct 2024 19:59:31 +0200 +Subject: [PATCH 27/27] Protobuf 5 compatability + +--- + .../compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc | 2 +- + .../compiler/mlir/tensorflow/utils/parse_text_proto.cc | 2 +- + tensorflow/core/debug/debug_io_utils.cc | 4 ++++ + tensorflow/core/ir/importexport/parse_text_proto.cc | 2 +- + tensorflow/core/profiler/convert/hlo_to_tools_data.cc | 4 ++++ + .../core/profiler/convert/xplane_to_memory_profile.cc | 4 ++++ + .../core/profiler/convert/xplane_to_tools_data.cc | 8 ++++++++ + tensorflow/core/util/proto/proto_utils.cc | 10 +++++----- + tensorflow/core/util/proto/proto_utils.h | 4 ++-- + .../tools/proto_text/gen_proto_text_functions.cc | 4 ++-- + .../tsl/tsl/platform/default/human_readable_json.cc | 4 ++++ + 11 files changed, 36 insertions(+), 12 deletions(-) + +diff --git a/tensorflow/compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc b/tensorflow/compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc +index ed968b54..71e16db6 100644 +--- a/tensorflow/compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc ++++ b/tensorflow/compiler/mlir/lite/python/jax_to_tfl_flatbuffer.cc +@@ -57,7 +57,7 @@ namespace { + // Error collector that simply ignores errors reported. + class NoOpErrorCollector : public protobuf::io::ErrorCollector { + public: +- void AddError(int line, int column, const std::string& message) override {} ++ void RecordError(int line, int column, const absl::string_view message) override {} + }; + + bool LoadHloProto(const std::string& contents, xla::HloProto* hlo_proto) { +diff --git a/tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.cc b/tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.cc +index 906a058d..0c673310 100644 +--- a/tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.cc ++++ b/tensorflow/compiler/mlir/tensorflow/utils/parse_text_proto.cc +@@ -30,7 +30,7 @@ namespace { + // Error collector that simply ignores errors reported. + class NoOpErrorCollector : public protobuf::io::ErrorCollector { + public: +- void AddError(int line, int column, const std::string& message) override {} ++ void RecordError(int line, int column, absl::string_view message) override {} + }; + } // namespace + +diff --git a/tensorflow/core/debug/debug_io_utils.cc b/tensorflow/core/debug/debug_io_utils.cc +index 0e4e11d8..912970b7 100644 +--- a/tensorflow/core/debug/debug_io_utils.cc ++++ b/tensorflow/core/debug/debug_io_utils.cc +@@ -94,7 +94,11 @@ Event PrepareChunkEventProto(const DebugNodeKey& debug_node_key, + // Encode the data in JSON. + string json_output; + tensorflow::protobuf::util::JsonPrintOptions json_options; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + json_options.always_print_primitive_fields = true; ++#else ++ json_options.always_print_fields_with_no_presence = true; ++#endif + auto status = tensorflow::protobuf::util::MessageToJsonString( + metadata, &json_output, json_options); + if (status.ok()) { +diff --git a/tensorflow/core/ir/importexport/parse_text_proto.cc b/tensorflow/core/ir/importexport/parse_text_proto.cc +index c631785c..3ab6e17c 100644 +--- a/tensorflow/core/ir/importexport/parse_text_proto.cc ++++ b/tensorflow/core/ir/importexport/parse_text_proto.cc +@@ -35,7 +35,7 @@ namespace { + // Error collector that simply ignores errors reported. + class NoOpErrorCollector : public tensorflow::protobuf::io::ErrorCollector { + public: +- void AddError(int line, int column, const std::string& message) override {} ++ void RecordError(int line, int column, const absl::string_view message) override {} + }; + } // namespace + +diff --git a/tensorflow/core/profiler/convert/hlo_to_tools_data.cc b/tensorflow/core/profiler/convert/hlo_to_tools_data.cc +index 7fbcd397..d17f3402 100644 +--- a/tensorflow/core/profiler/convert/hlo_to_tools_data.cc ++++ b/tensorflow/core/profiler/convert/hlo_to_tools_data.cc +@@ -62,7 +62,11 @@ absl::StatusOr ConvertHloProtoToMemoryViewer( + + std::string json_output; + tensorflow::protobuf::util::JsonPrintOptions options; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + options.always_print_primitive_fields = true; ++#else ++ options.always_print_fields_with_no_presence = true; ++#endif + auto encoded_status = tensorflow::protobuf::util::MessageToJsonString( + result_or.value(), &json_output, options); + if (!encoded_status.ok()) { +diff --git a/tensorflow/core/profiler/convert/xplane_to_memory_profile.cc b/tensorflow/core/profiler/convert/xplane_to_memory_profile.cc +index b289f54b..38e89170 100644 +--- a/tensorflow/core/profiler/convert/xplane_to_memory_profile.cc ++++ b/tensorflow/core/profiler/convert/xplane_to_memory_profile.cc +@@ -529,7 +529,11 @@ void ProcessMemoryProfileProto(int64_t max_num_snapshots, + template + Status ConvertProtoToJson(const Proto& proto_output, std::string* json_output) { + protobuf::util::JsonPrintOptions json_options; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + json_options.always_print_primitive_fields = true; ++#else ++ json_options.always_print_fields_with_no_presence = true; ++#endif + auto status = protobuf::util::MessageToJsonString(proto_output, json_output, + json_options); + if (!status.ok()) { +diff --git a/tensorflow/core/profiler/convert/xplane_to_tools_data.cc b/tensorflow/core/profiler/convert/xplane_to_tools_data.cc +index b623c6a9..624f2c04 100644 +--- a/tensorflow/core/profiler/convert/xplane_to_tools_data.cc ++++ b/tensorflow/core/profiler/convert/xplane_to_tools_data.cc +@@ -218,7 +218,11 @@ absl::StatusOr ConvertMultiXSpacesToPodViewer( + + std::string json_output; + protobuf::util::JsonPrintOptions opts; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + opts.always_print_primitive_fields = true; ++#else ++ opts.always_print_fields_with_no_presence = true; ++#endif + auto encode_status = protobuf::util::MessageToJsonString( + ConvertOpStatsToPodViewer(combined_op_stats), &json_output, opts); + if (!encode_status.ok()) { +@@ -272,7 +276,11 @@ absl::StatusOr ConvertMultiXSpacesToOpProfileViewer( + profile); + std::string json_output; + protobuf::util::JsonPrintOptions opts; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + opts.always_print_primitive_fields = true; ++#else ++ opts.always_print_fields_with_no_presence = true; ++#endif + + auto encode_status = + protobuf::util::MessageToJsonString(profile, &json_output, opts); +diff --git a/tensorflow/core/util/proto/proto_utils.cc b/tensorflow/core/util/proto/proto_utils.cc +index 282be94a..7cfed84d 100644 +--- a/tensorflow/core/util/proto/proto_utils.cc ++++ b/tensorflow/core/util/proto/proto_utils.cc +@@ -101,17 +101,17 @@ StringErrorCollector::StringErrorCollector(string* error_text, + } + } + +-void StringErrorCollector::AddError(int line, int column, +- const string& message) { ++void StringErrorCollector::RecordError(int line, int column, ++ absl::string_view message) { + if (error_text_ != nullptr) { + absl::SubstituteAndAppend(error_text_, "$0($1): $2\n", line + index_offset_, + column + index_offset_, message); + } + } + +-void StringErrorCollector::AddWarning(int line, int column, +- const string& message) { +- AddError(line, column, message); ++void StringErrorCollector::RecordWarning(int line, int column, ++ absl::string_view message) { ++ RecordError(line, column, message); + } + + } // namespace proto_utils +diff --git a/tensorflow/core/util/proto/proto_utils.h b/tensorflow/core/util/proto/proto_utils.h +index f0347a84..c8b2a4b9 100644 +--- a/tensorflow/core/util/proto/proto_utils.h ++++ b/tensorflow/core/util/proto/proto_utils.h +@@ -53,10 +53,10 @@ class StringErrorCollector : public protobuf::io::ErrorCollector { + StringErrorCollector& operator=(const StringErrorCollector&) = delete; + + // Implementation of protobuf::io::ErrorCollector::AddError. +- void AddError(int line, int column, const string& message) override; ++ void RecordError(int line, int column, absl::string_view message) override; + + // Implementation of protobuf::io::ErrorCollector::AddWarning. +- void AddWarning(int line, int column, const string& message) override; ++ void RecordWarning(int line, int column, absl::string_view message) override; + + private: + string* const error_text_; +diff --git a/tensorflow/tools/proto_text/gen_proto_text_functions.cc b/tensorflow/tools/proto_text/gen_proto_text_functions.cc +index 406e6641..d97eae73 100644 +--- a/tensorflow/tools/proto_text/gen_proto_text_functions.cc ++++ b/tensorflow/tools/proto_text/gen_proto_text_functions.cc +@@ -31,8 +31,8 @@ class CrashOnErrorCollector + public: + ~CrashOnErrorCollector() override {} + +- void AddError(const string& filename, int line, int column, +- const string& message) override { ++ void RecordError(absl::string_view filename, int line, int column, ++ absl::string_view message) override { + LOG(FATAL) << "Unexpected error at " << filename << "@" << line << ":" + << column << " - " << message; + } +diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc b/third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc +index 4f70c155..ae746f33 100644 +--- a/third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc ++++ b/third_party/xla/third_party/tsl/tsl/platform/default/human_readable_json.cc +@@ -33,7 +33,11 @@ absl::StatusOr ProtoToHumanReadableJson( + + protobuf::util::JsonPrintOptions json_options; + json_options.preserve_proto_field_names = true; ++#if GOOGLE_PROTOBUF_VERSION < 5026000 + json_options.always_print_primitive_fields = true; ++#else ++ json_options.always_print_fields_with_no_presence = true; ++#endif + auto status = + protobuf::util::MessageToJsonString(proto, &result, json_options); + if (!status.ok()) {