diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2017-09-07 16:02:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-07 16:06:27 -0700 |
commit | 83ba41e0a38d211fcdb5e3b4e212ef296dc96490 (patch) | |
tree | 48526ff884ad5ecfa72c85902ad0290c00c0bc1f /tensorflow/cc/BUILD | |
parent | bf1c826a7a3dadd2c971d82e811253b0430f590d (diff) |
More C++ while loop validation
With this change, we call IsValidOutputTensor() on the returned
outputs from the condition and body functions. This will return a bad
status if no output or a null output is set, or if an output has a bad
index.
This also adds unit tests for related error cases to the C and C++
unit tests. They often produce different errors because the C
implementation goes through the graph constructor.
PiperOrigin-RevId: 167925641
Diffstat (limited to 'tensorflow/cc/BUILD')
-rw-r--r-- | tensorflow/cc/BUILD | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tensorflow/cc/BUILD b/tensorflow/cc/BUILD index d9071ba6e4..c6d5792f49 100644 --- a/tensorflow/cc/BUILD +++ b/tensorflow/cc/BUILD @@ -248,6 +248,21 @@ cc_library_with_android_deps( ], ) +tf_cc_test( + name = "ops_while_loop_test", + size = "small", + srcs = ["ops/while_loop_test.cc"], + deps = [ + ":cc_ops", + ":client_session", + ":testutil", + ":while_loop", + "//tensorflow/core:test", + "//tensorflow/core:test_main", + "//tensorflow/core:testlib", + ], +) + cc_library( name = "grad_op_registry", srcs = ["framework/grad_op_registry.cc"], |