Skip to content

Commit 32e1e66

Browse files
committed
update tensorflow serving protos to 2.4.0
1 parent a021aa0 commit 32e1e66

33 files changed

+201
-34
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# upstream tensorflow/serving version
2-
build --embed_label=2.3.0
2+
build --embed_label=2.4.0
33

44
build --verbose_failures
55
# enable proper toolchain resolution for cc rules

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Additionally, a pure python3 wheel is published that includes the `tensorflow_se
2525
**Install Wheels with `pip`**
2626
```sh
2727
# on linux_amd64 python 3.7
28-
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.3.0/tensorflow_serving_arm_client-2.3.0-cp37-none-manylinux2014_x86_64.whl
28+
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.4.0/tensorflow_serving_arm_client-2.4.0-cp37-none-manylinux2014_x86_64.whl
2929
# on linux_arm64 python 3.7
30-
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.3.0/tensorflow_serving_arm_client-2.3.0-cp37-none-manylinux2014_aarch64.whl
30+
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.4.0/tensorflow_serving_arm_client-2.4.0-cp37-none-manylinux2014_aarch64.whl
3131
# on linux_arm python 3.7
32-
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.3.0/tensorflow_serving_arm_client-2.3.0-cp37-none-manylinux2014_armv7l.whl
32+
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.4.0/tensorflow_serving_arm_client-2.4.0-cp37-none-manylinux2014_armv7l.whl
3333
# pure python 3 (will also install grpcio and protobuf pypi packages)
34-
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.3.0/tensorflow_serving_arm_client-2.3.0-py3-none-any.whl
34+
pip install https://github.com/emacski/tensorflow-serving-arm-client/releases/download/2.4.0/tensorflow_serving_arm_client-2.4.0-py3-none-any.whl
3535
```
3636

3737
**Building Wheels From Source**

proto/tensorflow/core/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ proto_library(
1919
"protobuf/cluster.proto",
2020
"protobuf/config.proto",
2121
"protobuf/control_flow.proto",
22+
"protobuf/data/experimental/service_config.proto",
2223
"protobuf/data/experimental/snapshot.proto",
2324
"protobuf/debug.proto",
2425
"protobuf/debug_event.proto",

proto/tensorflow/core/framework/types.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,14 @@ enum DataType {
7474
// https://www.tensorflow.org/code/tensorflow/core/framework/types.cc,
7575
// https://www.tensorflow.org/code/tensorflow/python/framework/dtypes.py,
7676
// https://www.tensorflow.org/code/tensorflow/python/framework/function.py)
77+
78+
// For identifying the underlying type of a variant. For variants, the types
79+
// listed here are a subset of the types in the variant type registry,
80+
// corresponding to commonly used variants which must occasionally be
81+
// special-cased.
82+
enum SpecializedType {
83+
// Invalid/unknown specialized type.
84+
ST_INVALID = 0;
85+
// "tensorflow::TensorList" in the variant type registry.
86+
ST_TENSOR_LIST = 1;
87+
}

proto/tensorflow/core/profiler/profiler_options.proto

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

33
package tensorflow;
44

5+
// Next ID: 11
56
message ProfileOptions {
67
// Some default value of option are not proto3 default value. Use this version
78
// to determine if we should use default option value instead of proto3
@@ -50,5 +51,35 @@ message ProfileOptions {
5051
// Whether serialize hlo_proto when XLA is used. (version >= 1)
5152
bool enable_hlo_proto = 7;
5253

53-
// next-field: 8
54+
// The local profiler starts profiling at this Unix timestamp in nanoseconds.
55+
uint64 start_timestamp_ns = 8;
56+
57+
// The local profiler collects `duration_ms` milliseconds of data. If the
58+
// value is 0, profiling continues until interrupted.
59+
uint64 duration_ms = 9;
60+
61+
// Directory to save profile data to. No-op when empty.
62+
string repository_path = 10;
63+
}
64+
65+
// Options for remote profiler session manager.
66+
// Next ID: 6
67+
message RemoteProfilerSessionManagerOptions {
68+
// Options for each local profiler.
69+
ProfileOptions profiler_options = 1;
70+
71+
// List of servers to profile. Supported formats: host:port.
72+
repeated string service_addresses = 2;
73+
74+
// Unix timestamp of when the session was started.
75+
uint64 session_creation_timestamp_ns = 3;
76+
77+
// Maximum time (in milliseconds) a profiling session manager waits for all
78+
// profilers to finish after issuing gRPC request. If value is 0, session
79+
// continues until interrupted. Otherwise, value must be greater than
80+
// profiler_options.duration_ms.
81+
uint64 max_session_duration_ms = 4;
82+
83+
// Start of profiling is delayed by this much (in milliseconds).
84+
uint64 delay_ms = 5;
5485
}

proto/tensorflow/core/profiler/protobuf/xplane.proto

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ package tensorflow.profiler;
55
option cc_enable_arenas = true;
66

77
// A container of parallel XPlanes, generated by one or more profiling sources.
8-
// Next ID: 4
8+
// Next ID: 5
99
message XSpace {
1010
repeated XPlane planes = 1;
1111
// Errors (if any) in the generation of planes.
1212
repeated string errors = 2;
1313
// Warnings (if any) in the generation of planes;
1414
repeated string warnings = 3;
15+
// List of hostnames that XPlanes are generated from.
16+
repeated string hostnames = 4;
1517
}
1618

1719
// An XPlane is a container of parallel timelines (XLines), generated by a
@@ -36,6 +38,7 @@ message XPlane {
3638
map<int64, XStatMetadata> stat_metadata = 5;
3739

3840
// XStats associated with this plane, e.g. device capabilities.
41+
// Each of these XStats should have a different metadata_id.
3942
repeated XStat stats = 6;
4043
}
4144

@@ -89,6 +92,7 @@ message XEvent {
8992
int64 duration_ps = 3;
9093

9194
// XStats associated with the event.
95+
// Each of these XStats should have a different metadata_id.
9296
repeated XStat stats = 4;
9397
}
9498

@@ -112,8 +116,9 @@ message XStat {
112116
}
113117
}
114118

115-
// Metadata for an XEvent, shared by all instances of the same event.
116-
// Next ID: 5
119+
// Metadata for an XEvent, corresponds to an event type and is shared by
120+
// all XEvents with the same metadata_id.
121+
// Next ID: 6
117122
message XEventMetadata {
118123
// XPlane.event_metadata map key.
119124
int64 id = 1;
@@ -126,15 +131,21 @@ message XEventMetadata {
126131

127132
// Additional metadata in serialized format.
128133
bytes metadata = 3;
134+
135+
// XStats that are constant for all XEvents with the same metadata_id.
136+
// Each of these XStats should have a different metadata_id.
137+
repeated XStat stats = 5;
129138
}
130139

131-
// Metadata for an XStat, shared by all instances of the same stat.
140+
// Metadata for an XStat, corresponds to a stat type and is shared by all
141+
// XStats with the same metadata_id.
132142
// Next ID: 4
133143
message XStatMetadata {
134144
// XPlane.stat_metadata map key.
135145
int64 id = 1;
136146

137147
// Name of the stat (should be short).
148+
// Two XStatMetadata with different id should have different names.
138149
string name = 2;
139150

140151
// Description of the stat (might be long).

proto/tensorflow/core/protobuf/bfc_memory_map.proto

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

33
package tensorflow;
44

5-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
5+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
66

77
// Some of the data from AllocatorStats
88
message MemAllocatorStats {

proto/tensorflow/core/protobuf/cluster.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ option cc_enable_arenas = true;
2121
option java_outer_classname = "ClusterProtos";
2222
option java_multiple_files = true;
2323
option java_package = "org.tensorflow.distruntime";
24-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
24+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
2525

2626
// This file contains protos to be used when defining a TensorFlow
2727
// cluster.

proto/tensorflow/core/protobuf/config.proto

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ option cc_enable_arenas = true;
1313
option java_outer_classname = "ConfigProtos";
1414
option java_multiple_files = true;
1515
option java_package = "org.tensorflow.framework";
16-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
16+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
1717

1818
message GPUOptions {
1919
// Fraction of the available GPU memory to allocate for each process.
@@ -568,6 +568,9 @@ message ConfigProto {
568568
// Session::Extend() may not be supported.
569569
bool optimize_for_static_graph = 12;
570570

571+
// This field will eventually be deprecated and replaced by
572+
// mlir_bridge_rollout (b/166038521).
573+
//
571574
// Whether to enable the MLIR-based TF->XLA bridge.
572575
//
573576
// This is a replacement to the existing bridge, and not ready for
@@ -581,6 +584,22 @@ message ConfigProto {
581584
// to lower the encapsulated graph to a particular device.
582585
bool enable_mlir_bridge = 13;
583586

587+
// An enum that describes the state of the MLIR bridge rollout.
588+
enum MlirBridgeRollout {
589+
// If this field is left unspecified, the MLIR bridge may be selectively
590+
// enabled on a per graph basis.
591+
MLIR_BRIDGE_ROLLOUT_UNSPECIFIED = 0;
592+
// Enabling the MLIR bridge enables it for all graphs in this session.
593+
MLIR_BRIDGE_ROLLOUT_ENABLED = 1;
594+
// Disabling the MLIR bridge disables it for all graphs in this session.
595+
MLIR_BRIDGE_ROLLOUT_DISABLED = 2;
596+
}
597+
// This field is underdevelopment, for now use enable_mlir_bridge
598+
// (b/166038521).
599+
//
600+
// Whether to enable the MLIR-based TF->XLA bridge.
601+
MlirBridgeRollout mlir_bridge_rollout = 17;
602+
584603
// Whether to enable the MLIR-based Graph optimizations.
585604
//
586605
// This will become a part of standard Tensorflow graph optimization

proto/tensorflow/core/protobuf/control_flow.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ option cc_enable_arenas = true;
66
option java_outer_classname = "ControlFlowProtos";
77
option java_multiple_files = true;
88
option java_package = "org.tensorflow.framework";
9-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
9+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
1010

1111
// Control flow context related protocol buffers.
1212

0 commit comments

Comments
 (0)