Skip to content

Commit 53f608b

Browse files
committed
Fix generated Abseil patch format
1 parent 9aefee3 commit 53f608b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/patch_tfjava.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def write_tensorflow_android_absl_patch(path: Path) -> None:
5656
text = """diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
5757
--- a/tensorflow/workspace.bzl
5858
+++ b/tensorflow/workspace.bzl
59-
@@ -186,7 +186,8 @@ def tf_workspace(path_prefix = \"\", tf_repo_name = \"\"):\n tf_http_archive(\n name = \"com_google_absl\",\n build_file = clean_dep(\"//third_party:com_google_absl.BUILD\"),\n # TODO: Remove the patch when https://github.com/abseil/abseil-cpp/issues/326 is resolved\n # and when TensorFlow is build against CUDA 10.2\n - patch_file = clean_dep(\"//third_party:com_google_absl_fix_mac_and_nvcc_build.patch\"),\n + patch_file = clean_dep(\"//third_party:com_google_absl_fix_mac_and_nvcc_build.patch\"),\n + patch_cmds = [\"grep -q '^#include <limits>$' absl/synchronization/internal/graphcycles.cc || sed -i '/#include <algorithm>/a #include <limits>' absl/synchronization/internal/graphcycles.cc\"],\n sha256 = \"acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070\", # SHARED_ABSL_SHA\n strip_prefix = \"abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f\",\n urls = [\n"""
59+
@@ -186,7 +186,8 @@ def tf_workspace(path_prefix = \"\", tf_repo_name = \"\"):\n tf_http_archive(\n name = \"com_google_absl\",\n build_file = clean_dep(\"//third_party:com_google_absl.BUILD\"),\n # TODO: Remove the patch when https://github.com/abseil/abseil-cpp/issues/326 is resolved\n # and when TensorFlow is build against CUDA 10.2\n- patch_file = clean_dep(\"//third_party:com_google_absl_fix_mac_and_nvcc_build.patch\"),\n+ patch_file = clean_dep(\"//third_party:com_google_absl_fix_mac_and_nvcc_build.patch\"),\n+ patch_cmds = [\"grep -q '^#include <limits>$' absl/synchronization/internal/graphcycles.cc || sed -i '/#include <algorithm>/a #include <limits>' absl/synchronization/internal/graphcycles.cc\"],\n sha256 = \"acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070\", # SHARED_ABSL_SHA\n strip_prefix = \"abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f\",\n urls = [\n"""
6060
path.write_text(text, encoding="utf-8")
6161

6262

0 commit comments

Comments
 (0)