History log of /external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7d64e124103c8334b7d8b127cd2eff786959d185 06-Jan-2018 Mark Heffernan <meheff@google.com> Remove protobuf-compatibility methods from the Literal class.

This CL primarily does two things:

(1) Remove the protobuf-compatibility methods (eg, mutable_f32s()) from Literal. These were added to Literal as part of the migration of Literal from a proto to a c++ class. Now that Literal is a proper class, these protobuf methods make it difficult to enforce invariants and expose too much of the class' implementation details.

(2) Make shape an immutable property of Literals, and make shape and the data members holding the Literal data coherent by construction. Previously, the shape could be set arbitrarily, and the data members such as f32_ could be arbitrarily sized irrespective of the shape of the literal.

The remainder of the CL mostly deals with the fallout. Notable other changes:

- Literal is no longer a recursive data structure. To avoid copies when passing a subliteral of a tuple-shaped Literal, a LiteralView class is added which provides a read-only view of an arbitrary subliteral.

- Tuple-shaped Literals can no longer be built up incrementally so to avoid copying Literal values during construction, the following methods with move semantics are added: Literal::MoveFrom and Literal::MoveIntoTuple. These methods transfer ownership the underlying buffers enabling, for example, a literal to be moved into an element of a tuple-shaped literal with no data copying.

- Replace the internal data structure holding the actual data from a bunch of std::vectors (eg, s32s_, f32s, etc) to a single ShapeTree<char*>. This significantly simplifies accessors and makes improved support of tuple-shaped literals much easier (eg, Literal::Get<>() can now access elements in arbitrary subliterals).

Also, Literal is made movable, but not copyable. Otherwise, it is all too easy to accidentally introduce expensive copies of Literals. Literal::Clone is added to handle the case where a copy is needed (Literal::CloneToUnique already exists).

PiperOrigin-RevId: 181014890
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc
c975bc2b3fdc9674dd71a7ed89c74ce8ea2d46f0 23-Dec-2017 Peter Hawkins <phawkins@google.com> [TF:XLA] Refactor large list of hard-coded compile-time constant arguments to operators. Add a new .CompileTimeConstInput() annotation on kernel registrations instead.

PiperOrigin-RevId: 180008567
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc
bf5326a75412e59985b727b26f5cad01315b6c89 20-Dec-2017 Peter Hawkins <phawkins@google.com> [TF:XLA] Move XlaResource into its own file, and refactor it into a better-abstracted class. No functional changes intended.

PiperOrigin-RevId: 179734920
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc
93f9caba8e371bd2f55ec789ed2f8ece9b3d976d 30-Mar-2017 Peter Hawkins <phawkins@google.com> [TF:XLA] Refactor TF/XLA operator registration.

Rather than requiring an explicit registration for each (operator, backend) pair, by default register all operators for all backends, for all types supported by each backend.

As we are beginning to see out-of-tree backends, as XLA translations of operators are added to the TF/XLA bridge, per-backend explicit registration lists will become stale. Registering all operators on all backends is both less verbose and more maintainable for backend authors.

Since not all operators work on all backends, we add several constraint mechanisms:
* operators may specify type constraints that are shared across all backends.
* operators may specify a whitelist of backends on which they work. This is useful if an operator is CPU-only because of a CustomCall.
* backends may register a function that specifies operators to blacklist or whose registrations to modify. This is necessary since operator implementations cannot know the set of all out-of-tree backends.

This change also lays the ground-work for removing the list of compile-time constant inputs in const_analysis.cc. In a subsequent CL, compile-time constant inputs can be annotated on the XLA operator registration.
Change: 151724100
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc
8633b22f83d979d17ba30ba78a14fb72b109a86d 08-Mar-2017 A. Unique TensorFlower <gardener@tensorflow.org> TF-XLA Bridge ops, tests, and registrations for ReverseOp and ReverseV2Op.
Change: 149488853
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/reverse_op.cc