Skip to content

Commit 2a2439d

Browse files
authored
Updates TF compat protos. (#6532)
1 parent ae63f39 commit 2a2439d

File tree

10 files changed

+39
-15
lines changed

10 files changed

+39
-15
lines changed

tensorboard/compat/proto/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ tb_proto_library(
157157
":saved_object_graph",
158158
":saver",
159159
":struct",
160+
":tensor",
160161
":tensor_shape",
161162
":types",
162163
],

tensorboard/compat/proto/cluster.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ message JobDef {
7474
// If the `name` field contains "worker", and the `tasks` map contains a
7575
// mapping from 7 to "example.org:2222", then the device prefix
7676
// "/job:worker/task:7" will be assigned to "example.org:2222".
77+
//
78+
// If a job has multiple replicas, host-ports will be comma-delimited, with
79+
// one entry for each replica.
7780
map<int32, string> tasks = 2;
7881
}
7982

tensorboard/compat/proto/cpp_shape_inference.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import "tensorboard/compat/proto/types.proto";
99
option cc_enable_arenas = true;
1010
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/python/framework/cpp_shape_inference_go_proto";
1111

12+
// DISABLED.IfChange
1213
message CppShapeInferenceResult {
1314
message HandleShapeAndType {
1415
reserved 3;
@@ -34,3 +35,4 @@ message CppShapeInferenceInputsNeeded {
3435
repeated int32 input_tensors_needed = 1;
3536
repeated int32 input_tensors_as_shapes_needed = 2;
3637
}
38+
// DISABLED.ThenChange(//tensorboard/compat/proto/cpp_shape_inference.proto)
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
syntax = "proto3";
1+
syntax = "proto2";
22

33
package tensorboard;
44

@@ -13,40 +13,49 @@ message GraphDebugInfo {
1313
message FileLineCol {
1414
// File name index, which can be used to retrieve the file name string from
1515
// `files`. The value should be between 0 and (len(files)-1)
16-
int32 file_index = 1;
16+
optional int32 file_index = 1;
1717

1818
// Line number in the file.
19-
int32 line = 2;
19+
optional int32 line = 2;
2020

2121
// Col number in the file line.
22-
int32 col = 3;
22+
optional int32 col = 3;
2323

2424
// Name of function contains the file line.
25-
string func = 4;
25+
optional string func = 4;
2626

2727
// Source code contained in this file line.
28-
string code = 5;
28+
optional string code = 5;
2929
}
3030

3131
// This represents a stack trace which is a ordered list of `FileLineCol`.
3232
message StackTrace {
33-
// Each line in the stack trace.
34-
repeated FileLineCol file_line_cols = 1;
33+
repeated FileLineCol file_line_cols = 1; // Deprecated.
34+
repeated fixed64 frame_id = 2 [packed = true];
3535
}
3636

3737
// This stores all the source code file names and can be indexed by the
3838
// `file_index`.
3939
repeated string files = 1;
4040

41-
// This maps a node name to a stack trace in the source code.
41+
// Stack traces and frames are uniqueified during construction. These maps
42+
// index from the unique id for a frame/trace to the value.
43+
map<fixed64, FileLineCol> frames_by_id = 4;
44+
map<fixed64, StackTrace> traces_by_id = 6;
45+
46+
map<string, StackTrace> traces = 2; // Deprecated.
47+
48+
// This maps a node name to a trace id contained in `traces_by_id`.
49+
//
4250
// The map key is a mangling of the containing function and op name with
4351
// syntax:
4452
// op.name '@' func_name
45-
// For ops in the top-level graph, the func_name is the empty string.
53+
// For ops in the top-level graph, the func_name is the empty string and hence
54+
// the `@` may be ommitted.
4655
// Note that op names are restricted to a small number of characters which
4756
// exclude '@', making it impossible to collide keys of this form. Function
4857
// names accept a much wider set of characters.
4958
// It would be preferable to avoid mangling and use a tuple key of (op.name,
5059
// func_name), but this is not supported with protocol buffers.
51-
map<string, StackTrace> traces = 2;
60+
map<string, fixed64> name_to_trace_id = 5;
5261
}

tensorboard/compat/proto/meta_graph.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package tensorboard;
55
import "google/protobuf/any.proto";
66
import "tensorboard/compat/proto/graph.proto";
77
import "tensorboard/compat/proto/op_def.proto";
8+
import "tensorboard/compat/proto/tensor.proto";
89
import "tensorboard/compat/proto/tensor_shape.proto";
910
import "tensorboard/compat/proto/types.proto";
1011
import "tensorboard/compat/proto/saved_object_graph.proto";
@@ -325,6 +326,8 @@ message SignatureDef {
325326
// method_name. This is commonly used to support multi-headed computation,
326327
// where a single graph computation may return multiple results.
327328
string method_name = 3;
329+
// Named input to corresponding default values if any.
330+
map<string, TensorProto> defaults = 4;
328331
}
329332

330333
// An asset file def for a single file or a set of sharded files with the same

tensorboard/compat/proto/rewriter_config.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ message RewriterConfig {
126126
Toggle auto_mixed_precision_cpu = 29;
127127
// Disable the entire meta optimizer (off by default).
128128
bool disable_meta_optimizer = 19;
129+
// Disable the TFG optimizer (off by default).
130+
bool disable_tfg_optimizer = 32;
129131
// Optimizers registered by plugin (default is ON)
130132
Toggle use_plugin_optimizers = 28;
131133
// Conditional code motion (default is ON).

tensorboard/compat/proto/struct.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ message StructuredValue {
7474
NamedTupleValue named_tuple_value = 54;
7575
// Represents a value for tf.Tensor.
7676
tensorboard.TensorProto tensor_value = 55;
77+
// Represents a value for np.ndarray.
78+
tensorboard.TensorProto numpy_value = 56;
7779
}
7880
}
7981

tensorboard/compat/proto/types.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ enum DataType {
4444
DT_FLOAT8_E4M3FN = 25; // 4 exponent bits, 3 mantissa bits, finite-only, with
4545
// 2 NaNs (0bS1111111).
4646

47-
// Do not use! These are only for parameters. Every enum above
48-
// should have a corresponding value below (verified by types_test).
47+
// Do not use! These are only for TF1's obsolete reference Variables.
48+
// Every enum above should have a corresponding value below (verified by
49+
// types_test).
4950
DT_FLOAT_REF = 101;
5051
DT_DOUBLE_REF = 102;
5152
DT_INT32_REF = 103;
24 Bytes
Binary file not shown.

tensorboard/data/server/tensorboard.pb.rs

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)