1616
1717workspace (name = "struct2tensor" )
1818
19+ local_repository (
20+ name = "python_version_repo" ,
21+ path = "third_party/python_version_repo" ,
22+ )
23+
24+ local_repository (
25+ name = "python_3_11_host" ,
26+ path = "third_party/python_3_11_host" ,
27+ )
28+
29+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
30+ load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
31+
32+ local_repository (
33+ name = "rules_java" ,
34+ path = "third_party/rules_java" ,
35+ )
36+
37+ local_repository (
38+ name = "local_config_cuda" ,
39+ path = "third_party/local_config_cuda" ,
40+ )
41+
42+ local_repository (
43+ name = "local_config_tensorrt" ,
44+ path = "third_party/local_config_tensorrt" ,
45+ )
46+
47+ local_repository (
48+ name = "local_config_rocm" ,
49+ path = "third_party/local_config_rocm" ,
50+ )
51+
52+ local_repository (
53+ name = "local_config_sycl" ,
54+ path = "third_party/local_config_sycl" ,
55+ )
56+
57+ local_repository (
58+ name = "tf_wheel_version_suffix" ,
59+ path = "third_party/tf_wheel_version_suffix" ,
60+ )
61+
62+ maybe (
63+ http_archive ,
64+ name = "platforms" ,
65+ urls = [
66+ "https://github.com/bazelbuild/platforms/releases/download/0.0.11/platforms-0.0.11.tar.gz" ,
67+ ],
68+ sha256 = "29742e87275809b5e598dc2f04d86960cc7a55b3067d97221c9abbc9926bff0f" ,
69+ )
70+
1971load ("//tf:tf_configure.bzl" , "tf_configure" )
2072
2173load ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" )
@@ -26,22 +78,46 @@ tf_configure(name = "local_config_tf")
2678
2779#####################################################################################
2880
81+
82+
83+ # ===== Abseil dependency =====
2984http_archive (
30- name = "zlib" ,
31- build_file = "@com_google_protobuf//:third_party/zlib.BUILD" ,
32- sha256 = "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c" ,
33- strip_prefix = "zlib-1.3.1" ,
34- urls = ["https://github.com/madler/zlib/archive/v1.3.1.tar.gz" ],
85+ name = "com_google_absl" ,
86+ sha256 = "d1abe9da2003e6cbbd7619b0ced3e52047422f4f4ac6c66a9bef5d2e99fea837" ,
87+ strip_prefix = "abseil-cpp-d38452e1ee03523a208362186fd42248ff2609f6" ,
88+ urls = [
89+ "https://github.com/abseil/abseil-cpp/archive/d38452e1ee03523a208362186fd42248ff2609f6.tar.gz" ,
90+ ],
91+ patches = [
92+ "//third_party:abseil_visibility.patch" ,
93+ ],
94+ patch_args = ["-p0" ],
95+ )
96+
97+ http_archive (
98+ name = "abseil-cpp" ,
99+ sha256 = "d1abe9da2003e6cbbd7619b0ced3e52047422f4f4ac6c66a9bef5d2e99fea837" ,
100+ strip_prefix = "abseil-cpp-d38452e1ee03523a208362186fd42248ff2609f6" ,
101+ urls = [
102+ "https://github.com/abseil/abseil-cpp/archive/d38452e1ee03523a208362186fd42248ff2609f6.tar.gz" ,
103+ ],
104+ patches = [
105+ "//third_party:abseil_visibility.patch" ,
106+ ],
107+ patch_args = ["-p0" ],
35108)
36109
37- # ===== Protobuf 4.25.6 dependency =====
110+
111+
112+
113+ # ===== Protobuf 6.31.1 dependency =====
38114# Must be declared BEFORE TensorFlow's workspaces to override the version they pull
39115http_archive (
40116 name = "com_google_protobuf" ,
41- sha256 = "4e6727bc5d23177edefa3ad86fd2f5a92cd324151636212fd1f7f13aef3fd2b7 " ,
42- strip_prefix = "protobuf-4.25.6 " ,
117+ sha256 = "6e09bbc950ba60c3a7b30280210cd285af8d7d8ed5e0a6ed101c72aff22e8d88 " ,
118+ strip_prefix = "protobuf-6.31.1 " ,
43119 urls = [
44- "https://github.com/protocolbuffers/protobuf/archive/v4.25.6.tar.gz " ,
120+ "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v6.31.1.zip " ,
45121 ],
46122)
47123
@@ -60,8 +136,8 @@ http_archive(
60136# 3. Request the new archive to be mirrored on mirror.bazel.build for more
61137# reliable downloads.
62138
63- _TENSORFLOW_GIT_COMMIT = "3c92ac03cab816044f7b18a86eb86aa01a294d95 " # tf 2.17.1
64- _TENSORFLOW_ARCHIVE_SHA256 = "317dd95c4830a408b14f3e802698eb68d70d81c7c7cfcd3d28b0ba023fe84a68 "
139+ _TENSORFLOW_GIT_COMMIT = "2.21.0 " # tf 2.21.0
140+ _TENSORFLOW_ARCHIVE_SHA256 = "ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921 "
65141
66142http_archive (
67143 name = "org_tensorflow" ,
@@ -72,11 +148,43 @@ http_archive(
72148 strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT ,
73149 patches = ["//third_party:tensorflow.patch" ],
74150 patch_args = ["-p1" ],
151+ repo_mapping = {
152+ "@abseil-cpp" : "@com_google_absl" ,
153+ },
154+ )
155+
156+ http_archive (
157+ name = "llvm-raw" ,
158+ sha256 = "3f986184ee126677dbd77edb16d6b82c057ec869fefd7a9871979941e52e837a" ,
159+ strip_prefix = "llvm-project-909041e4802c4b9a2223ca04099f35bf1dbbd460" ,
160+ urls = [
161+ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/909041e4802c4b9a2223ca04099f35bf1dbbd460.tar.gz" ,
162+ "https://github.com/llvm/llvm-project/archive/909041e4802c4b9a2223ca04099f35bf1dbbd460.tar.gz" ,
163+ ],
164+ build_file = "@xla//third_party/llvm:llvm.BUILD" ,
165+ patches = [
166+ "@xla//third_party/llvm:generated.patch" ,
167+ "@xla//third_party/llvm:build.patch" ,
168+ "@xla//third_party/llvm:mathextras.patch" ,
169+ "@xla//third_party/llvm:toolchains.patch" ,
170+ "@xla//third_party/llvm:zstd.patch" ,
171+ "@xla//third_party/llvm:lit_test.patch" ,
172+ "//third_party:llvm_configure.patch" ,
173+ ],
174+ patch_args = ["-p1" ],
175+ )
176+
177+ http_archive (
178+ name = "zlib" ,
179+ build_file = "@com_google_protobuf//:third_party/zlib.BUILD" ,
180+ sha256 = "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c" ,
181+ strip_prefix = "zlib-1.3.1" ,
182+ urls = ["https://github.com/madler/zlib/archive/v1.3.1.tar.gz" ],
75183)
76184
77- load ("//third_party:python_configure.bzl" , "local_python_configure" )
78- local_python_configure (name = "local_config_python" )
79- local_python_configure (name = "local_execution_config_python" )
185+ # load("//third_party:python_configure.bzl", "local_python_configure")
186+ # local_python_configure(name = "local_config_python")
187+ # local_python_configure(name = "local_execution_config_python")
80188
81189
82190# Please add all new struct2tensor dependencies in workspace.bzl.
0 commit comments