Skip to content

Commit 48f1125

Browse files
Build with TF 2.14 (#2856)
* Built with tf2.14 patch
1 parent 9688ebd commit 48f1125

File tree

2 files changed

+80
-3
lines changed

2 files changed

+80
-3
lines changed

WORKSPACE

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ tf_configure(
88

99
http_archive(
1010
name = "org_tensorflow",
11-
sha256 = "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e",
12-
strip_prefix = "tensorflow-2.12.0",
11+
patches = [
12+
"//build_deps/tf_dependency:tf.patch",
13+
],
14+
sha256 = "ce357fd0728f0d1b0831d1653f475591662ec5bca736a94ff789e6b1944df19f",
15+
strip_prefix = "tensorflow-2.14.0",
1316
urls = [
14-
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz",
17+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.14.0.tar.gz",
1518
],
1619
)
1720

build_deps/tf_dependency/tf.patch

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
diff --git tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
2+
index a2bdd6a7eed..ec25c23d8d4 100644
3+
--- tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
4+
+++ tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
5+
@@ -2,7 +2,7 @@
6+
7+
load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
8+
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")
9+
-load("//third_party/py:python_configure.bzl", "remote_python_configure")
10+
+load("//third_party/py/non_hermetic:python_configure.bzl", "remote_python_configure")
11+
12+
def ml2014_tf_aarch64_configs(name_container_map, env):
13+
for name, container in name_container_map.items():
14+
diff --git tensorflow/tools/toolchains/remote_config/rbe_config.bzl tensorflow/tools/toolchains/remote_config/rbe_config.bzl
15+
index 9f71a414bf7..57f70752323 100644
16+
--- tensorflow/tools/toolchains/remote_config/rbe_config.bzl
17+
+++ tensorflow/tools/toolchains/remote_config/rbe_config.bzl
18+
@@ -1,6 +1,6 @@
19+
"""Macro that creates external repositories for remote config."""
20+
21+
-load("//third_party/py:python_configure.bzl", "local_python_configure", "remote_python_configure")
22+
+load("//third_party/py/non_hermetic:python_configure.bzl", "local_python_configure", "remote_python_configure")
23+
load("//third_party/gpus:cuda_configure.bzl", "remote_cuda_configure")
24+
load("//third_party/nccl:nccl_configure.bzl", "remote_nccl_configure")
25+
load("//third_party/gpus:rocm_configure.bzl", "remote_rocm_configure")
26+
diff --git tensorflow/workspace2.bzl tensorflow/workspace2.bzl
27+
index 7e9faa558a4..5b18cb0969a 100644
28+
--- tensorflow/workspace2.bzl
29+
+++ tensorflow/workspace2.bzl
30+
@@ -8,7 +8,7 @@ load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
31+
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
32+
load("//third_party/nccl:nccl_configure.bzl", "nccl_configure")
33+
load("//third_party/git:git_configure.bzl", "git_configure")
34+
-load("//third_party/py:python_configure.bzl", "python_configure")
35+
+load("//third_party/py/non_hermetic:python_configure.bzl", "python_configure")
36+
load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure")
37+
load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64_compiler_configure.bzl", "aarch64_compiler_configure")
38+
load("//tensorflow/tools/toolchains:cpus/arm/arm_compiler_configure.bzl", "arm_compiler_configure")
39+
diff --git third_party/py/non_hermetic/python_configure.bzl third_party/py/non_hermetic/python_configure.bzl
40+
index 300cbfb6c71..09d98505dd9 100644
41+
--- third_party/py/non_hermetic/python_configure.bzl
42+
+++ third_party/py/non_hermetic/python_configure.bzl
43+
@@ -206,7 +206,7 @@ def _create_local_python_repository(repository_ctx):
44+
# Resolve all labels before doing any real work. Resolving causes the
45+
# function to be restarted with all previous state being lost. This
46+
# can easily lead to a O(n^2) runtime in the number of labels.
47+
- build_tpl = repository_ctx.path(Label("//third_party/py:BUILD.tpl"))
48+
+ build_tpl = repository_ctx.path(Label("//third_party/py/non_hermetic:BUILD.tpl"))
49+
50+
python_bin = get_python_bin(repository_ctx)
51+
_check_python_bin(repository_ctx, python_bin)
52+
diff --git third_party/py/numpy/BUILD third_party/py/numpy/BUILD
53+
index 97c7907fc38..c80cc5287bc 100644
54+
--- third_party/py/numpy/BUILD
55+
+++ third_party/py/numpy/BUILD
56+
@@ -2,14 +2,15 @@ licenses(["restricted"])
57+
58+
package(default_visibility = ["//visibility:public"])
59+
60+
-alias(
61+
+py_library(
62+
name = "numpy",
63+
- actual = "@pypi_numpy//:pkg",
64+
+ srcs = ["tf_numpy_dummy.py"],
65+
+ srcs_version = "PY3",
66+
)
67+
68+
alias(
69+
name = "headers",
70+
- actual = "@pypi_numpy//:numpy_headers",
71+
+ actual = "@local_config_python//:numpy_headers",
72+
)
73+
74+
genrule(

0 commit comments

Comments
 (0)