diff --git a/.bazelrc b/.bazelrc index f3d7652..cf7c0a3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,5 +1,5 @@ # upstream tensorflow/serving version -build --embed_label=2.3.0 +build --embed_label=2.4.0 build --verbose_failures # enable proper toolchain resolution for cc rules diff --git a/README.md b/README.md index 5933133..a9839e7 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@ Additionally, a pure python3 wheel is published that includes the `tensorflow_se **Install Wheels with `pip`** ```sh # on linux_amd64 python 3.7 -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 +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 # on linux_arm64 python 3.7 -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 +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 # on linux_arm python 3.7 -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 +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 # pure python 3 (will also install grpcio and protobuf pypi packages) -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 +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 ``` **Building Wheels From Source** diff --git a/proto/tensorflow/core/BUILD b/proto/tensorflow/core/BUILD index 296e639..ae0926d 100644 --- a/proto/tensorflow/core/BUILD +++ b/proto/tensorflow/core/BUILD @@ -19,6 +19,7 @@ proto_library( "protobuf/cluster.proto", "protobuf/config.proto", "protobuf/control_flow.proto", + "protobuf/data/experimental/service_config.proto", "protobuf/data/experimental/snapshot.proto", "protobuf/debug.proto", "protobuf/debug_event.proto", diff --git a/proto/tensorflow/core/framework/types.proto b/proto/tensorflow/core/framework/types.proto index 900132c..61549ae 100644 --- a/proto/tensorflow/core/framework/types.proto +++ b/proto/tensorflow/core/framework/types.proto @@ -74,3 +74,14 @@ enum DataType { // https://www.tensorflow.org/code/tensorflow/core/framework/types.cc, // https://www.tensorflow.org/code/tensorflow/python/framework/dtypes.py, // https://www.tensorflow.org/code/tensorflow/python/framework/function.py) + +// For identifying the underlying type of a variant. For variants, the types +// listed here are a subset of the types in the variant type registry, +// corresponding to commonly used variants which must occasionally be +// special-cased. +enum SpecializedType { + // Invalid/unknown specialized type. + ST_INVALID = 0; + // "tensorflow::TensorList" in the variant type registry. + ST_TENSOR_LIST = 1; +} \ No newline at end of file diff --git a/proto/tensorflow/core/profiler/profiler_options.proto b/proto/tensorflow/core/profiler/profiler_options.proto index 8b4fc3d..899bdb9 100644 --- a/proto/tensorflow/core/profiler/profiler_options.proto +++ b/proto/tensorflow/core/profiler/profiler_options.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package tensorflow; +// Next ID: 11 message ProfileOptions { // Some default value of option are not proto3 default value. Use this version // to determine if we should use default option value instead of proto3 @@ -50,5 +51,35 @@ message ProfileOptions { // Whether serialize hlo_proto when XLA is used. (version >= 1) bool enable_hlo_proto = 7; - // next-field: 8 + // The local profiler starts profiling at this Unix timestamp in nanoseconds. + uint64 start_timestamp_ns = 8; + + // The local profiler collects `duration_ms` milliseconds of data. If the + // value is 0, profiling continues until interrupted. + uint64 duration_ms = 9; + + // Directory to save profile data to. No-op when empty. + string repository_path = 10; +} + +// Options for remote profiler session manager. +// Next ID: 6 +message RemoteProfilerSessionManagerOptions { + // Options for each local profiler. + ProfileOptions profiler_options = 1; + + // List of servers to profile. Supported formats: host:port. + repeated string service_addresses = 2; + + // Unix timestamp of when the session was started. + uint64 session_creation_timestamp_ns = 3; + + // Maximum time (in milliseconds) a profiling session manager waits for all + // profilers to finish after issuing gRPC request. If value is 0, session + // continues until interrupted. Otherwise, value must be greater than + // profiler_options.duration_ms. + uint64 max_session_duration_ms = 4; + + // Start of profiling is delayed by this much (in milliseconds). + uint64 delay_ms = 5; } diff --git a/proto/tensorflow/core/profiler/protobuf/xplane.proto b/proto/tensorflow/core/profiler/protobuf/xplane.proto index 48aa38d..f57d760 100644 --- a/proto/tensorflow/core/profiler/protobuf/xplane.proto +++ b/proto/tensorflow/core/profiler/protobuf/xplane.proto @@ -5,13 +5,15 @@ package tensorflow.profiler; option cc_enable_arenas = true; // A container of parallel XPlanes, generated by one or more profiling sources. -// Next ID: 4 +// Next ID: 5 message XSpace { repeated XPlane planes = 1; // Errors (if any) in the generation of planes. repeated string errors = 2; // Warnings (if any) in the generation of planes; repeated string warnings = 3; + // List of hostnames that XPlanes are generated from. + repeated string hostnames = 4; } // An XPlane is a container of parallel timelines (XLines), generated by a @@ -36,6 +38,7 @@ message XPlane { map stat_metadata = 5; // XStats associated with this plane, e.g. device capabilities. + // Each of these XStats should have a different metadata_id. repeated XStat stats = 6; } @@ -89,6 +92,7 @@ message XEvent { int64 duration_ps = 3; // XStats associated with the event. + // Each of these XStats should have a different metadata_id. repeated XStat stats = 4; } @@ -112,8 +116,9 @@ message XStat { } } -// Metadata for an XEvent, shared by all instances of the same event. -// Next ID: 5 +// Metadata for an XEvent, corresponds to an event type and is shared by +// all XEvents with the same metadata_id. +// Next ID: 6 message XEventMetadata { // XPlane.event_metadata map key. int64 id = 1; @@ -126,15 +131,21 @@ message XEventMetadata { // Additional metadata in serialized format. bytes metadata = 3; + + // XStats that are constant for all XEvents with the same metadata_id. + // Each of these XStats should have a different metadata_id. + repeated XStat stats = 5; } -// Metadata for an XStat, shared by all instances of the same stat. +// Metadata for an XStat, corresponds to a stat type and is shared by all +// XStats with the same metadata_id. // Next ID: 4 message XStatMetadata { // XPlane.stat_metadata map key. int64 id = 1; // Name of the stat (should be short). + // Two XStatMetadata with different id should have different names. string name = 2; // Description of the stat (might be long). diff --git a/proto/tensorflow/core/protobuf/bfc_memory_map.proto b/proto/tensorflow/core/protobuf/bfc_memory_map.proto index 6f7a530..6e2614c 100644 --- a/proto/tensorflow/core/protobuf/bfc_memory_map.proto +++ b/proto/tensorflow/core/protobuf/bfc_memory_map.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package tensorflow; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Some of the data from AllocatorStats message MemAllocatorStats { diff --git a/proto/tensorflow/core/protobuf/cluster.proto b/proto/tensorflow/core/protobuf/cluster.proto index 6c7162f..41a55e0 100644 --- a/proto/tensorflow/core/protobuf/cluster.proto +++ b/proto/tensorflow/core/protobuf/cluster.proto @@ -21,7 +21,7 @@ option cc_enable_arenas = true; option java_outer_classname = "ClusterProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.distruntime"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // This file contains protos to be used when defining a TensorFlow // cluster. diff --git a/proto/tensorflow/core/protobuf/config.proto b/proto/tensorflow/core/protobuf/config.proto index 3d20d00..29e3e8a 100644 --- a/proto/tensorflow/core/protobuf/config.proto +++ b/proto/tensorflow/core/protobuf/config.proto @@ -13,7 +13,7 @@ option cc_enable_arenas = true; option java_outer_classname = "ConfigProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message GPUOptions { // Fraction of the available GPU memory to allocate for each process. @@ -568,6 +568,9 @@ message ConfigProto { // Session::Extend() may not be supported. bool optimize_for_static_graph = 12; + // This field will eventually be deprecated and replaced by + // mlir_bridge_rollout (b/166038521). + // // Whether to enable the MLIR-based TF->XLA bridge. // // This is a replacement to the existing bridge, and not ready for @@ -581,6 +584,22 @@ message ConfigProto { // to lower the encapsulated graph to a particular device. bool enable_mlir_bridge = 13; + // An enum that describes the state of the MLIR bridge rollout. + enum MlirBridgeRollout { + // If this field is left unspecified, the MLIR bridge may be selectively + // enabled on a per graph basis. + MLIR_BRIDGE_ROLLOUT_UNSPECIFIED = 0; + // Enabling the MLIR bridge enables it for all graphs in this session. + MLIR_BRIDGE_ROLLOUT_ENABLED = 1; + // Disabling the MLIR bridge disables it for all graphs in this session. + MLIR_BRIDGE_ROLLOUT_DISABLED = 2; + } + // This field is underdevelopment, for now use enable_mlir_bridge + // (b/166038521). + // + // Whether to enable the MLIR-based TF->XLA bridge. + MlirBridgeRollout mlir_bridge_rollout = 17; + // Whether to enable the MLIR-based Graph optimizations. // // This will become a part of standard Tensorflow graph optimization diff --git a/proto/tensorflow/core/protobuf/control_flow.proto b/proto/tensorflow/core/protobuf/control_flow.proto index 24f8620..8890af6 100644 --- a/proto/tensorflow/core/protobuf/control_flow.proto +++ b/proto/tensorflow/core/protobuf/control_flow.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "ControlFlowProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Control flow context related protocol buffers. diff --git a/proto/tensorflow/core/protobuf/data/experimental/service_config.proto b/proto/tensorflow/core/protobuf/data/experimental/service_config.proto new file mode 100644 index 0000000..3dcd2cd --- /dev/null +++ b/proto/tensorflow/core/protobuf/data/experimental/service_config.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package tensorflow.data.experimental; + +// Configuration for a tf.data service DispatchServer. +message DispatcherConfig { + // The port for the dispatcher to bind to. A value of 0 indicates that the + // dispatcher may bind to any available port. + int64 port = 1; + // The protocol for the dispatcher to use when connecting to workers. + string protocol = 2; + // A work directory to use for storing dispatcher state, and for recovering + // during restarts. The empty string indicates not to use any work directory. + string work_dir = 3; + // Whether to run in fault tolerant mode, where dispatcher state is saved + // across restarts. Requires that `work_dir` is nonempty. + bool fault_tolerant_mode = 4; + // How often the dispatcher should scan through to delete old and unused jobs. + int64 job_gc_check_interval_ms = 5; + // How long a job needs to be unused before it becomes a candidate for garbage + // collection. + int64 job_gc_timeout_ms = 6; +} + +// Configuration for a tf.data service WorkerServer. +message WorkerConfig { + // The port for the worker to bind to. A value of 0 indicates that the + // worker may bind to any available port. + int64 port = 1; + // The protocol for the worker to use when connecting to the dispatcher. + string protocol = 2; + // The address of the dispatcher to register with. + string dispatcher_address = 3; + // The address of the worker server. The substring "%port%", if specified, + // will be replaced with the worker's bound port. This is useful when the port + // is set to `0`. + string worker_address = 4; + // How often the worker should heartbeat to the master. + int64 heartbeat_interval_ms = 5; + // How long to retry requests to the dispatcher before giving up and reporting + // an error. + int64 dispatcher_timeout_ms = 6; +} diff --git a/proto/tensorflow/core/protobuf/debug.proto b/proto/tensorflow/core/protobuf/debug.proto index 21df4a1..2fabd03 100644 --- a/proto/tensorflow/core/protobuf/debug.proto +++ b/proto/tensorflow/core/protobuf/debug.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "DebugProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Option for watching a node in TensorFlow Debugger (tfdbg). message DebugTensorWatch { diff --git a/proto/tensorflow/core/protobuf/debug_event.proto b/proto/tensorflow/core/protobuf/debug_event.proto index 5541c39..5530004 100644 --- a/proto/tensorflow/core/protobuf/debug_event.proto +++ b/proto/tensorflow/core/protobuf/debug_event.proto @@ -9,7 +9,7 @@ option cc_enable_arenas = true; option java_outer_classname = "DebugEventProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Available modes for extracting debugging information from a Tensor. // TODO(cais): Document the detailed column names and semantics in a separate diff --git a/proto/tensorflow/core/protobuf/device_filters.proto b/proto/tensorflow/core/protobuf/device_filters.proto index 62dd427..8fd8e2e 100644 --- a/proto/tensorflow/core/protobuf/device_filters.proto +++ b/proto/tensorflow/core/protobuf/device_filters.proto @@ -21,7 +21,7 @@ option cc_enable_arenas = true; option java_outer_classname = "DeviceFiltersProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.distruntime"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // This file contains protos to be used when defining a TensorFlow // cluster. diff --git a/proto/tensorflow/core/protobuf/device_properties.proto b/proto/tensorflow/core/protobuf/device_properties.proto index f6587c8..b892bdc 100644 --- a/proto/tensorflow/core/protobuf/device_properties.proto +++ b/proto/tensorflow/core/protobuf/device_properties.proto @@ -19,7 +19,7 @@ package tensorflow; option cc_enable_arenas = true; option java_outer_classname = "DevicePropertiesProtos"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message DeviceProperties { // Device type (CPU, GPU, ...) diff --git a/proto/tensorflow/core/protobuf/error_codes.proto b/proto/tensorflow/core/protobuf/error_codes.proto index a880fdf..4f94d7d 100644 --- a/proto/tensorflow/core/protobuf/error_codes.proto +++ b/proto/tensorflow/core/protobuf/error_codes.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "ErrorCodesProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // The canonical error codes for TensorFlow APIs. // diff --git a/proto/tensorflow/core/protobuf/graph_debug_info.proto b/proto/tensorflow/core/protobuf/graph_debug_info.proto index 3d8d773..7af5262 100644 --- a/proto/tensorflow/core/protobuf/graph_debug_info.proto +++ b/proto/tensorflow/core/protobuf/graph_debug_info.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "GraphDebugInfoProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message GraphDebugInfo { // This represents a file/line location in the source code. diff --git a/proto/tensorflow/core/protobuf/meta_graph.proto b/proto/tensorflow/core/protobuf/meta_graph.proto index c560451..167e329 100644 --- a/proto/tensorflow/core/protobuf/meta_graph.proto +++ b/proto/tensorflow/core/protobuf/meta_graph.proto @@ -15,7 +15,7 @@ option cc_enable_arenas = true; option java_outer_classname = "MetaGraphProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // NOTE: This protocol buffer is evolving, and will go through revisions in the // coming months. diff --git a/proto/tensorflow/core/protobuf/named_tensor.proto b/proto/tensorflow/core/protobuf/named_tensor.proto index 4210f04..8d401a0 100644 --- a/proto/tensorflow/core/protobuf/named_tensor.proto +++ b/proto/tensorflow/core/protobuf/named_tensor.proto @@ -8,7 +8,7 @@ option cc_enable_arenas = true; option java_outer_classname = "NamedTensorProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // A pair of tensor name and tensor values. message NamedTensorProto { diff --git a/proto/tensorflow/core/protobuf/queue_runner.proto b/proto/tensorflow/core/protobuf/queue_runner.proto index 981ae0d..c3225d4 100644 --- a/proto/tensorflow/core/protobuf/queue_runner.proto +++ b/proto/tensorflow/core/protobuf/queue_runner.proto @@ -8,7 +8,7 @@ option cc_enable_arenas = true; option java_outer_classname = "QueueRunnerProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Protocol buffer representing a QueueRunner. message QueueRunnerDef { diff --git a/proto/tensorflow/core/protobuf/remote_tensor_handle.proto b/proto/tensorflow/core/protobuf/remote_tensor_handle.proto index 36e3f81..904d6a3 100644 --- a/proto/tensorflow/core/protobuf/remote_tensor_handle.proto +++ b/proto/tensorflow/core/protobuf/remote_tensor_handle.proto @@ -9,7 +9,7 @@ option cc_enable_arenas = true; option java_outer_classname = "RemoteTensorHandleProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message ResourceDtypeAndShape { DataType dtype = 1; diff --git a/proto/tensorflow/core/protobuf/rewriter_config.proto b/proto/tensorflow/core/protobuf/rewriter_config.proto index 9520db9..1600449 100644 --- a/proto/tensorflow/core/protobuf/rewriter_config.proto +++ b/proto/tensorflow/core/protobuf/rewriter_config.proto @@ -9,7 +9,7 @@ option cc_enable_arenas = true; option java_outer_classname = "RewriterConfigProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message AutoParallelOptions { bool enable = 1; @@ -39,6 +39,13 @@ message RewriterConfig { AGGRESSIVE = 3; } + // Enum for layout conversion between NCHW and NHWC on CPU. Default is OFF. + enum CpuLayout { + NO_CONVERSION_ON_CPU = 0; + NCHW_TO_NHWC = 1; + NHWC_TO_NCHW = 2; + } + // Enum controlling the number of times to run optimizers. The default is to // run them twice. enum NumIterationsType { @@ -47,6 +54,9 @@ message RewriterConfig { TWO = 2; } + // CPU Conversion settings between NHCW and NCHW. + CpuLayout cpu_layout_conversion = 50; + // Optimize tensor layouts (default is ON) // e.g. This will try to use NCHW layout on GPU which is faster. Toggle layout_optimizer = 1; @@ -107,6 +117,10 @@ message RewriterConfig { // < 0 means do not skip optimization. int32 min_graph_nodes = 17; + // Disable optimizations that assume compressed tensors. Note that this flag + // is experimental and may be removed in the future. + bool experimental_disable_compressed_tensor_optimization = 26; + enum MemOptType { // The default setting (SCHEDULING and SWAPPING HEURISTICS only) DEFAULT_MEM_OPT = 0; diff --git a/proto/tensorflow/core/protobuf/saved_model.proto b/proto/tensorflow/core/protobuf/saved_model.proto index 57f018b..47a707c 100644 --- a/proto/tensorflow/core/protobuf/saved_model.proto +++ b/proto/tensorflow/core/protobuf/saved_model.proto @@ -8,7 +8,7 @@ option cc_enable_arenas = true; option java_outer_classname = "SavedModelProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // SavedModel is the high level serialization format for TensorFlow Models. // See [todo: doc links, similar to session_bundle] for more information. diff --git a/proto/tensorflow/core/protobuf/saved_object_graph.proto b/proto/tensorflow/core/protobuf/saved_object_graph.proto index 981908c..a5b4cfb 100644 --- a/proto/tensorflow/core/protobuf/saved_object_graph.proto +++ b/proto/tensorflow/core/protobuf/saved_object_graph.proto @@ -10,7 +10,7 @@ import "tensorflow/core/protobuf/struct.proto"; import "tensorflow/core/protobuf/trackable_object_graph.proto"; option cc_enable_arenas = true; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // A SavedObjectGraph is part of object-based SavedModels in TF 2.0. It // describes the directed graph of Python objects (or equivalent in other @@ -124,6 +124,13 @@ message SavedBareConcreteFunction { repeated string argument_keywords = 2; // The prefix of `argument_keywords` which may be identified by position. int64 allowed_positional_arguments = 3; + // The spec of the function that this ConcreteFunction is traced from. This + // allows the ConcreteFunction to be called with nest structure inputs. This + // field may not be populated. If this field is absent, the concrete function + // can only be called with flat inputs. + // TODO(b/169361281): support calling saved ConcreteFunction with structured + // inputs in C++ SavedModel API. + FunctionSpec function_spec = 4; } message SavedConstant { @@ -140,8 +147,17 @@ message SavedVariable { VariableSynchronization synchronization = 4; VariableAggregation aggregation = 5; string name = 6; + string device = 7; + // List of component variables for a distributed variable. + // + // When this field is non-empty, the SavedVariable will be assumed + // to be a distributed variable defined by the components listed here. + // + // This is only supported by experimental loaders at the moment. + repeated SavedVariable experimental_distributed_variable_components = 8; } + // Represents `FunctionSpec` used in `Function`. This represents a // function that has been wrapped as a TensorFlow `Function`. message FunctionSpec { @@ -152,6 +168,21 @@ message FunctionSpec { // The input signature, if specified. StructuredValue input_signature = 5; + // Whether the function should be compiled by XLA. + // + // The public interface to `tf.function` uses an optional boolean to + // represent three distinct states for this field. Unfortunately, proto3 + // removes the ability to explicitly check for the presence or absence of a + // field, so we instead map to an enum. + // + // See `tf.function` for details. + enum ExperimentalCompile { + DEFAULT = 0; + ON = 1; + OFF = 2; + } + ExperimentalCompile experimental_compile = 6; + reserved 3, 4; } diff --git a/proto/tensorflow/core/protobuf/saver.proto b/proto/tensorflow/core/protobuf/saver.proto index 5ba7944..208468b 100644 --- a/proto/tensorflow/core/protobuf/saver.proto +++ b/proto/tensorflow/core/protobuf/saver.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "SaverProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Protocol buffer representing the configuration of a Saver. message SaverDef { diff --git a/proto/tensorflow/core/protobuf/struct.proto b/proto/tensorflow/core/protobuf/struct.proto index 0158c4b..c99eab5 100644 --- a/proto/tensorflow/core/protobuf/struct.proto +++ b/proto/tensorflow/core/protobuf/struct.proto @@ -6,7 +6,7 @@ import "tensorflow/core/framework/tensor.proto"; import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/types.proto"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // `StructuredValue` represents a dynamically typed value representing various // data structures that are inspired by Python data structures typically used in @@ -136,6 +136,7 @@ message TypeSpecProto { PER_REPLICA_SPEC = 8; // PerReplicaSpec from distribute/values.py VARIABLE_SPEC = 9; // tf.VariableSpec ROW_PARTITION_SPEC = 10; // RowPartitionSpec from ragged/row_partition.py + NDARRAY_SPEC = 11; // TF Numpy NDarray spec } TypeSpecClass type_spec_class = 1; diff --git a/proto/tensorflow/core/protobuf/tensor_bundle.proto b/proto/tensorflow/core/protobuf/tensor_bundle.proto index 04ccc0f..999195c 100644 --- a/proto/tensorflow/core/protobuf/tensor_bundle.proto +++ b/proto/tensorflow/core/protobuf/tensor_bundle.proto @@ -11,7 +11,7 @@ option cc_enable_arenas = true; option java_outer_classname = "TensorBundleProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Protos used in the tensor bundle module (tf/core/util/tensor_bundle/). diff --git a/proto/tensorflow/core/protobuf/tensorflow_server.proto b/proto/tensorflow/core/protobuf/tensorflow_server.proto index 7136f29..5374172 100644 --- a/proto/tensorflow/core/protobuf/tensorflow_server.proto +++ b/proto/tensorflow/core/protobuf/tensorflow_server.proto @@ -25,7 +25,7 @@ option cc_enable_arenas = true; option java_outer_classname = "ServerProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.distruntime"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Defines the configuration of a single TensorFlow server. message ServerDef { diff --git a/proto/tensorflow/core/protobuf/trackable_object_graph.proto b/proto/tensorflow/core/protobuf/trackable_object_graph.proto index 48dbd92..4be996b 100644 --- a/proto/tensorflow/core/protobuf/trackable_object_graph.proto +++ b/proto/tensorflow/core/protobuf/trackable_object_graph.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package tensorflow; option cc_enable_arenas = true; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // A TensorBundle addition which saves extra information about the objects which // own variables, allowing for more robust checkpoint loading into modified diff --git a/proto/tensorflow/core/protobuf/transport_options.proto b/proto/tensorflow/core/protobuf/transport_options.proto index 23f92c3..8d54031 100644 --- a/proto/tensorflow/core/protobuf/transport_options.proto +++ b/proto/tensorflow/core/protobuf/transport_options.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package tensorflow; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // Extra data needed on a non-RDMA RecvBufResponse. message RecvBufRespExtra { diff --git a/proto/tensorflow/core/protobuf/verifier_config.proto b/proto/tensorflow/core/protobuf/verifier_config.proto index 4440aad..21885ff 100644 --- a/proto/tensorflow/core/protobuf/verifier_config.proto +++ b/proto/tensorflow/core/protobuf/verifier_config.proto @@ -6,7 +6,7 @@ option cc_enable_arenas = true; option java_outer_classname = "VerifierConfigProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; // The config for graph verifiers. message VerifierConfig { diff --git a/proto/tensorflow/core/util/event.proto b/proto/tensorflow/core/util/event.proto index f5dfffa..310d794 100644 --- a/proto/tensorflow/core/util/event.proto +++ b/proto/tensorflow/core/util/event.proto @@ -8,6 +8,7 @@ option cc_enable_arenas = true; option java_outer_classname = "EventProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.util"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/util/event_go_proto"; // Protocol buffer representing an event that happened during // the execution of a Brain model. diff --git a/proto/tensorflow_serving/config/model_server_config.proto b/proto/tensorflow_serving/config/model_server_config.proto index 8d3d554..187f535 100644 --- a/proto/tensorflow_serving/config/model_server_config.proto +++ b/proto/tensorflow_serving/config/model_server_config.proto @@ -20,6 +20,10 @@ message ModelConfig { // Name of the model. string name = 1; + // List of aliases which can be used for addressing this model instead of + // using the model name. This is an experimental field. + repeated string alias = 9; + // Base path to the model, excluding the version directory. // E.g> for a model at /foo/bar/my_model/123, where 123 is the version, the // base path is /foo/bar/my_model.