| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This benchmark creates many intermediates values, so we can make sure there's no performance overhead (it looks like there might be currently, or it might be from some other difference). It also runs in a defun and in legacy graph mode.
Results from my machine:
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v1_defun"
iters: 500
wall_time: 1.25822591782
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v2_defun"
iters: 500
wall_time: 5.99376106262
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v1_graph"
iters: 500
wall_time: 2.05277585983
}
entry {
name: "CondWithManyIntermediatesBenchmark.benchmark_cond_v2_graph"
iters: 500
wall_time: 2.84808516502
}
Clearly we have some work to do! I haven't looked into the time differences at all yet.
PiperOrigin-RevId: 216202325
|
| |
| |
| |
| | |
PiperOrigin-RevId: 216201714
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prior to this change, tf.colocate_with(v) would insert spurious operations (a ReadVariableOp and an Identity) in the graph when v is a resource variable, and then
colocate the operations within the block with those newly added, otherwise disconnected, operations.
This commit avoids adding the unnecessary ReadVariableOp/Identity nodes and colocates
operations within the block with the VarHandleOp.
PiperOrigin-RevId: 216201638
|
| |
| |
| |
| | |
PiperOrigin-RevId: 216151605
|
| |
| |
| |
| | |
PiperOrigin-RevId: 216079665
|
| |
| |
| |
| | |
PiperOrigin-RevId: 216021117
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 216009475
|
| | |
| | |
| | |
| | |
| | |
| | | |
for now.
PiperOrigin-RevId: 216003028
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current logic tries to bubble the forward pass tensor to the outermost
graph. That might not always be do-able e.g. when the cond is inside a while loop
it will need to know accumulator logic for while_loop. So instead, the cond_grad
now captures tensors from the forward If op's graph. When the grad If op is
built these tensors will be appropriately captured by the surrounding FuncGraph.
PiperOrigin-RevId: 215993009
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215989111
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
instead of assertMultiLineEqual if input is too large
(https://bugs.python.org/issue11763). This change is switching to use unified_diff
in that case.
PiperOrigin-RevId: 215987656
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215985679
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes #21405.
PiperOrigin-RevId: 215973401
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215969360
|
| | |
| | |
| | |
| | |
| | |
| | | |
`MapAndBatchDataset` whose user-provided functions have the property that each output argument take its value directly from an input argument (e.g. `lambda x, y: y, x`). This specialization can produce the result without having to schedule the function using the executor.
PiperOrigin-RevId: 215957592
|
| | |
| | |
| | |
| | |
| | |
| | | |
Enable GPU tests for cond_v2.
PiperOrigin-RevId: 215956220
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 215950207
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215947463
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215944829
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215937618
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215930596
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Automated rollback of PR #21945
END_PUBLIC
Automated rollback of commit 863f61412fcc654840c6b67473b742ea4e5e964e. Revert #21945.
PiperOrigin-RevId: 215913175
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215874612
|
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 215844450
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215824410
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
An environment variable (TF_EAGER_ENABLE_SMALL_TENSOR_CPU_PINNING) is provided to turn this off if necessary (its on by default).
PiperOrigin-RevId: 215821915
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
to execute a different-sized matrix multiply than the eager tests.
PiperOrigin-RevId: 215814346
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215811680
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215808649
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215797256
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215790636
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215788485
|
| | | | |
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 215788359
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This change splits up large test files into smaller ones, and re-enables tests that were disabled for obsolete reasons.
PiperOrigin-RevId: 215785396
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently if a Layer is invoked with the Functional API in Eager, `__call__` is only used
during setup, and thereafter `call` is used internally. This limits the ability
to add pre/post processing steps to `call` in Eager in the future.
Additionally, the Subclassed Model API already always uses `__call__` in Eager.
PiperOrigin-RevId: 215778408
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It was possible that we could mix shapes and types (T111 could mean a tensor of dtype 1 and shape (1, 1) or a tensor of dtype 11 and shape (1)).
PiperOrigin-RevId: 215777629
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
"character" is treated:
* BYTE: Position & length refer to bytes in the string. (Default)
* UTF8: The string is interpreted as UTF-8 encoded Unicode code points, and position & length are treated relative to them.
RELNOTES: Add option to get substring using Unicode characters
PiperOrigin-RevId: 215773373
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
PiperOrigin-RevId: 215761730
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
PiperOrigin-RevId: 215760505
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(This indirectly handles "Const" outputs automagically, since they are always unstacked.)
PiperOrigin-RevId: 215749824
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
During graph construction, the shape function for AssignAddVariableOp etc.
would raise an error when the value being "assign add"ed to the variable
has an incompatible shape.
With eager execution, no such validation was being made which triggerred
an assertion failure in eigen:
https://github.com/eigenteam/eigen-git-mirror/blob/7d97e1cbbe4424fda39e31c88def7c0863897640/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h#L479
This change prevents that assertion failure.
PiperOrigin-RevId: 215749071
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
tf.gradients currently returns [NONE] when the gradient of unconnected variables
is required. This backwards compatable change adds in the option to have zero
tensors returned that match the dimensions of the input tensor.
PiperOrigin-RevId: 215725488
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
PiperOrigin-RevId: 215711383
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
PiperOrigin-RevId: 215710849
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
PiperOrigin-RevId: 215706500
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously, if the rank of the input to this transformation was
statically unknown, we would erroneously report that the output is a
scalar, and violate downstream shape integrity checks. Instead, in
that case the output shape should be unknown.
PiperOrigin-RevId: 215683027
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Adds a bit of sanity checking by default to load_weights (e.g. for the case when absolutely nothing matches) while still supporting restore-on-create and the addition of new Layers to checkpointed models.
PiperOrigin-RevId: 215652168
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
PiperOrigin-RevId: 215643600
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
PiperOrigin-RevId: 215639962
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
PiperOrigin-RevId: 215637785
|