• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4
5option cc_enable_arenas = true;
6option java_outer_classname = "TypesProtos";
7option java_multiple_files = true;
8option java_package = "org.tensorflow.framework";
9option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto";
10
11// (== suppress_warning documentation-presence ==)
12// LINT.IfChange
13enum DataType {
14  // Not a legal value for DataType.  Used to indicate a DataType field
15  // has not been set.
16  DT_INVALID = 0;
17
18  // Data types that all computation devices are expected to be
19  // capable to support.
20  DT_FLOAT = 1;
21  DT_DOUBLE = 2;
22  DT_INT32 = 3;
23  DT_UINT8 = 4;
24  DT_INT16 = 5;
25  DT_INT8 = 6;
26  DT_STRING = 7;
27  DT_COMPLEX64 = 8;  // Single-precision complex
28  DT_INT64 = 9;
29  DT_BOOL = 10;
30  DT_QINT8 = 11;     // Quantized int8
31  DT_QUINT8 = 12;    // Quantized uint8
32  DT_QINT32 = 13;    // Quantized int32
33  DT_BFLOAT16 = 14;  // Float32 truncated to 16 bits.  Only for cast ops.
34  DT_QINT16 = 15;    // Quantized int16
35  DT_QUINT16 = 16;   // Quantized uint16
36  DT_UINT16 = 17;
37  DT_COMPLEX128 = 18;  // Double-precision complex
38  DT_HALF = 19;
39  DT_RESOURCE = 20;
40  DT_VARIANT = 21;  // Arbitrary C++ data types
41  DT_UINT32 = 22;
42  DT_UINT64 = 23;
43
44  // Do not use!  These are only for parameters.  Every enum above
45  // should have a corresponding value below (verified by types_test).
46  DT_FLOAT_REF = 101;
47  DT_DOUBLE_REF = 102;
48  DT_INT32_REF = 103;
49  DT_UINT8_REF = 104;
50  DT_INT16_REF = 105;
51  DT_INT8_REF = 106;
52  DT_STRING_REF = 107;
53  DT_COMPLEX64_REF = 108;
54  DT_INT64_REF = 109;
55  DT_BOOL_REF = 110;
56  DT_QINT8_REF = 111;
57  DT_QUINT8_REF = 112;
58  DT_QINT32_REF = 113;
59  DT_BFLOAT16_REF = 114;
60  DT_QINT16_REF = 115;
61  DT_QUINT16_REF = 116;
62  DT_UINT16_REF = 117;
63  DT_COMPLEX128_REF = 118;
64  DT_HALF_REF = 119;
65  DT_RESOURCE_REF = 120;
66  DT_VARIANT_REF = 121;
67  DT_UINT32_REF = 122;
68  DT_UINT64_REF = 123;
69}
70// LINT.ThenChange(
71//    https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h,
72//    https://www.tensorflow.org/code/tensorflow/go/tensor.go,
73//    https://www.tensorflow.org/code/tensorflow/core/framework/tensor.cc,
74//    https://www.tensorflow.org/code/tensorflow/core/framework/types.h,
75//    https://www.tensorflow.org/code/tensorflow/core/framework/types.cc,
76//    https://www.tensorflow.org/code/tensorflow/python/framework/dtypes.py,
77//    https://www.tensorflow.org/code/tensorflow/python/framework/function.py)
78
79// Represents a serialized tf.dtypes.Dtype
80message SerializedDType {
81  DataType datatype = 1;
82}
83