Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Oct 11, 2024
1 parent 9a5ee10 commit 1222b8d
Show file tree
Hide file tree
Showing 29 changed files with 331 additions and 142 deletions.
54 changes: 27 additions & 27 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
19 changes: 13 additions & 6 deletions recipe/patches/0001-loosen-requirements.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
From d24a4fa081de2b6489c7d7ea478a575e85446a5a Mon Sep 17 00:00:00 2001
From e6a16ebf1cb912b32f8fa6f9b26dbe8add0d930b Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
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
* unpin numpy

Co-authored-by: Mark Harfouche <[email protected]>
Co-authored-by: ngam
Co-authored-by: Uwe L. Korn <[email protected]>
---
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',
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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 ++++---
Expand All @@ -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():
Expand Down Expand Up @@ -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 @@
Expand Down Expand Up @@ -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 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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 ++++++++++++++++++++++
Expand All @@ -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 @@
Expand All @@ -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():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From e9feef5aac6131684d9e6bca2d77744293e8d404 Mon Sep 17 00:00:00 2001
From 5c31fdbd5aec3c392ae578bcac615c4d2c77e564 Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
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

---
tensorflow/python/BUILD | 1 -
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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"])
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 145512540ada7749457103082b059ae824c9bf6a Mon Sep 17 00:00:00 2001
From 95485b5d00566df1982a410672821a951697d05f Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <[email protected]>
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 +++++
tensorflow/python/tools/api/generator/create_python_api.py | 2 ++
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 @@
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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" <[email protected]>
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(
Expand Down
Loading

0 comments on commit 1222b8d

Please sign in to comment.