Add opt_einsum to TensorFlow dependencies.
This library would be used for improving tf.einsum's performance through contraction path optimization. PiperOrigin-RevId: 255342691
This commit is contained in:
parent
51b4b90060
commit
8b01b9c509
@ -144,6 +144,7 @@ tensorflow/third_party/systemlibs/BUILD
|
||||
tensorflow/third_party/systemlibs/google_cloud_cpp.BUILD
|
||||
tensorflow/third_party/systemlibs/astor.BUILD
|
||||
tensorflow/third_party/systemlibs/six.BUILD
|
||||
tensorflow/third_party/systemlibs/opt_einsum.BUILD
|
||||
tensorflow/third_party/systemlibs/absl_py.absl.testing.BUILD
|
||||
tensorflow/third_party/systemlibs/boringssl.BUILD
|
||||
tensorflow/third_party/systemlibs/nsync.BUILD
|
||||
@ -214,6 +215,7 @@ tensorflow/third_party/mkl_dnn/LICENSE
|
||||
tensorflow/third_party/mkl_dnn/mkldnn.BUILD
|
||||
tensorflow/third_party/pcre.BUILD
|
||||
tensorflow/third_party/pybind11.BUILD
|
||||
tensorflow/third_party/opt_einsum.BUILD
|
||||
tensorflow/third_party/linenoise.BUILD
|
||||
tensorflow/third_party/sqlite.BUILD
|
||||
tensorflow/third_party/common.bzl
|
||||
|
@ -3549,6 +3549,7 @@ py_library(
|
||||
":math_ops",
|
||||
":platform",
|
||||
"//tensorflow/compiler/tf2xla/ops:gen_xla_ops",
|
||||
"@opt_einsum_archive//:opt_einsum",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -183,6 +183,7 @@ filegroup(
|
||||
"@local_config_tensorrt//:LICENSE",
|
||||
"@nasm//:LICENSE",
|
||||
"@nsync//:LICENSE",
|
||||
"@opt_einsum_archive//:LICENSE",
|
||||
"@pasta//:LICENSE",
|
||||
"@pcre//:LICENCE",
|
||||
"@png_archive//:LICENSE",
|
||||
|
@ -57,6 +57,7 @@ REQUIRED_PACKAGES = [
|
||||
'keras_applications >= 1.0.8',
|
||||
'keras_preprocessing >= 1.0.5',
|
||||
'numpy >= 1.14.5, < 2.0',
|
||||
'opt_einsum >= 2.3.2',
|
||||
'six >= 1.10.0',
|
||||
'protobuf >= 3.6.1',
|
||||
'tensorboard >= 1.14.0, < 1.15.0',
|
||||
|
@ -327,6 +327,18 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "opt_einsum_archive",
|
||||
build_file = clean_dep("//third_party:opt_einsum.BUILD"),
|
||||
sha256 = "d3d464b4da7ef09e444c30e4003a27def37f85ff10ff2671e5f7d7813adac35b",
|
||||
strip_prefix = "opt_einsum-2.3.2",
|
||||
system_build_file = clean_dep("//third_party/systemlibs:opt_einsum.BUILD"),
|
||||
urls = [
|
||||
"http://mirror.tensorflow.org/pypi.python.org/packages/f6/d6/44792ec668bcda7d91913c75237314e688f70415ab2acd7172c845f0b24f/opt_einsum-2.3.2.tar.gz",
|
||||
"https://pypi.python.org/packages/f6/d6/44792ec668bcda7d91913c75237314e688f70415ab2acd7172c845f0b24f/opt_einsum-2.3.2.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "absl_py",
|
||||
sha256 = "3d0f39e0920379ff1393de04b573bca3484d82a5f8b939e9e83b20b6106c9bbe",
|
||||
|
29
third_party/opt_einsum.BUILD
vendored
Normal file
29
third_party/opt_einsum.BUILD
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# Description:
|
||||
# opt_einsum is a library for optimizing tensor contraction order for einsum.
|
||||
|
||||
licenses(["notice"]) # MIT
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
py_library(
|
||||
name = "opt_einsum",
|
||||
srcs = [
|
||||
"opt_einsum/__init__.py",
|
||||
"opt_einsum/_version.py",
|
||||
"opt_einsum/backends/__init__.py",
|
||||
"opt_einsum/backends/cupy.py",
|
||||
"opt_einsum/backends/dispatch.py",
|
||||
"opt_einsum/backends/tensorflow.py",
|
||||
"opt_einsum/backends/theano.py",
|
||||
"opt_einsum/backends/torch.py",
|
||||
"opt_einsum/blas.py",
|
||||
"opt_einsum/compat.py",
|
||||
"opt_einsum/contract.py",
|
||||
"opt_einsum/helpers.py",
|
||||
"opt_einsum/parser.py",
|
||||
"opt_einsum/paths.py",
|
||||
"opt_einsum/sharing.py",
|
||||
],
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
11
third_party/systemlibs/opt_einsum.BUILD
vendored
Normal file
11
third_party/systemlibs/opt_einsum.BUILD
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
licenses(["notice"]) # MIT
|
||||
|
||||
filegroup(
|
||||
name = "LICENSE",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "opt_einsum",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
1
third_party/systemlibs/syslibs_configure.bzl
vendored
1
third_party/systemlibs/syslibs_configure.bzl
vendored
@ -32,6 +32,7 @@ VALID_LIBS = [
|
||||
"lmdb",
|
||||
"nasm",
|
||||
"nsync",
|
||||
"opt_einsum_archive",
|
||||
"org_sqlite",
|
||||
"pasta",
|
||||
"pcre",
|
||||
|
Loading…
Reference in New Issue
Block a user