Skip to content

Commit 4221d1a

Browse files
Jonathan Hseutensorflower-gardener
authored andcommitted
Give unique go package paths in core/framework to avoid circular dependencies.
PiperOrigin-RevId: 293433590 Change-Id: Ia0dd6ed36cadcf2372805f6a83d5cfb51618db8c
1 parent c6f7b48 commit 4221d1a

60 files changed

Lines changed: 248 additions & 208 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tensorflow/core/example/example.proto‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// model training or inference.
33
syntax = "proto3";
44

5+
package tensorflow;
6+
57
import "tensorflow/core/example/feature.proto";
8+
69
option cc_enable_arenas = true;
710
option java_outer_classname = "ExampleProtos";
811
option java_multiple_files = true;
912
option java_package = "org.tensorflow.example";
10-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example";
11-
package tensorflow;
13+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_protos_go_proto";
1214

1315
// An Example is a mostly-normalized data format for storing data for
1416
// training and inference. It contains a key-value store (features); where
@@ -87,7 +89,7 @@ package tensorflow;
8789

8890
message Example {
8991
Features features = 1;
90-
};
92+
}
9193

9294
// A SequenceExample is an Example representing one or more sequences, and
9395
// some context. The context contains features which apply to the entire
@@ -298,4 +300,4 @@ message Example {
298300
message SequenceExample {
299301
Features context = 1;
300302
FeatureLists feature_lists = 2;
301-
};
303+
}

‎tensorflow/core/example/example_parser_configuration.proto‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,39 @@
22

33
syntax = "proto3";
44

5-
option cc_enable_arenas = true;
6-
option java_outer_classname = "ExampleParserConfigurationProtos";
7-
option java_multiple_files = true;
8-
option java_package = "org.tensorflow.example";
9-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example";
105
package tensorflow;
116

12-
import "tensorflow/core/framework/tensor_shape.proto";
137
import "tensorflow/core/framework/tensor.proto";
8+
import "tensorflow/core/framework/tensor_shape.proto";
149
import "tensorflow/core/framework/types.proto";
1510

11+
option cc_enable_arenas = true;
12+
option java_outer_classname = "ExampleParserConfigurationProtos";
13+
option java_multiple_files = true;
14+
option java_package = "org.tensorflow.example";
15+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_parser_configuration_go_proto";
16+
1617
message VarLenFeatureProto {
1718
tensorflow.DataType dtype = 1;
1819
string values_output_tensor_name = 2;
1920
string indices_output_tensor_name = 3;
2021
string shapes_output_tensor_name = 4;
21-
};
22+
}
2223

2324
message FixedLenFeatureProto {
2425
tensorflow.DataType dtype = 1;
2526
tensorflow.TensorShapeProto shape = 2;
2627
tensorflow.TensorProto default_value = 3;
2728
string values_output_tensor_name = 4;
28-
};
29+
}
2930

3031
message FeatureConfiguration {
3132
oneof config {
3233
FixedLenFeatureProto fixed_len_feature = 1;
3334
VarLenFeatureProto var_len_feature = 2;
3435
}
35-
};
36+
}
3637

3738
message ExampleParserConfiguration {
3839
map<string, FeatureConfiguration> feature_map = 1;
39-
};
40+
}

‎tensorflow/core/example/feature.proto‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@
5454
//
5555

5656
syntax = "proto3";
57+
58+
package tensorflow;
59+
5760
option cc_enable_arenas = true;
5861
option java_outer_classname = "FeatureProtos";
5962
option java_multiple_files = true;
6063
option java_package = "org.tensorflow.example";
61-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example";
62-
package tensorflow;
64+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/example/example_protos_go_proto";
6365

6466
// Containers to hold repeated fundamental values.
6567
message BytesList {
@@ -80,12 +82,12 @@ message Feature {
8082
FloatList float_list = 2;
8183
Int64List int64_list = 3;
8284
}
83-
};
85+
}
8486

8587
message Features {
8688
// Map from feature name to feature.
8789
map<string, Feature> feature = 1;
88-
};
90+
}
8991

9092
// Containers for sequential data.
9193
//
@@ -97,9 +99,9 @@ message Features {
9799
//
98100
message FeatureList {
99101
repeated Feature feature = 1;
100-
};
102+
}
101103

102104
message FeatureLists {
103105
// Map from feature name to feature list.
104106
map<string, FeatureList> feature_list = 1;
105-
};
107+
}

‎tensorflow/core/framework/allocation_description.proto‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
45
option cc_enable_arenas = true;
56
option java_outer_classname = "AllocationDescriptionProtos";
67
option java_multiple_files = true;
78
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/allocation_description_go_proto";
910

1011
message AllocationDescription {
1112
// Total number of bytes requested
@@ -25,4 +26,4 @@ message AllocationDescription {
2526

2627
// Address of the allocation.
2728
uint64 ptr = 6;
28-
};
29+
}

