History log of /external/tensorflow/tensorflow/core/framework/types.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a73a6cff9aa1ee3a6db00cbeccbebe192372b05a 23-Jan-2018 Yong Tang <yong.tang.github@outlook.com> Fix `tf.pow(x, y)` edge case with integer x and negative integer y (#15607)

* Fix `tf.pow(x, y)` edge case with integer x and negative integer y

This fix tries to address the issue raised in 12156 where
pow(x, y) hangs with an integer x and a negative
value of y.

This fix tries to throw out an error like numpy in this case:
```
>>> np.power([5, 5], [2, -2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Integers to negative integer powers are not allowed.
```

This fix adds error to the C++ functor like safe div/mod so that
and InvalidArgument error could be triggered if any one of the values
of y is negative.

This fix fix 12156. This fix is also related to 9560.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add test cases for edge case of pow(x, y)

where x is an integer and y is an negative integer

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add DataTypeIsSigned implementation

And have a tight constraint on tf.pow error

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Sanitize with clang-format -i --style=Google

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
/external/tensorflow/tensorflow/core/framework/types.h
dcddfdf045f06c9cfc7579bb61ac23d3a3b4a44e 12-Jan-2018 A. Unique TensorFlower <gardener@tensorflow.org> Improve performance of several utility functions in TensorFlow

framework/types.h defines a variety of functions on DataType enums. Some of these functions are implemented by allocating arrays in the heap. Even though DataTypeVector is a typedef for InlinedVector, it only stores 4 elements inline. Many of the vectors used in types.h/types.cc contain more than 4 elements.

To make matters worse, some of these functions are called quite frequently under load, so we're wasting time allocating and copying arrays.

The set of distinct DataType values is so small, however, that we can represent a set of DataType values as a bitmask, and use bit-shifts and tests instead of sequential scans of arrays.

Even the functions that do not allocate, such as DataTypeCanUseMemcpy(), are needlessly inefficient (read: they use control-flow and indirect jumps when a simple table-based load would do; they are also not inlined). These costs were significant enough that they consumed about 1.2% of CPU cycles under heavy load.

The surprising cost of DataTypeCanUseMemcpy() inspired this change. I went ahead and made the change fully general, by adding a DataTypeSet type and changing all of the utility functions in framework/types.h to use it (with the exception of DataTypeAlwaysOnHost because it uses a _REF type), for the sake of generality and performance.

PiperOrigin-RevId: 181695458
/external/tensorflow/tensorflow/core/framework/types.h
e115b064f57f5c373f1acdb56b210c541ccf63fb 13-Dec-2017 Eugene Brevdo <ebrevdo@google.com> [TF] Mark DT_STRING and DT_RESOURCE types as always sitting on host memory.

This is important when these arguments may appear in op input lists or output lists,
where the signature may not be able to declare them as sitting on host.

For DT_RESOURCE types, just the handles are marked as sitting on host memory;
the actual data may reside on GPU.

PiperOrigin-RevId: 178837213
/external/tensorflow/tensorflow/core/framework/types.h
bbfe1d3fb4118790a35323c2474801a9273e40ea 10-Dec-2017 A. Unique TensorFlower <gardener@tensorflow.org> Add IsDataTypeComplex helper function. In numerous places, we needlessly depend on Eigen templates to determine if a datatype is complex. Cleaning up these instances will be done in a separate CL.

PiperOrigin-RevId: 178544917
/external/tensorflow/tensorflow/core/framework/types.h
71cd06c608d1cb6fb23f63cf20403b1958965c43 04-Dec-2017 Peter Hawkins <phawkins@google.com> [TF:XLA] Fix wrong output of FloorDiv op for DT_HALF values.

PiperOrigin-RevId: 177851804
/external/tensorflow/tensorflow/core/framework/types.h
4c7e02c082fdf3b4b04e42f1880cf6e0ff4fc409 18-Oct-2017 Peter Hawkins <phawkins@google.com> Add bitwise LeftShift (aka. tf.bitwise.left_shift) and RightShift (tf.bitwise_right_shift) operators to Tensorflow. Their semantics are intended to mirror numpy.left_shift and numpy.right_shift.

Fix a couple of missing cases of missing uint32/uint64 support exposed when adding tests for bitshifts.

PiperOrigin-RevId: 172530375
/external/tensorflow/tensorflow/core/framework/types.h
3bafe0a86f67dd54197c6d60bdb5053f510de7d8 10-Oct-2017 Peter Hawkins <phawkins@google.com> Add uint32 and uint64 types to TensorFlow.

This change merely creates the types, but does not register kernels that act on uint32/uint64 values. It also does not alter most op registration lists to include uint32/uint64 values. If desirable, that can be done in a subsequent change, although binary size will likely prove problematic if adding more kernels.

The intent of the change is so XLA-compiled code can make use uint32/uint64 types. Since XLA does not use traditional TensorFlow kernels, using uint32/uint64 operators from XLA will require only uint32/uint64 op registrations, but will require few new kernel registrations.

PiperOrigin-RevId: 171681867
/external/tensorflow/tensorflow/core/framework/types.h
6e3e7d18f42cb4237ce6dbe2ffd0f9f158c36daf 21-Aug-2017 Andrew Harp <andrewharp@google.com> Merge changes from github.
END_PUBLIC

---
Commit 575bd01d4 authored by Vijay Vasudevan<vrv@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Remove /replica:0 declaration in device functions and allow them
to be freely bound based on cluster names present.

When more than one value matches, it will choose the first
lexicographically available device that matches the specification,
which in practice will do pretty much the same thing as hardcoding
/replica:0.

PiperOrigin-RevId: 165766815

---
Commit d685bbc54 authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Benchmarks with backprop enabled (and removes overhead).

Before:
np.array([[3]]) took 1.50us (30000 iterations)
Tensor([[3]]) took 16.30us (30000 iterations)
MatMul [2, 2]: np.dot took 0.61us (30000 iterations)
MatMul [2, 2]: tf.matmul took 60.53us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 25.72us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.82us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 45.70us (30000 iterations)
MatMul [100, 784]: np.dot took 383.32us (1000 iterations)
MatMul [100, 784]: tf.matmul took 350.35us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 315.97us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 249.42us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 280.95us (1000 iterations)

If backprop is enabled:
np.array([[3]]) took 0.83us (30000 iterations)
Tensor([[3]]) took 15.21us (30000 iterations)
MatMul [2, 2]: np.dot took 0.63us (30000 iterations)
MatMul [2, 2]: tf.matmul took 76.31us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 38.66us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.31us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 51.96us (30000 iterations)
MatMul [100, 784]: np.dot took 378.34us (1000 iterations)
MatMul [100, 784]: tf.matmul took 352.09us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 364.28us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 350.68us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 377.19us (1000 iterations)

After:
np.array([[3]]) took 0.86us (30000 iterations)
Tensor([[3]]) took 15.19us (30000 iterations)
MatMul [2, 2]: np.dot took 0.60us (30000 iterations)
MatMul [2, 2]: tf.matmul took 64.51us (30000 iterations)
MatMul [2, 2]: gen_math_ops.mat_mul took 28.34us (30000 iterations)
MatMul [2, 2]: TFE_Py_Execute took 2.38us (30000 iterations)
MatMul [2, 2]: defun(tf.matmul) took 48.50us (30000 iterations)
MatMul [100, 784]: np.dot took 475.27us (1000 iterations)
MatMul [100, 784]: tf.matmul took 399.50us (1000 iterations)
MatMul [100, 784]: gen_math_ops.mat_mul took 307.80us (1000 iterations)
MatMul [100, 784]: TFE_Py_Execute took 272.83us (1000 iterations)
MatMul [100, 784]: defun(tf.matmul) took 350.06us (1000 iterations)
PiperOrigin-RevId: 165765641

---
Commit d902babbd authored by David Majnemer<majnemer@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Algebraic simplifier incorrectly transformed convolutions into bitcasts

PiperOrigin-RevId: 165765575

---
Commit 8e78e10ef authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
disable test temporarily

PiperOrigin-RevId: 165763204

---
Commit a271c37db authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Small improvements to the arithmetic optimizer

PiperOrigin-RevId: 165760972

---
Commit b6409594d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Convert some tests to cover both eager and graph.

PiperOrigin-RevId: 165760364

---
Commit 5ead76420 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Reduce XLA compile time by ~7% for a convolutional image model:

* Added CompactPointerSet<T>, which is optimized for set size <= 1.
* Changed expensive CHECKs to DCHECKS in buffer_assignment.cc
* Reserve space in DFS state array before starting DFS.
* Use unsigned arithmetic in DFS state maintenance.
* HloInstruction:
- Moved frequently used fields to start for better cache locality.
- Use InlinedVector instead of vector for operand array.
- Use InlinedVector instead of vector for DFS stack.
* Pre-compute "is array" and "is tuple" for LogicalBuffer.
* PointsToSet:
- Combine two ShapeTrees into one.
- Use CompactPointerSet instead of std::set to hold sources.
- Use CompactPointerSet instead of std::set to hold flattened buffers.
* ShapeTree: use unique_ptr instead of optional for shape storage
(reduces size and destruction overhead).
* Add proper const qualifiers to some FlatSet iterator methods.

Co-author=jeff
PiperOrigin-RevId: 165759117

---
Commit a0544b0b8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make TPU symbols more easily accessible from contrib.

PiperOrigin-RevId: 165753322

---
Commit cdc08afbb authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Slightly relax numeric tolerance for sinlge precision tests of matrix_solve_ls (and tighten it for double precision).

PiperOrigin-RevId: 165750936

---
Commit eebcc861a authored by Jianwei Xie<xiejw@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed the race condition between multi eval step increments.

PiperOrigin-RevId: 165750595

---
Commit bbc0b8471 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 165748384

---
Commit 65f87c967 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Change device string in RecvNodeDescriptor in VirtualScheduler from const
reference to const as the RecvNodeDescriptor (and cached_recv_nodes map)
outlives device string from the NodeDef.

PiperOrigin-RevId: 165748244

---
Commit 57b0276cf authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.

PiperOrigin-RevId: 165747467

---
Commit 64e54423b authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix nested dictionary handling in dataset elements.

Backports recent changes to the core version of the nest.py library.

Fixes #12372.

PiperOrigin-RevId: 165746517

---
Commit 378463ae8 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make tf.eye accept Python integer shapes and avoid generating unnecessary shape handling ops.
Clean up test and add tests with placeholders.

PiperOrigin-RevId: 165746090

---
Commit 109ecf823 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add support for complex in matrix_solve_ls_op.
Split into separate files for each data type to speed up build.

PiperOrigin-RevId: 165744539

---
Commit 51441302d authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Internal change.

PiperOrigin-RevId: 165737455

---
Commit d0cb32c2a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Docstring for ResourceVariable.

PiperOrigin-RevId: 165735441

---
Commit 32f4c5b6e authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Add IsFinite op in tf2xla.

PiperOrigin-RevId: 165734702

---
Commit 5f5c3eb0a authored by Mark Daoust<markdaoust@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Move "supervisor.md" from programmer's guide to api_guides.

PiperOrigin-RevId: 165732026

---
Commit d001b58de authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Dataset.map().

If the `map_func` returns a list of tensors, the current code will
attempt to stack it into a single tensor and raise an unintuitive
error. Some multi-output ops (such as `tf.py_func()`) return lists of
typically-not-stackable tensors. This change treats lists returned
from `map_func` as tuples; users who were relying on this
auto-stacking behavior should manually call `tf.stack()` (or
`tf.convert_to_tensor()`) on the list being returned.

Fixes #12396.

PiperOrigin-RevId: 165731970

---
Commit e6c60fb36 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix flakyness, sometimes the op takes ms to run.

PiperOrigin-RevId: 165728705

---
Commit 360bff8ae authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Makes tape.watch() work with ResourceVariables.
To this end, also adds a property, `device`, to TensorNode.

PiperOrigin-RevId: 165726368

---
Commit 80bd004cd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implements SVDF model for keyword spotting tutorial.

PiperOrigin-RevId: 165725938

---
Commit aaabf6b90 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix bug: Using a ComputationDataHandle from the wrong ComputationBuilder.

PiperOrigin-RevId: 165724017

---
Commit 107d165d9 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use 2-arg TraceMe constructor to prevent unnecessary StrCat computation when
tracing is disabled.

PiperOrigin-RevId: 165722280

---
Commit 7d01f89cc authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Android demo app for speech recognition

PiperOrigin-RevId: 165714459

---
Commit a6729325a authored by Alexandre Passos<apassos@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Deletes convert_n_to_eager_tensor. Moves convert_to_eager_tensor to constant_op.

PiperOrigin-RevId: 165704074

---
Commit 573b303ac authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BUILD cleanup in tensorflow/core/kernels

PiperOrigin-RevId: 165688864

---
Commit 711be6adc authored by Derek Murray<mrry@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
`Dataset.from_generator()` constructs a dataset from a Python generator.

With this change, it becomes possible to use a Python generator as the source
dataset for a `tf.contrib.data` input pipeline. This enables easier integration
with non-TensorFlow data sources. The generator can yield a nested structure of
NumPy arrays, or values convertible to NumPy arrays.

This addresses a concern raised in issue #7951.

PiperOrigin-RevId: 165663857

---
Commit 00594ecdd authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
New landing page and leftnav for Programmer's Guide.

PiperOrigin-RevId: 165660897

---
Commit 7359fec79 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Implement Batchnorm Inference by expanding them into smaller ops.

1. Add batch norm inference support in batchnorm_rewriter
2. Connect xla's batchnorm inference to tf's FusedBatchNorm

RELNOTES: n/a
PiperOrigin-RevId: 165655351

---
Commit f0da8bf56 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[Rematerialization] Reconsider to remat operations with control dependencies

We added a conservartive logic to not rematerialize operations with control dependencies since the rematerialized operations could result in undesired ordering. However, we now realize that when we remat an operation, we also copy the dependencies of them, which guarantees the rematerialized operation has the same constraint as the original operation.

PiperOrigin-RevId: 165654629

---
Commit a1225879c authored by Chris Leary<leary@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Propagate error code in computation replay tool.

PiperOrigin-RevId: 165654497

---
Commit 513def0bb authored by Benoit Steiner<bsteiner@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed BuildOpInfoWithoutDevice

PiperOrigin-RevId: 165653933

---
Commit d7e425f0b authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix linear algebra benchmarks.

PiperOrigin-RevId: 165653891

---
Commit 465c40819 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fix the shape information propagation for Enter op.

PiperOrigin-RevId: 165653579

---
Commit c0198fd8d authored by Derek Murray<derek.murray@gmail.com>
Committed by gunan<gunan@google.com>:
[CMake] Add missing dependencies on boosted_trees protos and other fixes (#12315)

* [CMake] Add missing dependencies

* Avoid rebuilding boosted_trees protos for Python.

* Add GPU implementation ZeroInitializerOp to the CMake build.

---
Commit 641943fd7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Update ops-related pbtxt files.

PiperOrigin-RevId: 165652758

---
Commit e31346452 authored by Jonathan Hseu<jhseu@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
TPUEstimator: Fix the outfeed thread join.

PiperOrigin-RevId: 165651781

---
Commit 565a9d350 authored by Vijay Vasudevan<vrv@google.com>
Committed by Andrew Harp<andrewharp@users.noreply.github.com>:
Add missing 'type' keyword to ArgumentParser add_argument (#12275)

Fixes #12210
---
Commit 19a55725a authored by Rohan Jain<rohanj@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Allowing functions to run across devices. This change expands the ProcessFunctionLibraryRuntime library to Instantiate and Run functions on different devices. When a FunctionLibraryRuntime encounters a function with a target that is another device, it delegates Instantiate() and Run() calls to the ProcessFunctionLibraryRuntime.

This change also moves the table_ containing all function instantiations to the PFLR instead of the FunctionLibraryRuntime.

PiperOrigin-RevId: 165651194

---
Commit 8c0853db7 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a test for negative and zero pow() input.

PiperOrigin-RevId: 165650096

---
Commit a3c4e980e authored by Pete Warden<petewarden@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Fixed input shape for freezing audio graphs

PiperOrigin-RevId: 165649546

---
Commit 9b9e5989d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Add a call_logit_fn utility for logit_fn's, similar to Estimator's _call_model_fn.

PiperOrigin-RevId: 165649388

---
Commit 4ff1f4442 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove the script as well if building tf_nightly.

---
Commit 373d78987 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Adding the break.

---
Commit 0139ac983 authored by Amit Patankar<amitpatankar@google.com>
Committed by Amit Patankar<amitpatankar@google.com>:
Remove tensorboard as a required package if we are building tf_nightly.

---
Commit a92bd5d5c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 165630063

PiperOrigin-RevId: 165957821
/external/tensorflow/tensorflow/core/framework/types.h
fce5222dcf4d563a23055efeee89599dc36539c0 21-Jul-2017 Manjunath Kudlur <keveman@google.com> Added DT_VARIANT type.

A tensor with DT_VARIANT type can store arbitrary C++ data structures.
DT_VARIANT is implemented using a type-erased data structure similar to
std::any, but with extensions to make it compatible with tensorflow::Tensor.
In particular, Encode and Decode methods need to be provided by C++ classes
whose objects are stored in Variant.
PiperOrigin-RevId: 162754827
/external/tensorflow/tensorflow/core/framework/types.h
83faa857765a4c9846447866ee99aeecfafb9b59 21-Jul-2017 Manjunath Kudlur <keveman@google.com> Automated g4 rollback of changelist 162668355

PiperOrigin-RevId: 162733043
/external/tensorflow/tensorflow/core/framework/types.h
19cc9a796d86b5cf2193e7648ac9ae05c5efb53f 20-Jul-2017 Manjunath Kudlur <keveman@google.com> Added DT_VARIANT type.

A tensor with DT_VARIANT type can store arbitrary C++ data structures.
DT_VARIANT is implemented using a type-erased data structure similar to
std::any, but with extensions to make it compatible with tensorflow::Tensor.
In particular, Encode and Decode methods need to be provided by C++ classes
whose objects are stored in Variant.
PiperOrigin-RevId: 162668355
/external/tensorflow/tensorflow/core/framework/types.h
8e05564f9cf9a0dbd02f7f5e902b084cdad7c29b 27-Jun-2017 Geoffrey Irving <geoffreyi@google.com> Make ResourceHandle not be a proto

I'm trying to make core/kernels independent of protos. Currently the dtype ResourceHandle is itself a proto. After this CL, ResourceHandle is a normal C++ type which gets converted to/from ResourceHandleProto at (de)serialization time.

RELNOTES: n/a
PiperOrigin-RevId: 160329002
/external/tensorflow/tensorflow/core/framework/types.h
7866fa01b79a297908e7871d3b274fa02a5ce5e2 01-Jun-2017 A. Unique TensorFlower <gardener@tensorflow.org> This change significantly reduces time and resources used to load large TensorFlow graphs.

For a real-world large graph (13k nodes, 20k edges), this change:

* reduces all heap allocations by 19%
* reduces retained (final) heap allocations by 2.2%
* reduces CPU time by 11.2%

In most TF graphs, the set of unique values set to Node::assigned_device_name() is quite small. This change adds an interning table to the Graph object, which contains all of the unique values used for Node::set_assigned_device_name(), as well as a look-up table. This is the main source of the reduction in retained heap memory; nearly all nodes are assigned to just one or two unique devices.

This change removes the "string assigned_device_name_" field from the Node class, and replaces it with "int assigned_device_name_index_". However, because you need both the index and the name table to get the actual value, the Node::assigned_device_name() accessor needs access to the parent Graph. This requires adding a "Graph* graph_" field to the Node class.

In the future, if all users of this property are converted to use Graph::assigned_device_name(Node*), then the Node::graph_ field can be deleted, and the space reclaimed. However, doing so is out of the scope of this CL, and even with this new pointer field, the Node class is smaller than it was before, so this is still a net win.

The placement algorithm in simple_placer.cc is one of the main accessors of the Node::assigned_device_name property. This CL contains significant changes to simple_placer.cc, which directly take advantage of the fact that the property is an index into a name table, rather than treating it simply as a string. Many temporary allocations are also removed, which is the main source of the reduction in total heap allocations.

This CL also contains a few changes that remove short-lived allocations in unrelated code, such as the changes in op.cc/h, costmodel.cc, etc. It is extremely easy in C++ to accidentally allocate memory, especially when implicit conversions and copy constructors allocate memory.

All of the changes in this CL were motivated by empirical measurement, using CPU profiling and heap profiling.

PiperOrigin-RevId: 157762909
/external/tensorflow/tensorflow/core/framework/types.h
1d0b8c007b8bc7f77dd63c74f02d87185071f038 09-May-2017 Peter Hawkins <phawkins@google.com> Remove unnecessary copies of value parameters.

PiperOrigin-RevId: 155511618
/external/tensorflow/tensorflow/core/framework/types.h
bc456e361d49d1d89a74b80060c70efb51fd7d87 23-Mar-2017 Martin Wicke <wicke@google.com> Merge changes from github.
Change: 151046259
/external/tensorflow/tensorflow/core/framework/types.h
a771598ad83ca33eb42594d7e804859371ba4ca9 09-Nov-2016 Benoit Steiner <bsteiner@google.com> Merge changes from github.
Change: 138675832
/external/tensorflow/tensorflow/core/framework/types.h
27b7506133141d3894e0de7443d4b59d7a5d5f42 14-Oct-2016 A. Unique TensorFlower <gardener@tensorflow.org> Adds a resource reference dtype to TF.
Change: 136199499
/external/tensorflow/tensorflow/core/framework/types.h
05ce371d64ce0c427f7706f0f58a9260a5a0470b 30-Sep-2016 A. Unique TensorFlower <gardener@tensorflow.org> Add a core:framework_minimal library that includes minimal headers for types,
basic tensor operations, and code annotations.

Refactor some existing parts to be included in the minimal header set:
- Allocator::is_simple -> is_simple_type in type_traits.h
- bfloat16 definition -> numeric_types.h
- prefetch in mem.h -> new platform/prefetch.h header
- dynamic annotatons in mem.h -> new platform/dynamic_annotations.h header
Change: 134733006
/external/tensorflow/tensorflow/core/framework/types.h
c8b59c046895fa5b6d79f73e0b5817330fcfbfc1 02-Jun-2016 A. Unique TensorFlower <nobody@tensorflow.org> Update copyright for 3p/tf/core.
Change: 123900938
/external/tensorflow/tensorflow/core/framework/types.h
1ed0e764c8ca84d45823f2fd172dc8d40f89e3e2 04-May-2016 Geoffrey Irving <geoffreyi@google.com> Catch integer division by zero on CPU to avoid SIGFPE

We let it through on GPU since the behavior is bizarre but harmless.

On the CPU, we have to turn off packet math in Eigen and use a special binary
functor that sets an error bit on division by zero. Ideally we'd be able to
use packet math too; all it would take is a nice way for checking if a packet
contains a zero.

Fixes #2163.
Change: 121429857
/external/tensorflow/tensorflow/core/framework/types.h
9d03824d6740be0c043c431566c917ec0cf6cf3f 22-Mar-2016 A. Unique TensorFlower <nobody@tensorflow.org> Add a half type to TensorFlow core, based on Eigen::half.

Note that this is only the type, not support for it in any ops,
so it is not useful for anything yet. In particular,
neither TF_CALL_REAL_NUMBER_TYPES nor TF_CALL_GPU_NUMBER_TYPES
list Eigen::half, so even though a lot of ops will end up
declaring support for the new type, calling them will fail at
runtime.
Change: 117825461
/external/tensorflow/tensorflow/core/framework/types.h
4c85a08666796faad743a47b63d350132d5c0c90 16-Mar-2016 Geoffrey Irving <geoffreyi@google.com> Rollforward of "Merge changes from github."
Change: 117375570
/external/tensorflow/tensorflow/core/framework/types.h
9a4878cc17d4039939e8df5a2a984cca8028baeb 16-Mar-2016 Vijay Vasudevan <vrv@google.com> Rollback of: "Merge changes from github."
Change: 117304114
/external/tensorflow/tensorflow/core/framework/types.h
3ae663ccc5d08976e0f547d5b2ece35067a6673e 16-Mar-2016 Martin Wicke <wicke@google.com> Merge changes from github.
Change: 117301677
/external/tensorflow/tensorflow/core/framework/types.h
125b8058c0b815c7b1b2663ff2d7568d81c08313 12-Feb-2016 A. Unique TensorFlower <nobody@tensorflow.org> Add a bitcast op for changing the type of a tensor without copying its buffer

Fixes #655.
Change: 114542161
/external/tensorflow/tensorflow/core/framework/types.h
0c6c4b93dedf6a2c654e012a4ffe1df642834419 05-Feb-2016 A. Unique TensorFlower <nobody@tensorflow.org> Allows int32 on host memory work when a function passes int32 in/out.
Change: 113922125
/external/tensorflow/tensorflow/core/framework/types.h
64aa0989c110433e275d23bbe6f3605a26b2efb0 26-Jan-2016 Josh Levenberg <josh11b@tensorflow.org> Global search & replace to move to the new location for
tensorflow/core/ files and build targets.
Change: 113080064
/external/tensorflow/tensorflow/core/framework/types.h
668b2a7667921db344b9725f7909ead0eb1f7c6b 25-Jan-2016 A. Unique TensorFlower <nobody@tensorflow.org> Adds UINT16 type to TensorFlow.
Change: 112970147
/external/tensorflow/tensorflow/core/framework/types.h
ef507752ed7162d0a44e93993e0ab57c3565ce28 21-Dec-2015 A. Unique TensorFlower <nobody@tensorflow.org> Change: 110592065
/external/tensorflow/tensorflow/core/framework/types.h
9c3043ff3bf31a6a81810b4ce9e87ef936f1f529 20-Nov-2015 Manjunath Kudlur <keveman@gmail.com> TensorFlow: Improve performance of Alexnet

Changes:

* error message that refers to removed `DefaultSession` method.
* -Wnull-conversion warnings
* the "_start_time" attr for recvs when the flag "--brain_enable_scheduling_for_recvs" is set.
* typo in tutorial data download progress message.
* a typo ("however their installing"=>"however installing").
* typo, rename "TensorFlow Mechanics" to "How To" to be consistent with the website.
* a typo ("subtact"=>"subtract").
* protobuf examples in comments in tensorflow::Example.proto.
* formula formatting in MNIST beginner tutorial
* negative fraction-of-queue-full stats
* protobuf inclusion path so that Android demo will build under Blaze.
* small typo (moderatly > moderately)
* Session.run() to check that tensor arguments come from the session's graph.
* another six import
* seq2seq typo in bazel command

Base CL: 108349164
/external/tensorflow/tensorflow/core/framework/types.h
ab34d55ce7618e52069a2e1c9e51aac5a1ea81c3 18-Nov-2015 Vijay Vasudevan <vrv@google.com> TensorFlow: more features, performance improvements, and doc fixes.

Changes:
- Add Split/Concat() methods to TensorUtil (meant for convenience, not
speed) by Chris.

- Changes to linear algebra ops interface by Rasmus

- Tests for tensorboard by Daniel

- Fix bug in histogram calculation by Cassandra

- Added tool for backwards compatibility of OpDefs. Tool
Checks in history of opdefs and their changes, checks for
backwards-incompatible changes. All done by @josh11b

- Fix some protobuf example proto docs by Oliver

- Add derivative of MatrixDeterminant by @yaroslavvb

- Add a priority queue queue by @ebrevdo

- Doc and typo fixes by Aurelien and @dave-andersen

- Speed improvements to ConvBackwardFilter by @andydavis

- Improve speed of Alexnet on TitanX by @zheng-xq

- Add some host memory annotations to some GPU kernels by Yuan.

- Add support for doubles in histogram summary by @jmchen-g

Base CL: 108158338
/external/tensorflow/tensorflow/core/framework/types.h
56313def004795f75ef8281a0294c958d28f1e06 16-Nov-2015 Vijay Vasudevan <vrv@google.com> TensorFlow: Doc and linter fixes, some additional tests and
error handling, updates to website.

Changes:
- Removes redundant reshape from image models by @mrry
- Default TensorBoard to localhost by @danmane
- Reformatting of tensorflow/core by @josh11b
- Make tutorials backwards compatible to 0.5.0 by @girving
- Improve print documentation (md files not updated).
- Add proper scrolling to sitemap by @martinwicke

Base CL: 107956254
/external/tensorflow/tensorflow/core/framework/types.h
f41959ccb2d9d4c722fe8fc3351401d53bcf4900 07-Nov-2015 Manjunath Kudlur <keveman@gmail.com> TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.

Base CL: 107276108
/external/tensorflow/tensorflow/core/framework/types.h