Skip to content

Commit a64659b

Browse files
authored
Update protos for TF v2.3.0-rc2 (#3862)
This updates TensorBoard protos to match those of TensorFlow v2.3.0-rc2 to make the compat/proto_test pass. This change was generated by expanding `update.sh`'s replacement pattern, and running `git checkout v2.3.0-rc2` in a TensorFlow local repo, and running `./tensorboard/compat/proto/update.sh PATH_TO_TENSORFLOW_REPO`.
1 parent 7182735 commit a64659b

File tree

7 files changed

+69
-6
lines changed

7 files changed

+69
-6
lines changed

tensorboard/compat/proto/config.proto

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ message GPUOptions {
110110
// For the concept of "visible" and "virtual" GPU, see the comments for
111111
// "visible_device_list" above for more information.
112112
repeated float memory_limit_mb = 1;
113+
114+
// Priority values to use with the virtual devices. Use the cuda function
115+
// cudaDeviceGetStreamPriorityRange to query for valid range of values for
116+
// priority.
117+
//
118+
// On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
119+
// least priority and -1 for greatest priority.
120+
//
121+
// If this field is not specified, then the virtual devices will be
122+
// created with the default. If this field has values set, then the size
123+
// of this must match with the above memory_limit_mb.
124+
repeated int32 priority = 2;
113125
}
114126

115127
// The multi virtual device settings. If empty (not set), it will create
@@ -569,6 +581,13 @@ message ConfigProto {
569581
// to lower the encapsulated graph to a particular device.
570582
bool enable_mlir_bridge = 13;
571583

584+
// Whether to enable the MLIR-based Graph optimizations.
585+
//
586+
// This will become a part of standard Tensorflow graph optimization
587+
// pipeline, currently this is only used for gradual migration and testing
588+
// new passes that are replacing existing optimizations in Grappler.
589+
bool enable_mlir_graph_optimization = 16;
590+
572591
// If true, the session will not store an additional copy of the graph for
573592
// each subgraph.
574593
//
@@ -640,6 +659,13 @@ message RunOptions {
640659
// and tail) latency.
641660
// Consider using this option for CPU-bound workloads like inference.
642661
bool use_run_handler_pool = 2;
662+
// Options for run handler thread pool.
663+
message RunHandlerPoolOptions {
664+
// Priority of the request. The run handler thread pool will schedule ops
665+
// based on the priority number. The larger number means higher priority.
666+
int64 priority = 1;
667+
}
668+
RunHandlerPoolOptions run_handler_pool_options = 3;
643669
}
644670

645671
Experimental experimental = 8;

tensorboard/compat/proto/cost_graph.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,14 @@ message CostGraphDef {
7676
bool inaccurate = 17;
7777
}
7878
repeated Node node = 1;
79+
80+
// Total cost of this graph, typically used for balancing decisions.
81+
message AggregatedCost {
82+
// Aggregated cost value.
83+
float cost = 1;
84+
85+
// Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
86+
string dimension = 2;
87+
}
88+
repeated AggregatedCost cost = 2;
7989
}

tensorboard/compat/proto/resource_handle.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,5 @@ message ResourceHandleProto {
4141
// Data types and shapes for the underlying resource.
4242
repeated DtypeAndShape dtypes_and_shapes = 6;
4343

44-
// A set of devices containing the resource. If empty, the resource only
45-
// exists on `device`.
46-
repeated string allowed_devices = 7;
44+
reserved 7;
4745
}

tensorboard/compat/proto/rewriter_config.proto

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ message RewriterConfig {
6060
// Remapping (default is ON)
6161
// Remap subgraphs onto more efficient implementations.
6262
Toggle remapping = 14;
63+
// Common subgraph elimination (default is ON)
64+
// e.g. Simplify arithmetic ops; merge ops with same value (like constants).
65+
Toggle common_subgraph_elimination = 24;
6366
// Arithmetic optimizations (default is ON)
6467
// e.g. Simplify arithmetic ops; merge ops with same value (like constants).
6568
Toggle arithmetic_optimization = 7;
@@ -82,11 +85,15 @@ message RewriterConfig {
8285
// Enable the swap of kernel implementations based on the device placement
8386
// (default is ON).
8487
Toggle implementation_selector = 22;
85-
// Optimize data types (default is OFF).
86-
// e.g., This will try to use float16 on GPU which is faster.
88+
// Optimize data types for CUDA (default is OFF).
89+
// This will try to use float16 on GPU which is faster.
8790
// Note that this can change the numerical stability of the graph and may
8891
// require the use of loss scaling to maintain model convergence.
8992
Toggle auto_mixed_precision = 23;
93+
// Optimize data types for MKL (default is OFF).
94+
// This will try to use bfloat16 on CPUs, which is faster.
95+
// Note that this can change the numerical stability of the graph.
96+
Toggle auto_mixed_precision_mkl = 25;
9097
// Disable the entire meta optimizer (off by default).
9198
bool disable_meta_optimizer = 19;
9299

tensorboard/compat/proto/saved_object_graph.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ message SavedObject {
6161
SavedConstant constant = 9;
6262
SavedResource resource = 10;
6363
}
64+
65+
map<string, SaveableObject> saveable_objects = 11;
6466
}
6567

6668
// A SavedUserObject is an object (in the object-oriented language of the
@@ -162,3 +164,9 @@ message SavedResource {
162164
// device.
163165
string device = 1;
164166
}
167+
168+
message SaveableObject {
169+
// Node ids of concrete functions for saving and loading from a checkpoint.
170+
int32 save_function = 2;
171+
int32 restore_function = 3;
172+
}

tensorboard/compat/proto/struct.proto

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package tensorboard;
44

5+
import "tensorboard/compat/proto/tensor.proto";
56
import "tensorboard/compat/proto/tensor_shape.proto";
67
import "tensorboard/compat/proto/types.proto";
78

@@ -60,6 +61,8 @@ message StructuredValue {
6061
TensorSpecProto tensor_spec_value = 33;
6162
// Represents a value for tf.TypeSpec.
6263
TypeSpecProto type_spec_value = 34;
64+
// Represents a value for tf.BoundedTensorSpec.
65+
BoundedTensorSpecProto bounded_tensor_spec_value = 35;
6366

6467
// Represents a list of `Value`.
6568
ListValue list_value = 51;
@@ -103,13 +106,22 @@ message NamedTupleValue {
103106
repeated PairValue values = 2;
104107
}
105108

106-
// A protobuf to tf.TensorSpec.
109+
// A protobuf to represent tf.TensorSpec.
107110
message TensorSpecProto {
108111
string name = 1;
109112
tensorboard.TensorShapeProto shape = 2;
110113
tensorboard.DataType dtype = 3;
111114
}
112115

116+
// A protobuf to represent tf.BoundedTensorSpec.
117+
message BoundedTensorSpecProto {
118+
string name = 1;
119+
tensorboard.TensorShapeProto shape = 2;
120+
tensorboard.DataType dtype = 3;
121+
tensorboard.TensorProto minimum = 4;
122+
tensorboard.TensorProto maximum = 5;
123+
}
124+
113125
// Represents a tf.TypeSpec
114126
message TypeSpecProto {
115127
enum TypeSpecClass {
@@ -123,6 +135,7 @@ message TypeSpecProto {
123135
OPTIONAL_SPEC = 7; // tf.OptionalSpec
124136
PER_REPLICA_SPEC = 8; // PerReplicaSpec from distribute/values.py
125137
VARIABLE_SPEC = 9; // tf.VariableSpec
138+
ROW_PARTITION_SPEC = 10; // RowPartitionSpec from ragged/row_partition.py
126139
}
127140
TypeSpecClass type_spec_class = 1;
128141

tensorboard/compat/proto/update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ find tensorboard/compat/proto/ -type f -name '*.proto' -exec perl -pi \
3737
-e 's|package tensorflow.tfprof;|package tensorboard;|g;' \
3838
-e 's|package tensorflow;|package tensorboard;|g;' \
3939
-e 's|tensorflow\.DataType|tensorboard.DataType|g;' \
40+
-e 's|tensorflow\.TensorProto|tensorboard.TensorProto|g;' \
4041
-e 's|tensorflow\.TensorShapeProto|tensorboard.TensorShapeProto|g;' \
4142
{} +
4243

0 commit comments

Comments
 (0)