| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Prior to this change, captured resource variables in TF functions (or
any captured resource tensors) would not have shape information.
PiperOrigin-RevId: 204347306
|
|
|
|
|
|
|
|
|
|
| |
It turns out regular functions need to manually copy handle data in
addition to eager GraphModeFunctions, so I moved the C extensions to
python_api.h from eager/c_api.h.
This also cleans up function_test.py to assume the C API is enabled.
PiperOrigin-RevId: 194158700
|
|
|
|
|
|
|
|
| |
This change makes _set_shapes_for_outputs_c_api fetch and set
Tensor._handle_data. This is necessary for running the
Python shape inference code on resource tensors.
PiperOrigin-RevId: 190681459
|
|
|
|
| |
PiperOrigin-RevId: 190479555
|
|
|
|
|
|
|
|
| |
This change makes _set_shapes_for_outputs_c_api fetch and set
Tensor._handle_data. This is necessary for running the
Python shape inference code on resource tensors.
PiperOrigin-RevId: 190293303
|
|
|
|
|
|
|
|
|
|
|
| |
RecordMutation could race with ExtendSessionGraphHelper, which would
release the graph lock and only keep the session lock when extending
the session.
Also makes sure thread annotations are on declarations, not definitions
(otherwise they have no effect).
PiperOrigin-RevId: 188747158
|
|
|
|
|
|
| |
The overall approach is to use Graph._lock to synchronize Session.run calls and construction methods that rely on graph mutation. We don't want to synchronize the actual running of the graph, only the Extend call, so this change exposes an ExtendSession method to the Python API and disables extending automatically in TF_SessionRun.
PiperOrigin-RevId: 188106818
|
|
|
|
|
|
|
| |
There are many ops out there without shape functions, and it's very
onerous to add UnknownShape to all of them.
PiperOrigin-RevId: 186524294
|
|
|
|
|
|
|
| |
This allows while loop gradients to work with the C API. This change
also enables the C API for control flow tests.
PiperOrigin-RevId: 178438424
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With current tensorflow code, if user modifies
some operation after session.run() was called, this modification will
never make it to the C++ runtime and no errors will be raised leading
to silent wrong results.
This change adds checks for such cases when C API is enabled. We don't
change the code path for C API being disabled because C API should
be enabled by default soon.
PiperOrigin-RevId: 177359630
|
|
|
|
|
|
| |
Uses MergeInput from shape_inference to check if the new input is compatible with the preexisting shape. Also this changes the MergeInput method. Previously, MergeInput would only return true if the shapes differed *and* the merge was successful. Now, MergeInput returns true only if the merge is successful.
PiperOrigin-RevId: 175576173
|
|
|
|
| |
PiperOrigin-RevId: 174535271
|
|
|
|
| |
PiperOrigin-RevId: 174113043
|
|
|
|
| |
PiperOrigin-RevId: 170147211
|
|
|
|
| |
PiperOrigin-RevId: 167773598
|
|
|
|
| |
PiperOrigin-RevId: 162379684
|
|
Implements an incomplete version of Operation._add_control_input()
using a new extension to make sure the plumbing works.
This also adds header guards to c_api_internal.h, which were missing. For some reason the missing guards caused problems in the cmake build even though there doesn't appear to be any #include cycles.
PiperOrigin-RevId: 161705859
|