11# This file includes external dependencies that are required to compile the
22# TensorFlow op.
33
4+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
45
6+ # TensorFlow's .bzl files, loaded later in this file, also load rules_python
7+ # but we need a slightly newer version that is still compatible with TF's.
8+ http_archive (
9+ name = "rules_python" ,
10+ sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311" ,
11+ strip_prefix = "rules_python-0.31.0" ,
12+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz" ,
13+ )
514
6- load ("@bazel_tools//tools/build_defs/repo:http .bzl" , "http_archive " )
15+ load ("@rules_python//python:repositories .bzl" , "py_repositories " )
716
17+ py_repositories ()
818
19+ local_repository (
20+ name = "python" ,
21+ path = "third_party/python_legacy" ,
22+ )
923
10- EIGEN_COMMIT = "aa6964bf3a34fd607837dd8123bc42465185c4f8"
24+ load ("@python//:defs.bzl" , "interpreter" )
25+
26+ load ("@rules_python//python:pip.bzl" , "pip_parse" )
27+
28+ pip_parse (
29+ name = "pypi" ,
30+ requirements_lock = "//:requirements.txt" ,
31+ python_interpreter = interpreter ,
32+ extra_pip_args = [
33+ "--index-url" ,
34+ "https://pypi.org/simple/" ,
35+ ],
36+ )
37+
38+ load ("@pypi//:requirements.bzl" , "install_deps" )
39+
40+ install_deps ()
1141
42+ EIGEN_COMMIT = "aa6964bf3a34fd607837dd8123bc42465185c4f8"
1243
1344http_archive (
1445 name = "eigen" ,
@@ -37,16 +68,13 @@ http_archive(
3768 urls = ["https://github.com/quantumlib/qsim/archive/refs/tags/v0.13.3.zip" ],
3869)
3970
71+
4072http_archive (
4173 name = "org_tensorflow" ,
42- patches = [
43- "//third_party/tf:tf.patch" ,
44- ],
45- sha256 = "f771db8d96ca13c72f73c85c9cfb6f5358e2de3dd62a97a9ae4b672fe4c6d094" ,
46- strip_prefix = "tensorflow-2.15.0" ,
47- urls = [
48- "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.zip" ,
49- ],
74+ patches = ["//third_party/tf:tf.patch" ],
75+ sha256 = "c8c8936e7b6156e669e08b3c388452bb973c1f41538149fce7ed4a4849c7a012" ,
76+ strip_prefix = "tensorflow-2.16.2" ,
77+ urls = ["https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.2.zip" ],
5078)
5179
5280
@@ -73,8 +101,8 @@ tf_configure(name = "local_config_tf")
73101http_archive (
74102 name = "six_archive" ,
75103 build_file = "@com_google_protobuf//:six.BUILD" ,
76- sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a " ,
77- url = "https://pypi.python .org/packages/source/s/six /six-1.10 .0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55 " ,
104+ sha256 = "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 " ,
105+ url = "https://files.pythonhosted .org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2 /six-1.17 .0.tar.gz" ,
78106)
79107
80108bind (
0 commit comments