Skip to content

Commit 549ec63

Browse files
committed
proto: sync to TensorFlow v1.15.0-rc0 (#2640)
Summary: These are synced to TensorFlow tac `v1.15.0-rc0`, which resolves to a0163a0a727c9c7af5ac976debd5e28d42275b8c. There are no new protos or new `import` dependencies, so the existing build rules and tests suffice. Test Plan: Running `bazel test //tensorboard/compat/proto:proto_test` now passes in a virtualenv with `tensorflow==1.15.0rc0` installed. This is the same as current TF 1.x nightlies, which are frozen, but _not_ the same as current TF 2.x nightlies, due to changes in HEAD. wchargin-branch: proto-sync-v1.15.0-rc0
1 parent 3ac504b commit 549ec63

12 files changed

+118
-12
lines changed

tensorboard/compat/proto/config.proto

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ option java_outer_classname = "ConfigProtos";
77
option java_multiple_files = true;
88
option java_package = "org.tensorflow.framework";
99

10-
// add go_package externally with copybara
10+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";
1111
import "tensorboard/compat/proto/cost_graph.proto";
1212
import "tensorboard/compat/proto/graph.proto";
1313
import "tensorboard/compat/proto/step_stats.proto";
@@ -327,6 +327,32 @@ message RPCOptions {
327327
// If compression_algorithm is set, the compression level to be used.
328328
// From 0 (no compression), up to 3.
329329
int32 compression_level = 3;
330+
331+
// Setting cache_rpc_response to true will enable sender side caching of
332+
// response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
333+
// requests . This is only necessary when the network fabric is experiencing a
334+
// significant error rate. Without it we'll fail a step on an network error,
335+
// while with it we'll be able to complete long steps (like complex
336+
// initializations) in the face of some network errors during RecvTensor.
337+
bool cache_rpc_response = 4;
338+
339+
// Disables TCP connection sharing when opening a new RPC channel.
340+
bool disable_session_connection_sharing = 5;
341+
}
342+
343+
// Metadata about the session.
344+
//
345+
// This can be used by the runtime and the Ops for debugging, monitoring, etc.
346+
//
347+
// The (name, version) tuple is expected to be a unique identifier for
348+
// sessions within the same process.
349+
//
350+
// NOTE: This is currently used and propagated only by the direct session.
351+
message SessionMetadata {
352+
string name = 1;
353+
354+
// The version is optional. If set, needs to be >= 0.
355+
int64 version = 2;
330356
}
331357

332358
// Session configuration parameters.
@@ -498,6 +524,22 @@ message ConfigProto {
498524
// This is helpful when a worker wants to partition a graph
499525
// (for example during a PartitionedCallOp).
500526
bool share_cluster_devices_in_session = 10;
527+
528+
// Metadata about the session.
529+
//
530+
// If set, this can be used by the runtime and the Ops for debugging,
531+
// monitoring, etc.
532+
//
533+
// NOTE: This is currently used and propagated only by the direct session.
534+
SessionMetadata session_metadata = 11;
535+
536+
// If true, the session may treat the graph as being static for optimization
537+
// purposes.
538+
//
539+
// If this option is set to true when a session is created, the full
540+
// GraphDef must be passed in a single call to Session::Create(), and
541+
// Session::Extend() may not be supported.
542+
bool optimize_for_static_graph = 12;
501543
};
502544

503545
Experimental experimental = 16;

tensorboard/compat/proto/debug.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobu
1010
// Option for watching a node in TensorFlow Debugger (tfdbg).
1111
message DebugTensorWatch {
1212
// Name of the node to watch.
13+
// Use "*" for wildcard. But note: currently, regex is not supported in
14+
// general.
1315
string node_name = 1;
1416

1517
// Output slot to watch.
16-
// The semantics of output_slot == -1 is that the node is only watched for
17-
// completion, but not for any output tensors. See NodeCompletionCallback
18-
// in debug_gateway.h.
19-
// TODO(cais): Implement this semantics.
18+
// The semantics of output_slot == -1 is that all outputs of the node
19+
// will be watched (i.e., a wildcard).
20+
// Other negative values of output_slot are invalid and will lead to
21+
// errors currently.
2022
int32 output_slot = 2;
2123

2224
// Name(s) of the debugging op(s).

tensorboard/compat/proto/meta_graph.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import "tensorboard/compat/proto/tensor_shape.proto";
1414
import "tensorboard/compat/proto/types.proto";
1515
import "tensorboard/compat/proto/saved_object_graph.proto";
1616
import "tensorboard/compat/proto/saver.proto";
17+
import "tensorboard/compat/proto/struct.proto";
1718

1819
// NOTE: This protocol buffer is evolving, and will go through revisions in the
1920
// coming months.
@@ -225,6 +226,15 @@ message TensorInfo {
225226
string dense_shape_tensor_name = 3;
226227
}
227228

229+
// Generic encoding for composite tensors.
230+
message CompositeTensor {
231+
// The serialized TypeSpec for the composite tensor.
232+
TypeSpecProto type_spec = 1;
233+
234+
// A TensorInfo for each flattened component tensor.
235+
repeated TensorInfo components = 2;
236+
}
237+
228238
oneof encoding {
229239
// For dense `Tensor`s, the name of the tensor in the graph.
230240
string name = 1;
@@ -233,6 +243,8 @@ message TensorInfo {
233243
// uses only the COO encoding. This is supported and documented in the
234244
// SparseTensor Python class.
235245
CooSparse coo_sparse = 4;
246+
// Generic encoding for CompositeTensors.
247+
CompositeTensor composite_tensor = 5;
236248
}
237249
DataType dtype = 2;
238250
// The static shape should be recorded here, to the extent that it can

tensorboard/compat/proto/node_def.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "tensorboard/compat/proto/attr_value.proto";
1111
message NodeDef {
1212
// The name given to this operator. Used for naming inputs,
1313
// logging, visualization, etc. Unique within a single GraphDef.
14-
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
14+
// Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_>./]*".
1515
string name = 1;
1616

1717
// The operation name. There may be custom parameters in attrs.
@@ -70,6 +70,15 @@ message NodeDef {
7070
// be {A, B}. This information can be used to map errors originating at the
7171
// current node to some top level source code.
7272
repeated string original_node_names = 1;
73+
74+
// This is intended to store the list of names of the functions from the
75+
// original graph that this node was derived. For example if this node, say
76+
// C, was result of a fusion of node A in function FA and node B in function
77+
// FB, then `original_funcs` would be {FA, FB}. If the node is in the top
78+
// level graph, the `original_func` is empty. This information, with the
79+
// `original_node_names` can be used to map errors originating at the
80+
// current ndoe to some top level source code.
81+
repeated string original_func_names = 2;
7382
};
7483

7584
// This stores debug information associated with the node.

tensorboard/compat/proto/op_def.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import "tensorboard/compat/proto/types.proto";
1414
// LINT.IfChange
1515
message OpDef {
1616
// Op names starting with an underscore are reserved for internal use.
17-
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
17+
// Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
1818
string name = 1;
1919

2020
// For describing inputs and outputs.

tensorboard/compat/proto/resource_handle.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ option java_multiple_files = true;
77
option java_package = "org.tensorflow.framework";
88
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
99

10+
import "tensorboard/compat/proto/tensor_shape.proto";
11+
import "tensorboard/compat/proto/types.proto";
12+
1013
// Protocol buffer representing a handle to a tensorflow resource. Handles are
1114
// not valid across executions, but can be serialized back and forth from within
1215
// a single run.
@@ -27,4 +30,13 @@ message ResourceHandleProto {
2730
// For debug-only, the name of the type pointed to by this handle, if
2831
// available.
2932
string maybe_type_name = 5;
33+
34+
// Protocol buffer representing a pair of (data type, tensor shape).
35+
message DtypeAndShape {
36+
DataType dtype = 1;
37+
TensorShapeProto shape = 2;
38+
}
39+
40+
// Data types and shapes for the underlying resource.
41+
repeated DtypeAndShape dtypes_and_shapes = 6;
3042
};

tensorboard/compat/proto/rewriter_config.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ option java_outer_classname = "RewriterConfigProtos";
77
option java_multiple_files = true;
88
option java_package = "org.tensorflow.framework";
99

10-
// add go_package externally with copybara
10+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";
1111

1212
import "tensorboard/compat/proto/attr_value.proto";
1313
import "tensorboard/compat/proto/verifier_config.proto";

tensorboard/compat/proto/saved_object_graph.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ message SavedUserObject {
7474
string identifier = 1;
7575
// Version information from the producer of this SavedUserObject.
7676
VersionDef version = 2;
77+
// Initialization-related metadata.
78+
string metadata = 3;
7779
}
7880

7981
// A SavedAsset points to an asset in the MetaGraph.

tensorboard/compat/proto/struct.proto

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ message StructuredValue {
5656
tensorboard.DataType tensor_dtype_value = 32;
5757
// Represents a value for tf.TensorSpec.
5858
TensorSpecProto tensor_spec_value = 33;
59+
// Represents a value for tf.TypeSpec.
60+
TypeSpecProto type_spec_value = 34;
5961

6062
// Represents a list of `Value`.
6163
ListValue list_value = 51;
@@ -104,4 +106,29 @@ message TensorSpecProto {
104106
string name = 1;
105107
tensorboard.TensorShapeProto shape = 2;
106108
tensorboard.DataType dtype = 3;
107-
};
109+
}
110+
111+
// Represents a tf.TypeSpec
112+
message TypeSpecProto {
113+
enum TypeSpecClass {
114+
UNKNOWN = 0;
115+
SPARSE_TENSOR_SPEC = 1; // tf.SparseTensorSpec
116+
INDEXED_SLICES_SPEC = 2; // tf.IndexedSlicesSpec
117+
RAGGED_TENSOR_SPEC = 3; // tf.RaggedTensorSpec
118+
TENSOR_ARRAY_SPEC = 4; // tf.TensorArraySpec
119+
DATA_DATASET_SPEC = 5; // tf.data.DatasetSpec
120+
DATA_ITERATOR_SPEC = 6; // IteratorSpec from data/ops/iterator_ops.py
121+
OPTIONAL_SPEC = 7; // tf.OptionalSpec
122+
PER_REPLICA_SPEC = 8; // PerReplicaSpec from distribute/values.py
123+
}
124+
TypeSpecClass type_spec_class = 1;
125+
126+
// The value returned by TypeSpec._serialize().
127+
StructuredValue type_state = 2;
128+
129+
// This is currently redundant with the type_spec_class enum, and is only
130+
// used for error reporting. In particular, if you use an older binary to
131+
// load a newer model, and the model uses a TypeSpecClass that the older
132+
// binary doesn't support, then this lets us display a useful error message.
133+
string type_spec_class_name = 3;
134+
}

tensorboard/compat/proto/types.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ enum DataType {
6767
DT_UINT64_REF = 123;
6868
}
6969
// LINT.ThenChange(
70-
// https://www.tensorflow.org/code/tensorflow/c/c_api.h,
70+
// https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h,
7171
// https://www.tensorflow.org/code/tensorflow/go/tensor.go,
7272
// https://www.tensorflow.org/code/tensorboard/compat/proto/tensor.cc,
7373
// https://www.tensorflow.org/code/tensorboard/compat/proto/types.h,

0 commit comments

Comments
 (0)