File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,18 @@ def patch_workspace(path: Path) -> None:
104104"""
105105
106106
107+ ABSL_EXTENSION_CSTDINT_PATCH_HUNK = """--- ./absl/strings/internal/str_format/extension.h\t 2019-09-23 13:20:52.000000000 -0700
108+ +++ ./absl/strings/internal/str_format/extension.h.fixed\t 2019-09-23 13:20:48.000000000 -0700
109+ @@ -17,6 +17,7 @@
110+
111+ #include <limits.h>
112+ +#include <cstdint>
113+ #include <cstddef>
114+ #include <cstring>
115+ #include <ostream>
116+ """
117+
118+
107119BFLOAT16_CSTDINT_PATCH = """--- a/tensorflow/core/lib/bfloat16/bfloat16.h
108120+++ b/tensorflow/core/lib/bfloat16/bfloat16.h
109121@@ -17,6 +17,7 @@
@@ -119,12 +131,15 @@ def patch_workspace(path: Path) -> None:
119131
120132def write_tensorflow_android_absl_patch (path : Path ) -> None :
121133 path .parent .mkdir (parents = True , exist_ok = True )
134+ absl_patch_text = (
135+ ORIGINAL_TENSORFLOW_ABSL_PATCH
136+ + ANDROID_GRAPHCYCLES_PATCH_HUNK
137+ + ABSL_EXTENSION_CSTDINT_PATCH_HUNK
138+ )
122139 text = "" .join (
123140 difflib .unified_diff (
124141 ORIGINAL_TENSORFLOW_ABSL_PATCH .splitlines (keepends = True ),
125- (ORIGINAL_TENSORFLOW_ABSL_PATCH + ANDROID_GRAPHCYCLES_PATCH_HUNK ).splitlines (
126- keepends = True
127- ),
142+ absl_patch_text .splitlines (keepends = True ),
128143 fromfile = "a/third_party/com_google_absl_fix_mac_and_nvcc_build.patch" ,
129144 tofile = "b/third_party/com_google_absl_fix_mac_and_nvcc_build.patch" ,
130145 )
You can’t perform that action at this time.
0 commit comments