diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2017-08-29 08:24:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-08-29 08:28:50 -0700 |
commit | 0fd2a74120b86972441378f79fb5d03e86fed856 (patch) | |
tree | 89c1a3a0fba7638e287a1462802240fdf90c4727 /tensorflow/c/BUILD | |
parent | 3c6a603d8ae9035830626df0e261442a59f2b990 (diff) |
Introduce C++ API while loop builder method
This change adds a new function, BuildWhileLoop(), that constructs a
while loop. BuildWhileLoop() takes functions that build the cond and
body graphs, similar to the Python while_loop function. It also
switches the C API to use this new function in order to reduce code
duplication. This is in preparation for while loop gradients, which
are also implemented in the C++ API (along with the other gradient
code).
I didn't write unit tests for BuildWhileLoop, instead relying on the
current C API while loop tests.
This change also disables while loop creation on Android to avoid
pulling in extra C++ dependencies.
PiperOrigin-RevId: 166849829
Diffstat (limited to 'tensorflow/c/BUILD')
-rw-r--r-- | tensorflow/c/BUILD | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/c/BUILD b/tensorflow/c/BUILD index df2ae229db..604dfab148 100644 --- a/tensorflow/c/BUILD +++ b/tensorflow/c/BUILD @@ -61,6 +61,7 @@ tf_cuda_library( "//tensorflow/cc:ops", "//tensorflow/cc:grad_ops", "//tensorflow/cc:scope_internal", + "//tensorflow/cc:while_loop", "//tensorflow/core:core_cpu", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", |