xref: /aosp_15_r20/external/tensorflow/tensorflow/core/function/trace_type/default_types.proto (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1syntax = "proto2";
2
3package tensorflow.core.function.trace_type.default_types;
4
5import "tensorflow/core/function/trace_type/serialization.proto";
6
7// Represents a serialized Literal type.
8message SerializedLiteral {
9  message NoneValue {}
10
11  oneof value {
12    bool bool_value = 1;
13    int64 int_value = 2;
14    double float_value = 3;  // Python "float" is double precision.
15    string str_value = 4;
16    NoneValue none_value = 5;
17  }
18}
19
20// Represents a serialized Tuple type.
21message SerializedTuple {
22  repeated tensorflow.core.function.trace_type.serialization.SerializedTraceType
23      components = 1;
24}
25
26// Represents a serialized List type.
27message SerializedList {
28  optional SerializedTuple components_tuple = 1;
29}
30
31// Represents a serialized NamedTuple type.
32message SerializedNamedTuple {
33  optional string type_name = 1;
34  repeated string attribute_names = 2;
35  optional SerializedTuple attributes = 3;
36}
37
38// Represents a serialized Attrs type.
39message SerializedAttrs {
40  optional SerializedNamedTuple named_attributes = 1;
41}
42
43// Represents a serialized Dict type.
44message SerializedDict {
45  repeated SerializedLiteral keys = 1;
46  repeated tensorflow.core.function.trace_type.serialization.SerializedTraceType
47      values = 2;
48}
49
50// Represents a serialized Reference type.
51message SerializedReference {
52  optional SerializedLiteral identifier = 1;
53  optional tensorflow.core.function.trace_type.serialization.SerializedTraceType
54      base = 2;
55}
56