diff options
author | 2017-06-01 11:30:36 -0700 | |
---|---|---|
committer | 2017-06-01 11:34:21 -0700 | |
commit | 02ac85399d4fb35d5055ecf426632b9446a70041 (patch) | |
tree | 869f062e55f021d0c8babd7afea7585d994331a3 /tensorflow/compiler/xla/text_literal_writer.h | |
parent | 2b75a9a6ea3ad646f64f70f99ccbb070a860e64a (diff) |
Introduce new class Literal to replace protobuf Literal.
This renames the existing Literal message to LiteralProto and introduces a new
C++ class named Literal to replace it.
The LiteralProto is only used at RPC boundaries, or when protobuf-specific
functionality is required. The Literal class offers a 'ToProto' function to
generate a new LiteralProto message when necessary.
Currently, all the static functions in class LiteralUtil, just forward to their
counterparts in class Literal. This will change in a future CL.
Class Literal implements all the buffers as std::vectors. The only exception
is preds(), which given the std::vector<bool> representation, makes it unusable
for the semantics we require (it's not possible to get the address of the
underlying vector, for instance).
The CL adds a BoolVector class to work around that issue.
In future CLs, the std::vector representation may be changed to something more
efficient, if needed.
PiperOrigin-RevId: 157739125
Diffstat (limited to 'tensorflow/compiler/xla/text_literal_writer.h')
-rw-r--r-- | tensorflow/compiler/xla/text_literal_writer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/text_literal_writer.h b/tensorflow/compiler/xla/text_literal_writer.h index 545bd22da9..7375493f43 100644 --- a/tensorflow/compiler/xla/text_literal_writer.h +++ b/tensorflow/compiler/xla/text_literal_writer.h @@ -16,6 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_COMPILER_XLA_TEXT_LITERAL_WRITER_H_ #define TENSORFLOW_COMPILER_XLA_TEXT_LITERAL_WRITER_H_ +#include "tensorflow/compiler/xla/literal_util.h" #include "tensorflow/compiler/xla/types.h" #include "tensorflow/compiler/xla/xla_data.pb.h" #include "tensorflow/core/lib/core/status.h" |