-
Notifications
You must be signed in to change notification settings - Fork 647
Expand file tree
/
Copy pathWORKSPACE
More file actions
160 lines (121 loc) · 4.32 KB
/
WORKSPACE
File metadata and controls
160 lines (121 loc) · 4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# This file includes external dependencies that are required to compile the
# TensorFlow op.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
local_repository(
name = "pypi_setuptools",
path = "third_party/pypi_setuptools",
)
local_repository(
name = "pypi_wheel",
path = "third_party/pypi_wheel",
)
# TensorFlow's .bzl files, loaded later in this file, also load rules_python
# but we need a slightly newer version that is still compatible with TF's.
http_archive(
name = "rules_python",
sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
strip_prefix = "rules_python-0.31.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
local_repository(
name = "python",
path = "third_party/python_legacy",
)
load("@python//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "pypi",
requirements_lock = "//:requirements.txt",
python_interpreter = interpreter,
extra_pip_args = [
"--index-url",
"https://pypi.org/simple/",
],
)
load("@pypi//:requirements.bzl", "install_deps")
install_deps()
# Eigen commit used by TensorFlow / TFQ.
# This commit corresponds to Eigen version 3.4.90
# (verified via Eigen/src/Core/util/Macros.h).
EIGEN_COMMIT = "33d0937c6bdf5ec999939fb17f2a553183d14a74"
http_archive(
name = "eigen",
sha256 = "1f4babf536ce8fc2129dbf92ff3be54cd18ffb2171e9eb40edd00f0a045a54fa",
build_file_content = """
cc_library(
name = "eigen3",
textual_hdrs = glob(["Eigen/**", "unsupported/**"]),
visibility = ["//visibility:public"],
)
""",
strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT),
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT),
"https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT),
],
)
http_archive(
name = "qsim",
sha256 = "720eeb97298819e00bbb218b8b58fcebbbc1e1708233598fdffeef0b97339617",
# patches = [
# "//third_party/tf:qsim.patch",
# ],
strip_prefix = "qsim-0.21.0",
urls = ["https://github.com/quantumlib/qsim/archive/refs/tags/v0.21.0.zip"],
)
http_archive(
name = "org_tensorflow",
sha256 = "f73e6d838b388c7b4d1ef88d1422a35bb5532644117a472fb0fee28a2215176c",
strip_prefix = "tensorflow-2.18.1",
urls = ["https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.18.1.zip"],
)
load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
tf_workspace3()
load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
tf_workspace2()
load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1")
tf_workspace1()
load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")
tf_workspace0()
load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
"cuda_json_init_repository",
)
# Even though we do not currently support CUDA in TFQ, the TensorFlow build
# configuration files needs these CUDA-related Bazel files.
cuda_json_init_repository()
load(
"@cuda_redist_json//:distributions.bzl",
"CUDA_REDISTRIBUTIONS",
"CUDNN_REDISTRIBUTIONS",
)
load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
"cuda_redist_init_repositories",
"cudnn_redist_init_repository",
)
cuda_redist_init_repositories(
cuda_redistributions = CUDA_REDISTRIBUTIONS,
)
cudnn_redist_init_repository(
cudnn_redistributions = CUDNN_REDISTRIBUTIONS,
)
load(
"@local_tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
"cuda_configure",
)
cuda_configure(name = "local_config_cuda")
load("//third_party/tf:tf_configure.bzl", "tf_configure")
tf_configure(name = "local_config_tf")
http_archive(
name = "six_archive",
build_file = "@com_google_protobuf//:six.BUILD",
sha256 = "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81",
url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz",
)
bind(
name = "six",
actual = "@six_archive//:six",
)