‎tensorflow/core/framework/attr_value.proto‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
5+
import "tensorflow/core/framework/tensor.proto";
6+
import "tensorflow/core/framework/tensor_shape.proto";
7+
import "tensorflow/core/framework/types.proto";
8+
49
option cc_enable_arenas = true;
510
option java_outer_classname = "AttrValueProtos";
611
option java_multiple_files = true;
712
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9-
import "tensorflow/core/framework/tensor.proto";
10-
import "tensorflow/core/framework/tensor_shape.proto";
11-
import "tensorflow/core/framework/types.proto";
13+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/attr_value_go_proto";
1214

1315
// Protocol buffer representing the value for an attr used to configure an Op.
1416
// Comment indicates the corresponding attr type. Only the field matching the

‎tensorflow/core/framework/cost_graph.proto‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
5+
import "tensorflow/core/framework/tensor_shape.proto";
6+
import "tensorflow/core/framework/types.proto";
7+
48
option cc_enable_arenas = true;
59
option java_outer_classname = "CostGraphProtos";
610
option java_multiple_files = true;
711
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9-
import "tensorflow/core/framework/tensor_shape.proto";
10-
import "tensorflow/core/framework/types.proto";
12+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/cost_graph_go_proto";
1113

1214
message CostGraphDef {
1315
message Node {

‎tensorflow/core/framework/device_attributes.proto‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
45
option cc_enable_arenas = true;
56
option java_outer_classname = "DeviceAttributesProtos";
67
option java_multiple_files = true;
78
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/device_attributes_go_proto";
910

1011
message InterconnectLink {
1112
int32 device_id = 1;
1213
string type = 2;
1314
int32 strength = 3;
14-
};
15+
}
1516

1617
message LocalLinks {
1718
repeated InterconnectLink link = 1;
18-
};
19+
}
1920

2021
message DeviceLocality {
2122
// Optional bus locality of device. Default value of 0 means
@@ -27,7 +28,7 @@ message DeviceLocality {
2728

2829
// Optional local interconnect links to other devices.
2930
LocalLinks links = 3;
30-
};
31+
}
3132

3233
message DeviceAttributes {
3334
// Fully specified name of the device within a cluster.

‎tensorflow/core/framework/function.proto‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
5+
import "tensorflow/core/framework/attr_value.proto";
6+
import "tensorflow/core/framework/node_def.proto";
7+
import "tensorflow/core/framework/op_def.proto";
8+
49
option cc_enable_arenas = true;
510
option java_outer_classname = "FunctionProtos";
611
option java_multiple_files = true;
712
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9-
import "tensorflow/core/framework/attr_value.proto";
10-
import "tensorflow/core/framework/node_def.proto";
11-
import "tensorflow/core/framework/op_def.proto";
13+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/function_go_proto";
1214

1315
// A library is a set of named functions.
1416
message FunctionDefLibrary {

‎tensorflow/core/framework/graph.proto‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
5+
import "tensorflow/core/framework/function.proto";
6+
import "tensorflow/core/framework/node_def.proto";
7+
import "tensorflow/core/framework/versions.proto";
8+
49
option cc_enable_arenas = true;
510
option java_outer_classname = "GraphProtos";
611
option java_multiple_files = true;
712
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9-
import "tensorflow/core/framework/node_def.proto";
10-
import "tensorflow/core/framework/function.proto";
11-
import "tensorflow/core/framework/versions.proto";
13+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/graph_go_proto";
1214

1315
// Represents the graph of operations
1416
message GraphDef {
@@ -53,4 +55,4 @@ message GraphDef {
5355
// consumer does not start until all return values of the callee
5456
// function are ready.
5557
FunctionDefLibrary library = 2;
56-
};
58+
}

‎tensorflow/core/framework/graph_transfer_info.proto‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
syntax = "proto3";
22

33
package tensorflow;
4+
5+
import "tensorflow/core/framework/types.proto";
6+
47
option cc_enable_arenas = true;
58
option java_outer_classname = "GraphTransferInfoProto";
69
option java_multiple_files = true;
710
option java_package = "org.tensorflow.framework";
8-
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9-
import "tensorflow/core/framework/types.proto";
11+
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/graph_transfer_info_go_proto";
1012

1113
message GraphTransferNodeInput {
1214
int32 node_id = 1;
@@ -20,22 +22,22 @@ message GraphTransferNodeInfo {
2022
int32 padding_id = 5;
2123
int32 input_count = 6;
2224
int32 output_count = 7;
23-
};
25+
}
2426
message GraphTransferConstNodeInfo {
2527
string name = 1;
2628
int32 node_id = 2;
2729
repeated int64 shape = 3;
2830
bytes data = 4;
2931
DataType dtype = 5;
30-
};
32+
}
3133
message GraphTransferNodeInputInfo {
3234
int32 node_id = 1;
3335
repeated GraphTransferNodeInput node_input = 2;
34-
};
36+
}
3537
message GraphTransferNodeOutputInfo {
3638
int32 node_id = 1;
3739
repeated int32 max_byte_size = 2;
38-
};
40+
}
3941
message GraphTransferGraphInputNodeInfo {
4042
string name = 1;
4143
repeated int64 shape = 2;
@@ -66,4 +68,4 @@ message GraphTransferInfo {
6668
repeated GraphTransferGraphOutputNodeInfo graph_output_node_info = 6;
6769
// Destination of graph transfer
6870
Destination destination = 7;
69-
};
71+
}

0 commit comments

Comments
 (0)