aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/BUILD
diff options
context:
space:
mode:
authorGravatar Peter Hawkins <phawkins@google.com>2018-09-26 13:48:21 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-26 13:51:50 -0700
commit1736e0bbbfdeeba178dff37c970b5a0180ee013f (patch)
tree390c309b5997a752644d2c50bb4ee5bf8fc1654d /tensorflow/core/BUILD
parent652ce1aaefdadd04a9905a0788ab26c6fff93658 (diff)
[TF] Add new internal ops _VarHandlesOp and _ReadVariablesOp.
The purpose of these ops is to fix a latency problem observed for an inference benchmark. Often a inference step starts by reading the value of many (hundreds) of weights. For a resource variable, this requires a VarHandleOp and a ReadVariableOp per variable. Running hundreds of trivial ops can add hundreds of microseconds of latency to the critical path of an inference step. The inter-op latency of the executor can be hundreds of nanoseconds, which rapidly adds up. This change introduces two fused ops _VarHandlesOp and _ReadVariablesOp that allow us to read many variables in a pair of larger ops, rather than many tiny ops. PiperOrigin-RevId: 214662338
Diffstat (limited to 'tensorflow/core/BUILD')
-rw-r--r--tensorflow/core/BUILD9
1 files changed, 8 insertions, 1 deletions
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD
index bc0bfb793c..d85cb379bb 100644
--- a/tensorflow/core/BUILD
+++ b/tensorflow/core/BUILD
@@ -1057,7 +1057,6 @@ tf_gen_op_libs(
"random_grad",
"random_ops",
"remote_fused_graph_ops",
- "resource_variable_ops",
"rpc_ops",
"scoped_allocator_ops",
"sdca_ops",
@@ -1099,6 +1098,14 @@ tf_gen_op_libs(
deps = ["//tensorflow/core/kernels:debug_ops"],
)
+tf_gen_op_libs(
+ is_external = False,
+ op_lib_names = [
+ "resource_variable_ops",
+ ],
+ deps = [":lib"],
+)
+
# And one for all user ops
cc_library(
name = "user_ops_op_lib",