Give unique go package paths in core/framework to avoid circular dependencies.

PiperOrigin-RevId: 293433590
Change-Id: Ia0dd6ed36cadcf2372805f6a83d5cfb51618db8c
This commit is contained in:
Jonathan Hseu 2020-02-05 13:07:47 -08:00 committed by TensorFlower Gardener
parent c6f7b48a3a
commit 4221d1aa4d
60 changed files with 248 additions and 208 deletions

View File

@ -2,13 +2,15 @@
// model training or inference. // model training or inference.
syntax = "proto3"; syntax = "proto3";
package tensorflow;
import "tensorflow/core/example/feature.proto"; import "tensorflow/core/example/feature.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ExampleProtos"; option java_outer_classname = "ExampleProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.example"; option java_package = "org.tensorflow.example";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_protos_go_proto";
package tensorflow;
// An Example is a mostly-normalized data format for storing data for // An Example is a mostly-normalized data format for storing data for
// training and inference. It contains a key-value store (features); where // training and inference. It contains a key-value store (features); where
@ -87,7 +89,7 @@ package tensorflow;
message Example { message Example {
Features features = 1; Features features = 1;
}; }
// A SequenceExample is an Example representing one or more sequences, and // A SequenceExample is an Example representing one or more sequences, and
// some context. The context contains features which apply to the entire // some context. The context contains features which apply to the entire
@ -298,4 +300,4 @@ message Example {
message SequenceExample { message SequenceExample {
Features context = 1; Features context = 1;
FeatureLists feature_lists = 2; FeatureLists feature_lists = 2;
}; }

View File

@ -2,38 +2,39 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow;
import "tensorflow/core/framework/tensor.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ExampleParserConfigurationProtos"; option java_outer_classname = "ExampleParserConfigurationProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.example"; option java_package = "org.tensorflow.example";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_parser_configuration_go_proto";
package tensorflow;
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/tensor.proto";
import "tensorflow/core/framework/types.proto";
message VarLenFeatureProto { message VarLenFeatureProto {
tensorflow.DataType dtype = 1; tensorflow.DataType dtype = 1;
string values_output_tensor_name = 2; string values_output_tensor_name = 2;
string indices_output_tensor_name = 3; string indices_output_tensor_name = 3;
string shapes_output_tensor_name = 4; string shapes_output_tensor_name = 4;
}; }
message FixedLenFeatureProto { message FixedLenFeatureProto {
tensorflow.DataType dtype = 1; tensorflow.DataType dtype = 1;
tensorflow.TensorShapeProto shape = 2; tensorflow.TensorShapeProto shape = 2;
tensorflow.TensorProto default_value = 3; tensorflow.TensorProto default_value = 3;
string values_output_tensor_name = 4; string values_output_tensor_name = 4;
}; }
message FeatureConfiguration { message FeatureConfiguration {
oneof config { oneof config {
FixedLenFeatureProto fixed_len_feature = 1; FixedLenFeatureProto fixed_len_feature = 1;
VarLenFeatureProto var_len_feature = 2; VarLenFeatureProto var_len_feature = 2;
} }
}; }
message ExampleParserConfiguration { message ExampleParserConfiguration {
map<string, FeatureConfiguration> feature_map = 1; map<string, FeatureConfiguration> feature_map = 1;
}; }

View File

@ -54,12 +54,14 @@
// //
syntax = "proto3"; syntax = "proto3";
package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "FeatureProtos"; option java_outer_classname = "FeatureProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.example"; option java_package = "org.tensorflow.example";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_protos_go_proto";
package tensorflow;
// Containers to hold repeated fundamental values. // Containers to hold repeated fundamental values.
message BytesList { message BytesList {
@ -80,12 +82,12 @@ message Feature {
FloatList float_list = 2; FloatList float_list = 2;
Int64List int64_list = 3; Int64List int64_list = 3;
} }
}; }
message Features { message Features {
// Map from feature name to feature. // Map from feature name to feature.
map<string, Feature> feature = 1; map<string, Feature> feature = 1;
}; }
// Containers for sequential data. // Containers for sequential data.
// //
@ -97,9 +99,9 @@ message Features {
// //
message FeatureList { message FeatureList {
repeated Feature feature = 1; repeated Feature feature = 1;
}; }
message FeatureLists { message FeatureLists {
// Map from feature name to feature list. // Map from feature name to feature list.
map<string, FeatureList> feature_list = 1; map<string, FeatureList> feature_list = 1;
}; }

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "AllocationDescriptionProtos"; option java_outer_classname = "AllocationDescriptionProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/allocation_description_go_proto";
message AllocationDescription { message AllocationDescription {
// Total number of bytes requested // Total number of bytes requested
@ -25,4 +26,4 @@ message AllocationDescription {
// Address of the allocation. // Address of the allocation.
uint64 ptr = 6; uint64 ptr = 6;
}; }

View File

@ -1,14 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "AttrValueProtos"; option java_outer_classname = "AttrValueProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/attr_value_go_proto";
import "tensorflow/core/framework/tensor.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
// Protocol buffer representing the value for an attr used to configure an Op. // Protocol buffer representing the value for an attr used to configure an Op.
// Comment indicates the corresponding attr type. Only the field matching the // Comment indicates the corresponding attr type. Only the field matching the

View File

@ -1,13 +1,15 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "CostGraphProtos"; option java_outer_classname = "CostGraphProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/cost_graph_go_proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
message CostGraphDef { message CostGraphDef {
message Node { message Node {

View File

@ -1,21 +1,22 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "DeviceAttributesProtos"; option java_outer_classname = "DeviceAttributesProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/device_attributes_go_proto";
message InterconnectLink { message InterconnectLink {
int32 device_id = 1; int32 device_id = 1;
string type = 2; string type = 2;
int32 strength = 3; int32 strength = 3;
}; }
message LocalLinks { message LocalLinks {
repeated InterconnectLink link = 1; repeated InterconnectLink link = 1;
}; }
message DeviceLocality { message DeviceLocality {
// Optional bus locality of device. Default value of 0 means // Optional bus locality of device. Default value of 0 means
@ -27,7 +28,7 @@ message DeviceLocality {
// Optional local interconnect links to other devices. // Optional local interconnect links to other devices.
LocalLinks links = 3; LocalLinks links = 3;
}; }
message DeviceAttributes { message DeviceAttributes {
// Fully specified name of the device within a cluster. // Fully specified name of the device within a cluster.

View File

@ -1,14 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/attr_value.proto";
import "tensorflow/core/framework/node_def.proto";
import "tensorflow/core/framework/op_def.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "FunctionProtos"; option java_outer_classname = "FunctionProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/function_go_proto";
import "tensorflow/core/framework/attr_value.proto";
import "tensorflow/core/framework/node_def.proto";
import "tensorflow/core/framework/op_def.proto";
// A library is a set of named functions. // A library is a set of named functions.
message FunctionDefLibrary { message FunctionDefLibrary {

View File

@ -1,14 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/function.proto";
import "tensorflow/core/framework/node_def.proto";
import "tensorflow/core/framework/versions.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "GraphProtos"; option java_outer_classname = "GraphProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/graph_go_proto";
import "tensorflow/core/framework/node_def.proto";
import "tensorflow/core/framework/function.proto";
import "tensorflow/core/framework/versions.proto";
// Represents the graph of operations // Represents the graph of operations
message GraphDef { message GraphDef {
@ -53,4 +55,4 @@ message GraphDef {
// consumer does not start until all return values of the callee // consumer does not start until all return values of the callee
// function are ready. // function are ready.
FunctionDefLibrary library = 2; FunctionDefLibrary library = 2;
}; }

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "GraphTransferInfoProto"; option java_outer_classname = "GraphTransferInfoProto";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/graph_transfer_info_go_proto";
import "tensorflow/core/framework/types.proto";
message GraphTransferNodeInput { message GraphTransferNodeInput {
int32 node_id = 1; int32 node_id = 1;
@ -20,22 +22,22 @@ message GraphTransferNodeInfo {
int32 padding_id = 5; int32 padding_id = 5;
int32 input_count = 6; int32 input_count = 6;
int32 output_count = 7; int32 output_count = 7;
}; }
message GraphTransferConstNodeInfo { message GraphTransferConstNodeInfo {
string name = 1; string name = 1;
int32 node_id = 2; int32 node_id = 2;
repeated int64 shape = 3; repeated int64 shape = 3;
bytes data = 4; bytes data = 4;
DataType dtype = 5; DataType dtype = 5;
}; }
message GraphTransferNodeInputInfo { message GraphTransferNodeInputInfo {
int32 node_id = 1; int32 node_id = 1;
repeated GraphTransferNodeInput node_input = 2; repeated GraphTransferNodeInput node_input = 2;
}; }
message GraphTransferNodeOutputInfo { message GraphTransferNodeOutputInfo {
int32 node_id = 1; int32 node_id = 1;
repeated int32 max_byte_size = 2; repeated int32 max_byte_size = 2;
}; }
message GraphTransferGraphInputNodeInfo { message GraphTransferGraphInputNodeInfo {
string name = 1; string name = 1;
repeated int64 shape = 2; repeated int64 shape = 2;
@ -66,4 +68,4 @@ message GraphTransferInfo {
repeated GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; repeated GraphTransferGraphOutputNodeInfo graph_output_node_info = 6;
// Destination of graph transfer // Destination of graph transfer
Destination destination = 7; Destination destination = 7;
}; }

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/attr_value.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "KernelDefProtos"; option java_outer_classname = "KernelDefProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/kernel_def_go_proto";
import "tensorflow/core/framework/attr_value.proto";
message KernelDef { message KernelDef {
// Must match the name of an Op. // Must match the name of an Op.
@ -43,4 +45,4 @@ message KernelDef {
// A collection of KernelDefs // A collection of KernelDefs
message KernelList { message KernelList {
repeated KernelDef kernel = 1; repeated KernelDef kernel = 1;
}; }

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor_description.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "LogMemoryProtos"; option java_outer_classname = "LogMemoryProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/log_memory_go_proto";
import "tensorflow/core/framework/tensor_description.proto";
message MemoryLogStep { message MemoryLogStep {
// Process-unique step id. // Process-unique step id.
@ -14,7 +16,7 @@ message MemoryLogStep {
// Handle describing the feeds and fetches of the step. // Handle describing the feeds and fetches of the step.
string handle = 2; string handle = 2;
}; }
message MemoryLogTensorAllocation { message MemoryLogTensorAllocation {
// Process-unique step id. // Process-unique step id.
@ -26,7 +28,7 @@ message MemoryLogTensorAllocation {
// Allocated tensor details. // Allocated tensor details.
TensorDescription tensor = 3; TensorDescription tensor = 3;
}; }
message MemoryLogTensorDeallocation { message MemoryLogTensorDeallocation {
// Id of the tensor buffer being deallocated, used to match to a // Id of the tensor buffer being deallocated, used to match to a
@ -35,7 +37,7 @@ message MemoryLogTensorDeallocation {
// Name of the allocator used. // Name of the allocator used.
string allocator_name = 2; string allocator_name = 2;
}; }
message MemoryLogTensorOutput { message MemoryLogTensorOutput {
// Process-unique step id. // Process-unique step id.
@ -71,7 +73,7 @@ message MemoryLogRawAllocation {
// Name of the allocator used. // Name of the allocator used.
string allocator_name = 6; string allocator_name = 6;
}; }
message MemoryLogRawDeallocation { message MemoryLogRawDeallocation {
// Process-unique step id. // Process-unique step id.
@ -90,4 +92,4 @@ message MemoryLogRawDeallocation {
// True if the deallocation is queued and will be performed later, // True if the deallocation is queued and will be performed later,
// e.g. for GPU lazy freeing of buffers. // e.g. for GPU lazy freeing of buffers.
bool deferred = 5; bool deferred = 5;
}; }

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/attr_value.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "NodeProto"; option java_outer_classname = "NodeProto";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/node_def_go_proto";
import "tensorflow/core/framework/attr_value.proto";
message NodeDef { message NodeDef {
// The name given to this operator. Used for naming inputs, // The name given to this operator. Used for naming inputs,
@ -79,8 +81,8 @@ message NodeDef {
// `original_node_names` can be used to map errors originating at the // `original_node_names` can be used to map errors originating at the
// current ndoe to some top level source code. // current ndoe to some top level source code.
repeated string original_func_names = 2; repeated string original_func_names = 2;
}; }
// This stores debug information associated with the node. // This stores debug information associated with the node.
ExperimentalDebugInfo experimental_debug_info = 6; ExperimentalDebugInfo experimental_debug_info = 6;
}; }

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ReaderBaseProtos"; option java_outer_classname = "ReaderBaseProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/reader_base_go_proto";
// For serializing and restoring the state of ReaderBase, see // For serializing and restoring the state of ReaderBase, see
// reader_base.h for details. // reader_base.h for details.
@ -14,4 +15,4 @@ message ReaderBaseState {
int64 work_finished = 2; int64 work_finished = 2;
int64 num_records_produced = 3; int64 num_records_produced = 3;
bytes current_work = 4; bytes current_work = 4;
}; }

View File

@ -1,20 +1,21 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/graph.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "RemoteFusedGraphExecuteInfoProto"; option java_outer_classname = "RemoteFusedGraphExecuteInfoProto";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/remote_fused_graph_execute_info_go_proto";
import "tensorflow/core/framework/graph.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
// Protocol buffer representing a handle to a tensorflow resource. Handles are // Protocol buffer representing a handle to a tensorflow resource. Handles are
// not valid across executions, but can be serialized back and forth from within // not valid across executions, but can be serialized back and forth from within
// a single run. // a single run.
message RemoteFusedGraphExecuteInfo { message RemoteFusedGraphExecuteInfo {
message TensorShapeTypeProto { message TensorShapeTypeProto {
DataType dtype = 1; DataType dtype = 1;
TensorShapeProto shape = 2; TensorShapeProto shape = 2;
@ -44,4 +45,4 @@ message RemoteFusedGraphExecuteInfo {
// TODO(satok): Remote output tensor shape once shape information is stored // TODO(satok): Remote output tensor shape once shape information is stored
// in NodeDef // in NodeDef
repeated TensorShapeTypeProto default_graph_output_tensor_shape = 7; repeated TensorShapeTypeProto default_graph_output_tensor_shape = 7;
}; }

View File

@ -1,14 +1,15 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ResourceHandle"; option java_outer_classname = "ResourceHandle";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
// Protocol buffer representing a handle to a tensorflow resource. Handles are // Protocol buffer representing a handle to a tensorflow resource. Handles are
// not valid across executions, but can be serialized back and forth from within // not valid across executions, but can be serialized back and forth from within
@ -39,4 +40,4 @@ message ResourceHandleProto {
// Data types and shapes for the underlying resource. // Data types and shapes for the underlying resource.
repeated DtypeAndShape dtypes_and_shapes = 6; repeated DtypeAndShape dtypes_and_shapes = 6;
}; }

View File

@ -1,13 +1,15 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/allocation_description.proto";
import "tensorflow/core/framework/tensor_description.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "StepStatsProtos"; option java_outer_classname = "StepStatsProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/step_stats_go_proto";
import "tensorflow/core/framework/allocation_description.proto";
import "tensorflow/core/framework/tensor_description.proto";
// An allocation/de-allocation operation performed by the allocator. // An allocation/de-allocation operation performed by the allocator.
message AllocationRecord { message AllocationRecord {
@ -36,7 +38,7 @@ message AllocatorMemoryUsed {
message NodeOutput { message NodeOutput {
int32 slot = 1; int32 slot = 1;
TensorDescription tensor_description = 3; TensorDescription tensor_description = 3;
}; }
// For memory tracking. // For memory tracking.
message MemoryStats { message MemoryStats {
@ -72,7 +74,7 @@ message NodeExecStats {
int64 op_end_rel_nanos = 15; int64 op_end_rel_nanos = 15;
int64 all_end_rel_nanos = 16; int64 all_end_rel_nanos = 16;
int64 scheduled_nanos = 17; int64 scheduled_nanos = 17;
}; }
message DeviceStepStats { message DeviceStepStats {
string device = 1; string device = 1;
@ -83,4 +85,4 @@ message DeviceStepStats {
message StepStats { message StepStats {
repeated DeviceStepStats dev_stats = 1; repeated DeviceStepStats dev_stats = 1;
}; }

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "SummaryProtos"; option java_outer_classname = "SummaryProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/summary_go_proto";
import "tensorflow/core/framework/tensor.proto";
// Metadata associated with a series of Summary data // Metadata associated with a series of Summary data
message SummaryDescription { message SummaryDescription {
@ -31,7 +33,7 @@ message HistogramProto {
// i != 0: bucket_limit(i-1) .. bucket_limit(i) // i != 0: bucket_limit(i-1) .. bucket_limit(i)
repeated double bucket_limit = 6 [packed = true]; repeated double bucket_limit = 6 [packed = true];
repeated double bucket = 7 [packed = true]; repeated double bucket = 7 [packed = true];
}; }
// A SummaryMetadata encapsulates information on which plugins are able to make // A SummaryMetadata encapsulates information on which plugins are able to make
// use of a certain summary value. // use of a certain summary value.
@ -59,7 +61,7 @@ message SummaryMetadata {
// imposes constraints on the dtype and shape of the corresponding tensor // imposes constraints on the dtype and shape of the corresponding tensor
// values. See `DataClass` docs for details. // values. See `DataClass` docs for details.
DataClass data_class = 4; DataClass data_class = 4;
}; }
enum DataClass { enum DataClass {
// Unknown data class, used (implicitly) for legacy data. Will not be // Unknown data class, used (implicitly) for legacy data. Will not be

View File

@ -1,14 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/resource_handle.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "TensorProtos"; option java_outer_classname = "TensorProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto";
import "tensorflow/core/framework/resource_handle.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
// Protocol buffer representing a tensor. // Protocol buffer representing a tensor.
message TensorProto { message TensorProto {
@ -81,7 +83,7 @@ message TensorProto {
// DT_UINT64 // DT_UINT64
repeated uint64 uint64_val = 17 [packed = true]; repeated uint64 uint64_val = 17 [packed = true];
}; }
// Protocol buffer representing the serialization format of DT_VARIANT tensors. // Protocol buffer representing the serialization format of DT_VARIANT tensors.
message VariantTensorDataProto { message VariantTensorDataProto {

View File

@ -1,14 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/allocation_description.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "TensorDescriptionProtos"; option java_outer_classname = "TensorDescriptionProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_description_go_proto";
import "tensorflow/core/framework/types.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/allocation_description.proto";
message TensorDescription { message TensorDescription {
// Data type of tensor elements // Data type of tensor elements
@ -19,4 +21,4 @@ message TensorDescription {
// Information about the size and allocator used for the data // Information about the size and allocator used for the data
AllocationDescription allocation_description = 4; AllocationDescription allocation_description = 4;
}; }

View File

@ -1,13 +1,14 @@
// Protocol buffer representing slices of a tensor // Protocol buffer representing slices of a tensor
syntax = "proto3"; syntax = "proto3";
package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "TensorSliceProtos"; option java_outer_classname = "TensorSliceProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_slice_go_proto";
package tensorflow;
// Can only be interpreted if you know the corresponding TensorShape. // Can only be interpreted if you know the corresponding TensorShape.
message TensorSliceProto { message TensorSliceProto {
@ -27,7 +28,7 @@ message TensorSliceProto {
oneof has_length { oneof has_length {
int64 length = 2; int64 length = 2;
} }
}; }
// Extent of the slice in all tensor dimensions. // Extent of the slice in all tensor dimensions.
// //
@ -35,4 +36,4 @@ message TensorSliceProto {
// slice belongs to. The order of sizes is the same as the order of // slice belongs to. The order of sizes is the same as the order of
// dimensions in the TensorShape. // dimensions in the TensorShape.
repeated Extent extent = 1; repeated Extent extent = 1;
}; }

View File

@ -6,8 +6,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "VariableProtos"; option java_outer_classname = "VariableProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/variable_go_proto";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
// Indicates when a distributed variable will be synced. // Indicates when a distributed variable will be synced.
enum VariableSynchronization { enum VariableSynchronization {

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "VersionsProtos"; option java_outer_classname = "VersionsProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/versions_go_proto";
// Version information for a piece of serialized data // Version information for a piece of serialized data
// //
@ -29,4 +30,4 @@ message VersionDef {
// Specific consumer versions which are disallowed (e.g. due to bugs). // Specific consumer versions which are disallowed (e.g. due to bugs).
repeated int32 bad_consumers = 3; repeated int32 bad_consumers = 3;
}; }

View File

@ -10,7 +10,7 @@ package tensorflow;
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
message CudnnVersion { message CudnnVersion {
int32 major = 1; int32 major = 1;

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Some of the data from AllocatorStats // Some of the data from AllocatorStats
message MemAllocatorStats { message MemAllocatorStats {

View File

@ -16,11 +16,12 @@ limitations under the License.
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ClusterProtos"; option java_outer_classname = "ClusterProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime"; option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// This file contains protos to be used when defining a TensorFlow // This file contains protos to be used when defining a TensorFlow
// cluster. // cluster.

View File

@ -2,12 +2,6 @@ syntax = "proto3";
package tensorflow; package tensorflow;
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/protobuf";
import "tensorflow/core/framework/cost_graph.proto"; import "tensorflow/core/framework/cost_graph.proto";
import "tensorflow/core/framework/graph.proto"; import "tensorflow/core/framework/graph.proto";
import "tensorflow/core/framework/step_stats.proto"; import "tensorflow/core/framework/step_stats.proto";
@ -15,6 +9,12 @@ import "tensorflow/core/protobuf/cluster.proto";
import "tensorflow/core/protobuf/debug.proto"; import "tensorflow/core/protobuf/debug.proto";
import "tensorflow/core/protobuf/rewriter_config.proto"; import "tensorflow/core/protobuf/rewriter_config.proto";
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";
message GPUOptions { message GPUOptions {
// Fraction of the available GPU memory to allocate for each process. // Fraction of the available GPU memory to allocate for each process.
// 1 means to allocate all of the GPU memory, 0.5 means the process // 1 means to allocate all of the GPU memory, 0.5 means the process
@ -578,7 +578,7 @@ message ConfigProto {
// The XLA fusion autotuner can improve performance by executing a heuristic // The XLA fusion autotuner can improve performance by executing a heuristic
// search on the compiler parameters. // search on the compiler parameters.
int64 xla_fusion_autotuner_thresh = 15; int64 xla_fusion_autotuner_thresh = 15;
}; }
Experimental experimental = 16; Experimental experimental = 16;
@ -636,7 +636,7 @@ message RunOptions {
// and tail) latency. // and tail) latency.
// Consider using this option for CPU-bound workloads like inference. // Consider using this option for CPU-bound workloads like inference.
bool use_run_handler_pool = 2; bool use_run_handler_pool = 2;
}; }
Experimental experimental = 8; Experimental experimental = 8;

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "ControlFlowProtos"; option java_outer_classname = "ControlFlowProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Control flow context related protocol buffers. // Control flow context related protocol buffers.

View File

@ -6,7 +6,7 @@ package tensorflow;
import "tensorflow/stream_executor/dnn.proto"; import "tensorflow/stream_executor/dnn.proto";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// A convolution. Currently it's only used for logging. In the future, we may // A convolution. Currently it's only used for logging. In the future, we may
// want to use it in the API as well. // want to use it in the API as well.

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "CriticalSectionProtos"; option java_outer_classname = "CriticalSectionProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Protocol buffer representing a CriticalSection. // Protocol buffer representing a CriticalSection.
message CriticalSectionDef { message CriticalSectionDef {

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "DebugProtos"; option java_outer_classname = "DebugProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Option for watching a node in TensorFlow Debugger (tfdbg). // Option for watching a node in TensorFlow Debugger (tfdbg).
message DebugTensorWatch { message DebugTensorWatch {

View File

@ -9,8 +9,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "DebugEventProtos"; option java_outer_classname = "DebugEventProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.util"; 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";
// Available modes for extracting debugging information from a Tensor. // Available modes for extracting debugging information from a Tensor.
// TODO(cais): Document the detailed column names and semantics in a separate // TODO(cais): Document the detailed column names and semantics in a separate

View File

@ -21,8 +21,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "DeviceFiltersProtos"; option java_outer_classname = "DeviceFiltersProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime"; 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";
// This file contains protos to be used when defining a TensorFlow // This file contains protos to be used when defining a TensorFlow
// cluster. // cluster.

View File

@ -16,9 +16,10 @@ limitations under the License.
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "DevicePropertiesProtos"; option java_outer_classname = "DevicePropertiesProtos";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
message DeviceProperties { message DeviceProperties {
// Device type (CPU, GPU, ...) // Device type (CPU, GPU, ...)

View File

@ -11,7 +11,7 @@ import "tensorflow/core/framework/versions.proto";
import "tensorflow/core/protobuf/remote_tensor_handle.proto"; import "tensorflow/core/protobuf/remote_tensor_handle.proto";
import "tensorflow/core/protobuf/tensorflow_server.proto"; import "tensorflow/core/protobuf/tensorflow_server.proto";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// A proto representation of an eager operation. // A proto representation of an eager operation.
message Operation { message Operation {

View File

@ -6,8 +6,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "ErrorCodesProtos"; option java_outer_classname = "ErrorCodesProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
// The canonical error codes for TensorFlow APIs. // The canonical error codes for TensorFlow APIs.
// //

View File

@ -6,8 +6,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "GraphDebugInfoProtos"; option java_outer_classname = "GraphDebugInfoProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
message GraphDebugInfo { message GraphDebugInfo {
// This represents a file/line location in the source code. // This represents a file/line location in the source code.

View File

@ -17,12 +17,6 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true;
option java_outer_classname = "DistributedRuntimeProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";
import "tensorflow/core/framework/device_attributes.proto"; import "tensorflow/core/framework/device_attributes.proto";
import "tensorflow/core/framework/graph.proto"; import "tensorflow/core/framework/graph.proto";
import "tensorflow/core/framework/tensor.proto"; import "tensorflow/core/framework/tensor.proto";
@ -30,6 +24,12 @@ import "tensorflow/core/protobuf/config.proto";
import "tensorflow/core/protobuf/error_codes.proto"; import "tensorflow/core/protobuf/error_codes.proto";
import "tensorflow/core/protobuf/named_tensor.proto"; import "tensorflow/core/protobuf/named_tensor.proto";
option cc_enable_arenas = true;
option java_outer_classname = "DistributedRuntimeProtos";
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";
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
// CreateSession method request/response protos. // CreateSession method request/response protos.

View File

@ -16,11 +16,13 @@ limitations under the License.
syntax = "proto3"; syntax = "proto3";
package tensorflow.grpc; package tensorflow.grpc;
import "tensorflow/core/protobuf/master.proto";
option java_outer_classname = "MasterServiceProtos"; option java_outer_classname = "MasterServiceProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime"; option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
import "tensorflow/core/protobuf/master.proto";
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //

View File

@ -2,12 +2,6 @@ syntax = "proto3";
package tensorflow; package tensorflow;
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/protobuf";
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
import "tensorflow/core/framework/graph.proto"; import "tensorflow/core/framework/graph.proto";
import "tensorflow/core/framework/op_def.proto"; import "tensorflow/core/framework/op_def.proto";
@ -17,6 +11,12 @@ import "tensorflow/core/protobuf/saved_object_graph.proto";
import "tensorflow/core/protobuf/saver.proto"; import "tensorflow/core/protobuf/saver.proto";
import "tensorflow/core/protobuf/struct.proto"; import "tensorflow/core/protobuf/struct.proto";
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";
// NOTE: This protocol buffer is evolving, and will go through revisions in the // NOTE: This protocol buffer is evolving, and will go through revisions in the
// coming months. // coming months.
// //

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/tensor.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "NamedTensorProtos"; option java_outer_classname = "NamedTensorProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
import "tensorflow/core/framework/tensor.proto";
// A pair of tensor name and tensor values. // A pair of tensor name and tensor values.
message NamedTensorProto { message NamedTensorProto {

View File

@ -2,13 +2,13 @@ syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/protobuf/error_codes.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "QueueRunnerProtos"; option java_outer_classname = "QueueRunnerProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
import "tensorflow/core/protobuf/error_codes.proto";
// Protocol buffer representing a QueueRunner. // Protocol buffer representing a QueueRunner.
message QueueRunnerDef { message QueueRunnerDef {

View File

@ -9,8 +9,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "RemoteTensorHandleProtos"; option java_outer_classname = "RemoteTensorHandleProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
message ResourceDtypeAndShape { message ResourceDtypeAndShape {
DataType dtype = 1; DataType dtype = 1;

View File

@ -5,8 +5,7 @@ package tensorflow;
import "tensorflow/core/protobuf/master.proto"; import "tensorflow/core/protobuf/master.proto";
option cc_enable_arenas = true; 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";
// Records the creation of a new replay session. We record the device listing // Records the creation of a new replay session. We record the device listing
// here to capture the state of the cluster. // here to capture the state of the cluster.

View File

@ -2,15 +2,14 @@ syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/framework/attr_value.proto";
import "tensorflow/core/protobuf/verifier_config.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "RewriterConfigProtos"; option java_outer_classname = "RewriterConfigProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
import "tensorflow/core/framework/attr_value.proto";
import "tensorflow/core/protobuf/verifier_config.proto";
message AutoParallelOptions { message AutoParallelOptions {
bool enable = 1; bool enable = 1;

View File

@ -1,12 +1,14 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
import "tensorflow/core/protobuf/meta_graph.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "SavedModelProtos"; option java_outer_classname = "SavedModelProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
import "tensorflow/core/protobuf/meta_graph.proto";
// SavedModel is the high level serialization format for TensorFlow Models. // SavedModel is the high level serialization format for TensorFlow Models.
// See [todo: doc links, similar to session_bundle] for more information. // See [todo: doc links, similar to session_bundle] for more information.

View File

@ -10,8 +10,7 @@ import "tensorflow/core/protobuf/struct.proto";
import "tensorflow/core/protobuf/trackable_object_graph.proto"; import "tensorflow/core/protobuf/trackable_object_graph.proto";
option cc_enable_arenas = true; 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";
// A SavedObjectGraph is part of object-based SavedModels in TF 2.0. It // A SavedObjectGraph is part of object-based SavedModels in TF 2.0. It
// describes the directed graph of Python objects (or equivalent in other // describes the directed graph of Python objects (or equivalent in other

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "SaverProtos"; option java_outer_classname = "SaverProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.util"; option java_package = "org.tensorflow.util";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Protocol buffer representing the configuration of a Saver. // Protocol buffer representing the configuration of a Saver.
message SaverDef { message SaverDef {

View File

@ -2,11 +2,11 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";
import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto"; import "tensorflow/core/framework/types.proto";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// `StructuredValue` represents a dynamically typed value representing various // `StructuredValue` represents a dynamically typed value representing various
// data structures that are inspired by Python data structures typically used in // data structures that are inspired by Python data structures typically used in
// TensorFlow functions as inputs and outputs. // TensorFlow functions as inputs and outputs.

View File

@ -1,16 +1,18 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
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/protobuf";
import "tensorflow/core/framework/tensor_shape.proto"; import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/tensor_slice.proto"; import "tensorflow/core/framework/tensor_slice.proto";
import "tensorflow/core/framework/types.proto"; import "tensorflow/core/framework/types.proto";
import "tensorflow/core/framework/versions.proto"; import "tensorflow/core/framework/versions.proto";
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";
// Protos used in the tensor bundle module (tf/core/util/tensor_bundle/). // Protos used in the tensor bundle module (tf/core/util/tensor_bundle/).
// Special header that is associated with a bundle. // Special header that is associated with a bundle.

View File

@ -25,8 +25,8 @@ option cc_enable_arenas = true;
option java_outer_classname = "ServerProtos"; option java_outer_classname = "ServerProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime"; 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";
// Defines the configuration of a single TensorFlow server. // Defines the configuration of a single TensorFlow server.
message ServerDef { message ServerDef {
// The cluster of which this server is a member. // The cluster of which this server is a member.

View File

@ -6,8 +6,7 @@ option cc_enable_arenas = true;
option java_outer_classname = "TraceEventsProtos"; option java_outer_classname = "TraceEventsProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; 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";
// A 'Trace' contains metadata for the individual traces of a system. // A 'Trace' contains metadata for the individual traces of a system.
message Trace { message Trace {

View File

@ -3,8 +3,7 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; 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";
// A TensorBundle addition which saves extra information about the objects which // A TensorBundle addition which saves extra information about the objects which
// own variables, allowing for more robust checkpoint loading into modified // own variables, allowing for more robust checkpoint loading into modified

View File

@ -2,7 +2,7 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// Extra data needed on a non-RDMA RecvBufResponse. // Extra data needed on a non-RDMA RecvBufResponse.
message RecvBufRespExtra { message RecvBufRespExtra {

View File

@ -1,11 +1,12 @@
syntax = "proto3"; syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option java_outer_classname = "VerifierConfigProtos"; option java_outer_classname = "VerifierConfigProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.framework"; option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
// The config for graph verifiers. // The config for graph verifiers.
message VerifierConfig { message VerifierConfig {

View File

@ -17,12 +17,6 @@ syntax = "proto3";
package tensorflow; package tensorflow;
option cc_enable_arenas = true;
option java_outer_classname = "WorkerProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
import "tensorflow/core/framework/cost_graph.proto"; import "tensorflow/core/framework/cost_graph.proto";
import "tensorflow/core/framework/device_attributes.proto"; import "tensorflow/core/framework/device_attributes.proto";
@ -37,6 +31,12 @@ import "tensorflow/core/protobuf/error_codes.proto";
import "tensorflow/core/protobuf/named_tensor.proto"; import "tensorflow/core/protobuf/named_tensor.proto";
import "tensorflow/core/protobuf/tensorflow_server.proto"; import "tensorflow/core/protobuf/tensorflow_server.proto";
option cc_enable_arenas = true;
option java_outer_classname = "WorkerProtos";
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";
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
// GetStatus method request/response messages // GetStatus method request/response messages

View File

@ -16,11 +16,13 @@ limitations under the License.
syntax = "proto3"; syntax = "proto3";
package tensorflow.grpc; package tensorflow.grpc;
import "tensorflow/core/protobuf/worker.proto";
option java_outer_classname = "WorkerServiceProtos"; option java_outer_classname = "WorkerServiceProtos";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime"; option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto";
import "tensorflow/core/protobuf/worker.proto";
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
@ -74,8 +76,7 @@ service WorkerService {
rpc Tracing(TracingRequest) returns (TracingResponse); rpc Tracing(TracingRequest) returns (TracingResponse);
// See worker.proto for details. // See worker.proto for details.
rpc RecvBuf(RecvBufRequest) returns (RecvBufResponse) { rpc RecvBuf(RecvBufRequest) returns (RecvBufResponse) {}
}
// See worker.proto for details. // See worker.proto for details.
rpc GetStepSequence(GetStepSequenceRequest) returns (GetStepSequenceResponse); rpc GetStepSequence(GetStepSequenceRequest) returns (GetStepSequenceResponse);

View File

@ -21,8 +21,7 @@ import (
"unsafe" "unsafe"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
corepb "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"
tfpb "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"
) )
// #include <stdlib.h> // #include <stdlib.h>
@ -73,7 +72,7 @@ func LoadSavedModel(exportDir string, tags []string, options *SessionOptions) (*
C.free(unsafe.Pointer(cExportDir)) C.free(unsafe.Pointer(cExportDir))
metaGraphDefBytes := C.GoBytes(metaGraphDefBuf.data, C.int(metaGraphDefBuf.length)) metaGraphDefBytes := C.GoBytes(metaGraphDefBuf.data, C.int(metaGraphDefBuf.length))
metaGraphDef := new(tfpb.MetaGraphDef) metaGraphDef := new(corepb.MetaGraphDef)
if err := proto.Unmarshal(metaGraphDefBytes, metaGraphDef); err != nil { if err := proto.Unmarshal(metaGraphDefBytes, metaGraphDef); err != nil {
return nil, err return nil, err
} }
@ -88,7 +87,7 @@ func LoadSavedModel(exportDir string, tags []string, options *SessionOptions) (*
return &SavedModel{Session: s, Graph: graph, Signatures: signatures}, nil return &SavedModel{Session: s, Graph: graph, Signatures: signatures}, nil
} }
func generateSignatures(pb map[string]*tfpb.SignatureDef) map[string]Signature { func generateSignatures(pb map[string]*corepb.SignatureDef) map[string]Signature {
signatures := make(map[string]Signature) signatures := make(map[string]Signature)
for name, signature := range pb { for name, signature := range pb {
signatures[name] = signatureDefFromProto(signature) signatures[name] = signatureDefFromProto(signature)

View File

@ -16,7 +16,7 @@ limitations under the License.
package tensorflow package tensorflow
import tfpb "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf" import corepb "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"
// #include "tensorflow/c/c_api.h" // #include "tensorflow/c/c_api.h"
import "C" import "C"
@ -90,7 +90,7 @@ type TensorInfo struct {
Shape Shape Shape Shape
} }
func signatureDefFromProto(pb *tfpb.SignatureDef) Signature { func signatureDefFromProto(pb *corepb.SignatureDef) Signature {
inputs := make(map[string]TensorInfo) inputs := make(map[string]TensorInfo)
for name, input := range pb.GetInputs() { for name, input := range pb.GetInputs() {
inputs[name] = tensorInfoFromProto(input) inputs[name] = tensorInfoFromProto(input)
@ -106,7 +106,7 @@ func signatureDefFromProto(pb *tfpb.SignatureDef) Signature {
} }
} }
func tensorInfoFromProto(pb *tfpb.TensorInfo) TensorInfo { func tensorInfoFromProto(pb *corepb.TensorInfo) TensorInfo {
var dims []int64 var dims []int64
for _, d := range pb.GetTensorShape().GetDim() { for _, d := range pb.GetTensorShape().GetDim() {
dims = append(dims, d.GetSize()) dims = append(dims, d.GetSize())

View File

@ -20,16 +20,16 @@ import (
"fmt" "fmt"
"testing" "testing"
corepb "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"
tspb "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto" tspb "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto"
typb "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto" typb "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto"
tfpb "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf"
) )
func TestSignatureFromProto(t *testing.T) { func TestSignatureFromProto(t *testing.T) {
got := signatureDefFromProto(&tfpb.SignatureDef{ got := signatureDefFromProto(&corepb.SignatureDef{
Inputs: map[string]*tfpb.TensorInfo{ Inputs: map[string]*corepb.TensorInfo{
"input_1": &tfpb.TensorInfo{ "input_1": &corepb.TensorInfo{
Encoding: &tfpb.TensorInfo_Name{ Encoding: &corepb.TensorInfo_Name{
Name: "tensor_1", Name: "tensor_1",
}, },
Dtype: typb.DataType_DT_INT8, Dtype: typb.DataType_DT_INT8,
@ -41,8 +41,8 @@ func TestSignatureFromProto(t *testing.T) {
}, },
}, },
}, },
"input_2": &tfpb.TensorInfo{ "input_2": &corepb.TensorInfo{
Encoding: &tfpb.TensorInfo_Name{ Encoding: &corepb.TensorInfo_Name{
Name: "tensor_2", Name: "tensor_2",
}, },
Dtype: typb.DataType_DT_FLOAT, Dtype: typb.DataType_DT_FLOAT,
@ -55,9 +55,9 @@ func TestSignatureFromProto(t *testing.T) {
}, },
}, },
}, },
Outputs: map[string]*tfpb.TensorInfo{ Outputs: map[string]*corepb.TensorInfo{
"output_1": &tfpb.TensorInfo{ "output_1": &corepb.TensorInfo{
Encoding: &tfpb.TensorInfo_Name{ Encoding: &corepb.TensorInfo_Name{
Name: "tensor_3", Name: "tensor_3",
}, },
Dtype: typb.DataType_DT_STRING, Dtype: typb.DataType_DT_STRING,
@ -69,8 +69,8 @@ func TestSignatureFromProto(t *testing.T) {
}, },
}, },
}, },
"output_2": &tfpb.TensorInfo{ "output_2": &corepb.TensorInfo{
Encoding: &tfpb.TensorInfo_Name{ Encoding: &corepb.TensorInfo_Name{
Name: "tensor_4", Name: "tensor_4",
}, },
Dtype: typb.DataType_DT_BOOL, Dtype: typb.DataType_DT_BOOL,
@ -140,8 +140,8 @@ func TestSignatureFromProto(t *testing.T) {
} }
func TestTensorInfoFromProto(t *testing.T) { func TestTensorInfoFromProto(t *testing.T) {
got := tensorInfoFromProto(&tfpb.TensorInfo{ got := tensorInfoFromProto(&corepb.TensorInfo{
Encoding: &tfpb.TensorInfo_Name{ Encoding: &corepb.TensorInfo_Name{
Name: "tensor", Name: "tensor",
}, },
Dtype: typb.DataType_DT_INT8, Dtype: typb.DataType_DT_INT8,