| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
This is to ease the transition to the C API. Some tests currently mutate the
graph after running it but currently pass. This error was meant to guard
against existing behavior, so it's not a regression to make it a warning
instead for now.
PiperOrigin-RevId: 189395472
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 188216178
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
handle's shapes and types after its source operation has been created.
Context: framework/ops.py was recently updated to use the C API when setting shapes for an op's outputs. This update broke shape inference for graph functions that captured resource handles; this, in turn, made it impossible to create graph functions from Python methods that required fully defined shapes (e.g., like MNIST's `call` method). In particular, the C API computes shapes for ops when they are created and does not update them thereafter; this is problematic because when a resource handle is captured while building a function, we need to update the captured operation's output handle in order to propagate its outputs shapes and dtypes.
PiperOrigin-RevId: 179837104
|
|
|
|
| |
PiperOrigin-RevId: 179625412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this change, the C++ ImportGraphDef API returns unused
input_map keys (which are plumbed through to the C API as
well). However, the Python import_graph_def API requires slightly
different semantics: it throws an error for unused input_map keys that
are missing from the GraphDef.
This change modifies the C and C++ APIs to limit the returned keys to
those missing from the GraphDef, and plumbs this through to the C
API-enabled import_graph_def implementation.
Note that this is a change to the existing C API. Luckily the modified
method hasn't been released yet, so it's ok to change it.
PiperOrigin-RevId: 178783957
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GraphDef import
This change introduces yet another ImportGraphDef function to the C
API (TF_GraphImportGraphDefWithResults), but this one has extensible
return values so we shouldn't have to add more in the future.
This change also modifies the ImportGraphDef C interface to manage all
string data for the user.
PiperOrigin-RevId: 173894710
|
|
|
|
|
|
|
|
|
|
| |
Also, change the internal representation of TF_Function and
rename TF_GraphAddFunction to TF_GraphAddFunctionCopy to make it
clear that a copy of the function is added to the graph. Any
subsequent modifications to the function will not be reflected
in the copy added to the graph.
PiperOrigin-RevId: 169187793
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
END_PUBLIC
---
Commit 607816029 authored by Eugene Brevdo<ebrevdo@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Extended ScratchSpace to expose its underlying scratch tensor object.
PiperOrigin-RevId: 167649551
---
Commit db43fe68e authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add fast math attributes to all generated methods when fast math enabled.
RELNOTES: n/a
PiperOrigin-RevId: 167646637
---
Commit aebe8cc6f authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Call HloComputation.Accept instead of HloInstruction.Accept to get all instructions profiled.
RELNOTES: n/a
PiperOrigin-RevId: 167640259
---
Commit 0ab137cd8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 167604306
PiperOrigin-RevId: 167800256
|
|
|
|
|
|
|
|
| |
This change adds minimal functionality. Support for FunctionOptions,
attributes, output name rewriting, function name generation, etc is
comming next.
PiperOrigin-RevId: 167091238
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, colocation constraint semantics were not
well-defined when they were set using TF_ColocateWith and
TF_SetAttrStringList and/or TF_SetAttrValueProto. One could get
an exception if multiple methods were used.
After this change all changes to colocation attribute (i.e. _class)
are executed on TF_OperationDescription.colocation_constraints leading
to consistent semantics.
PiperOrigin-RevId: 164202666
|
|
|
|
| |
PiperOrigin-RevId: 164167582
|
|
|
|
|
|
|
|
| |
This change undoes some experimentation in
commit 22651083406ca01ac9d481e3367a3510d25f88cd
and restores TF_Tensor behavior to what is was prior to that change.
PiperOrigin-RevId: 164146670
|
|
|
|
|
|
|
|
| |
TF_Tensor objects are always backed by host memory. This commit lays
the groundwork for allowing TF_Tensor objects to refer to tensor data
on device (e.g., GPU) memory.
PiperOrigin-RevId: 163388079
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal is to make kernels mostly independent of proto headers, which will let
us lock down our .so imports. This CL does not remove any actual headers, but
changes a bunch of files so that header removal is possible in a followup CL.
It also marks the headers that will be removed with
// TODO(b/62899350): Remove
RELNOTES: n/a
PiperOrigin-RevId: 160552878
|
|
|
|
|
|
| |
by other code that require access to the underlying TensorBuffers.
PiperOrigin-RevId: 160323362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to debug a TensorFlow cluster or check whether devices are available
in a local session (e.g. GPU drivers are loaded), this change adds a
`sess.list_devices` API to list all devices within the cluster.
This CL implements the list_devices() feature via extensions to the TensorFlow
C API, and the corresponding additions to the session.h session class and
corresponding subclasses for both direct sessions, grpc_sessions,
tensorflow_serving, and others.
Additionally, in order to accomidate ClusterSpec propagation clusters,
Master::ListDevices now also includes a session_handle in order to identify
the appropriate master_session on which it should list the available
devices. (With ClusterSpec propagation, different sessions can have different
servers with different device capabilities.)
This CL adds a ListDevices() API to MasterSession. It is most
efficient to implement this API call there, because the MasterSession
already has a list of devices.
Additionally, this change upgrades the implementation of
Master::ListDevices() to delegate to the MasterSession if a session
handle is specified, and to return an error if no corresponding session
is found.
PiperOrigin-RevId: 157239656
|
|
Change: 153717143
|