diff options
author | Mingsheng Hong <hongm@google.com> | 2018-03-19 22:29:33 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-19 22:33:26 -0700 |
commit | 1a8258e0593270a8e2370517dff8faafce40a687 (patch) | |
tree | e097a315ba6c21f8f2ac72c5af17564d73efbc4e /tensorflow/c/c_test_util.h | |
parent | 407ddd1c0539cfc5d33ab2629230eab5a958b7d4 (diff) |
Added infeed support for experimental C APIs associated with TPU graph rewrite.
This initial design of the C API is different from (and mostly higher level
than) the python API counterparts for infeed, in that the python API has
explicit graph construction APIs for generating infeed enqueue/dequeue
ops (e.g. split_inputs_and_generate_enqueue_ops() and generate_dequeue_op()),
while the C API takes an input graph and redirects all input nodes to feed the
infeed enqueue.
One requirement/restriction is that the input nodes in the TF
graph (e.g. Placeholder) must specify their tensor shapes, for infeed enqueue
and dequeue nodes to properly compile with XLA. The API for more general shape
support will be designed and implemented later.
PiperOrigin-RevId: 189693028
Diffstat (limited to 'tensorflow/c/c_test_util.h')
-rw-r--r-- | tensorflow/c/c_test_util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/c/c_test_util.h b/tensorflow/c/c_test_util.h index d87c57fd51..cd19cf8d62 100644 --- a/tensorflow/c/c_test_util.h +++ b/tensorflow/c/c_test_util.h @@ -48,7 +48,8 @@ TF_Tensor* FloatTensor(float v); TF_Operation* Placeholder(TF_Graph* graph, TF_Status* s, const char* name = "feed", - TF_DataType dtype = TF_INT32); + TF_DataType dtype = TF_INT32, + const std::vector<int64_t>& dims = {}); TF_Operation* Const(TF_Tensor* t, TF_Graph* graph, TF_Status* s, const char* name = "const"); |