aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api_experimental.h
Commit message (Collapse)AuthorAge
* Added an experimental API for user to set an internal error status.Gravatar Mingsheng Hong2018-09-27
| | | | | | | | | | See https://github.com/apple/swift/pull/19588/files#diff-923cd5ac82727b31d446c23641b3d749 for an example usage. Also removed an experimental API that's no longer needed. PiperOrigin-RevId: 214847132
* Added a C utility to create a ServerDef proto from text representation.Gravatar A. Unique TensorFlower2018-09-26
| | | | PiperOrigin-RevId: 214681193
* Added TFE_OpSetAttrTensor() to eager C API.Gravatar Mingsheng Hong2018-09-14
| | | | | | | Also added some experimental C APIs for facilitate the use of eager C APIs in S4TF compiler. PiperOrigin-RevId: 213041780
* Added experimental C APIs based on eager, as a first step towards using eagerGravatar Mingsheng Hong2018-09-06
| | | | | | based runtime in Swift for Tensorflow. PiperOrigin-RevId: 211892308
* Added a new eager C API TFE_NewContextFromSession(), where TFE_NewContext willGravatar Mingsheng Hong2018-09-04
| | | | | | | | | | | | | | | get an owned device mgr from the input session. One use case is in S4TF, we run a graph session to enqueue a tensor into a fifo queue, and then call TFE_Execute() on a dequeue op over the same queue, as a way to transfer a tensor from TF to host (tensor tranfer in the other direction also works). To make this work, we need TFE_Context and the the TF_Session to use the same ResourceMgr object (attached to a Device, which is in turn owned by DeviceMgr), so that both can access the fifo queue resource op. PiperOrigin-RevId: 211471075
* Add TF_CreateRunOptions. This enables Swift for TensorFlow's ↵Gravatar Richard Wei2018-07-30
| | | | | | compiler?runtime to dump run metadata for debugging. PiperOrigin-RevId: 206663537
* Internal changes.Gravatar Mingsheng Hong2018-07-02
| | | | PiperOrigin-RevId: 203059102
* Part 2 of Swift<->TF sends/recvs: support receiving tensors in TF fromGravatar Mingsheng Hong2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swift via direct session. The changes are: 1. Added a TF experimental C API for Swift host to enqueue a tensor for sending to TF. Again, the C APIs can be removed once the Fifo-queue based design proves stable later. 2. TFLowerGraph is extended to generate Fifo related nodes for TF to receive tensors. This is similar to the extension for TF to send tensors. 3. TFPartition is extended to support host send (createHostSend()), which does the tensor send via a new protocol method TensorSendableReceivable.sendToDevice(). The main complexity is in sending a scalar, where a new protocol method TensorSendableReceivable.createScalarTensor() is called to first create a tensor out of it, and then send it over to TF. Also removed code for protocol conformance on AccelerableByTensorFlow. Instead have compiler look up that conformance from the SILFunction on sending/receiving tensors. AccelerableByTensorFlow could be removed from the compiler-known protocol list now, but we'll defer that till things can stabilized more (in the past this protocol has been added to and removed from the list at different times). PiperOrigin-RevId: 195539436
* This is Part 1 of Swift<->TF sends/recvs: support sending tensors from TF toGravatar Mingsheng Hong2018-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swift via direct session. The changes are: 1. Added an experimental TF C API TF_DequeueNamedTensor() to consume the queued tensors from a dequeue op. One use case is for the Swift host program to consume tensors sent by TF, where the queue is a Fifo queue managed by TF. Enqueuing tensors are done by running an enqueue op in a graph. The queued tensors are not persisted, and will be lost if the process/machine dies. The queue has a bounded capacity, to prevent producer from being unboundedly ahead of consumer. while caller of TF_DequeueNamedTensor() could have run the Fifo dequeue op directly, the extra level of indirection provided by this API allows us to more easily switch the queuing impl to another mechanism. If and once we stabilize on the Fifo queue based impl, we can remove this API. 2. Added a new S4TF runtime API _TFCReceiveTensorHandle() that receives a tensor via TF_DequeueNamedTensor(). 3. To support tensor receives in host program, taught PartitionCloner in TFPartition to insert SIL code to call _TFCReceiveTensorHandle(). 4. To support tensor sends in accelerator program, taught TFGraphLowering in generate QueueEnqueueV2 nodes in the TF graphs, with appropriate control dependence to make sure these nodes get executed. a) The enqueue produces no output tensor, and is executed only for its side effect. To ensure it is executed properly, control dependence is wired up. The general design is: before a TF_Function (can be a top level function or the body function of a while op) produces an output tensor OT, make OT control dependent on the enqueue op, so that enqueue gets run before the function returns. b) If tensor send occurs in a while loop body, the body logic currently gets lowered in 3 places: the while op cond function, the while op body function, and the ops at the same level as the while op itself (for running the last loop iteration). In this case, the correct TFGraph lowering is to run the enqueue in the last 2 out of the 3 places above. After this CL, the dual versions of the above (dequeuing via an op, and enqueuing via C API) will be added. PiperOrigin-RevId: 194658511
* Merge changes from github.Gravatar Yifei Feng2018-04-23
| | | | PiperOrigin-RevId: 194031845
* Remove `TF_InitializeTPU` and `TF_ShutdownTPU` from experimental C API as ↵Gravatar Richard Wei2018-04-06
| | | | | | they are no longer needed. Also remove a duplicate function declaration. PiperOrigin-RevId: 191918408
* Extended experimental C API with MNIST dataset/iterators support.Gravatar Mingsheng Hong2018-03-26
| | | | PiperOrigin-RevId: 190500020
* Added experimental C APIs to build a stack of dataset + iterator nodes thatGravatar Mingsheng Hong2018-03-26
| | | | | | reads imagenet TFRecord files. PiperOrigin-RevId: 190488817
* Added experimental C APIs to build a hard-coded stack of dataset + iterator.Gravatar Mingsheng Hong2018-03-22
| | | | PiperOrigin-RevId: 190170332
* Simplified the experimental APIs related to TPU execution, by moving the graphGravatar Mingsheng Hong2018-03-21
| | | | | | rewrite functionality out of it. PiperOrigin-RevId: 190016936
* Added an experimental C API to dump TF_Graph in a human-readable format, forGravatar Mingsheng Hong2018-03-21
| | | | | | debugging purposes. PiperOrigin-RevId: 189997099
* Added infeed support for experimental C APIs associated with TPU graph rewrite.Gravatar Mingsheng Hong2018-03-19
| | | | | | | | | | | | | | | | 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
* Internal change.Gravatar Mingsheng Hong2018-03-14
| | | | PiperOrigin-RevId: 189131526
* Added an experimental C API TF_EnableXLACompilation() to enable XLA compilation.Gravatar Mingsheng Hong2018-02-16
Also ran "buildozer warn //third_party/tensorflow/c/BUILD" and removed an unused symbol. PiperOrigin-RevId: 186081948