1 // This file is autogenerated
2 
3 #pragma once
4 
5 #include <stdint.h>
6 #include <vector>
7 #include <map>
8 #include <set>
9 #include <stddef.h>
10 
11 #ifndef __ANDROID_API_T__
12 #define __ANDROID_API_T__ 33
13 #endif
14 #ifndef __INTRODUCED_IN
15 #define __INTRODUCED_IN(api_level)
16 #endif
17 
18 namespace android {
19 namespace nn {
20 namespace stats {
21 
22 /*
23  * API For logging statistics events.
24  */
25 
26 /**
27  * Constants for atom codes.
28  */
29 enum {
30 
31     /**
32      * NeuralNetworksCompilationCompleted neuralnetworks_compilation_completed
33      * Usage: stats_write(NEURALNETWORKS_COMPILATION_COMPLETED, int32_t uid, int32_t session_id, int64_t version_nnapi_module, const BytesField& model_arch_hash, char const* device_id, int32_t input_data_class, int32_t output_data_class, bool fallback_to_cpu_from_error, bool introspection_enabled, bool cache_enabled, bool has_control_flow, bool has_dynamic_temporaries, int64_t compilation_time_sum_millis, int64_t compilation_time_min_millis, int64_t compilation_time_max_millis, int64_t compilation_time_sum_squared_millis, int32_t compilation_time_count, int32_t count, int64_t model_arch_hash_64);
34      */
35     NEURALNETWORKS_COMPILATION_COMPLETED = 394,
36 
37     /**
38      * NeuralNetworksExecutionCompleted neuralnetworks_execution_completed
39      * Usage: stats_write(NEURALNETWORKS_EXECUTION_COMPLETED, int32_t uid, int32_t session_id, int64_t version_nnapi_module, const BytesField& model_arch_hash, char const* device_id, int32_t mode, int32_t input_data_class, int32_t output_data_class, bool introspection_enabled, bool cache_enabled, bool has_control_flow, bool has_dynamic_temporaries, int64_t duration_runtime_sum_micros, int64_t duration_runtime_min_micros, int64_t duration_runtime_max_micros, int64_t duration_runtime_sum_squared_micros, int32_t duration_runtime_count, int64_t duration_driver_sum_micros, int64_t duration_driver_min_micros, int64_t duration_driver_max_micros, int64_t duration_driver_sum_squared_micros, int32_t duration_driver_count, int64_t duration_hardware_sum_micros, int64_t duration_hardware_min_micros, int64_t duration_hardware_max_micros, int64_t duration_hardware_sum_squared_micros, int32_t duration_hardware_count, int32_t count, int64_t model_arch_hash_64);
40      */
41     NEURALNETWORKS_EXECUTION_COMPLETED = 395,
42 
43     /**
44      * NeuralNetworksCompilationFailed neuralnetworks_compilation_failed
45      * Usage: stats_write(NEURALNETWORKS_COMPILATION_FAILED, int32_t uid, int32_t session_id, int64_t version_nnapi_module, const BytesField& model_arch_hash, char const* device_id, int32_t input_data_class, int32_t output_data_class, int32_t error_code, bool introspection_enabled, bool cache_enabled, bool has_control_flow, bool has_dynamic_temporaries, int32_t count, int64_t model_arch_hash_64);
46      */
47     NEURALNETWORKS_COMPILATION_FAILED = 396,
48 
49     /**
50      * NeuralNetworksExecutionFailed neuralnetworks_execution_failed
51      * Usage: stats_write(NEURALNETWORKS_EXECUTION_FAILED, int32_t uid, int32_t session_id, int64_t version_nnapi_module, const BytesField& model_arch_hash, char const* device_id, int32_t mode, int32_t input_data_class, int32_t output_data_class, int32_t error_code, bool introspection_enabled, bool cache_enabled, bool has_control_flow, bool has_dynamic_temporaries, int32_t count, int64_t model_arch_hash_64);
52      */
53     NEURALNETWORKS_EXECUTION_FAILED = 397
54 
55 };
56 
57 //
58 // Constants for enum values
59 //
60 
61 // Values for NeuralNetworksCompilationCompleted.input_data_class
62 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
63 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
64 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
65 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
66 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
67 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
68 
69 // Values for NeuralNetworksCompilationCompleted.output_data_class
70 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
71 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
72 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
73 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
74 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
75 const int32_t NEURAL_NETWORKS_COMPILATION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
76 
77 // Values for NeuralNetworksExecutionCompleted.mode
78 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__MODE__MODE_UNKNOWN = 0;
79 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__MODE__MODE_ASYNC = 1;
80 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__MODE__MODE_SYNC = 2;
81 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__MODE__MODE_BURST = 3;
82 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__MODE__MODE_ASYNC_WITH_DEPS = 4;
83 
84 // Values for NeuralNetworksExecutionCompleted.input_data_class
85 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
86 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
87 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
88 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
89 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
90 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__INPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
91 
92 // Values for NeuralNetworksExecutionCompleted.output_data_class
93 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
94 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
95 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
96 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
97 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
98 const int32_t NEURAL_NETWORKS_EXECUTION_COMPLETED__OUTPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
99 
100 // Values for NeuralNetworksCompilationFailed.input_data_class
101 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
102 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
103 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
104 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
105 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
106 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
107 
108 // Values for NeuralNetworksCompilationFailed.output_data_class
109 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
110 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
111 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
112 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
113 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
114 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
115 
116 // Values for NeuralNetworksCompilationFailed.error_code
117 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_NO_ERROR = 0;
118 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_OUT_OF_MEMORY = 1;
119 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_INCOMPLETE = 2;
120 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_UNEXPECTED_NULL = 3;
121 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_BAD_DATA = 4;
122 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_OP_FAILED = 5;
123 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_BAD_STATE = 6;
124 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_UNMAPPABLE = 7;
125 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_OUTPUT_INSUFFICIENT_SIZE = 8;
126 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_UNAVAILABLE_DEVICE = 9;
127 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_MISSED_DEADLINE_TRANSIENT = 10;
128 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_MISSED_DEADLINE_PERSISTENT = 11;
129 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_RESOURCE_EXHAUSTED_TRANSIENT = 12;
130 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_RESOURCE_EXHAUSTED_PERSISTENT = 13;
131 const int32_t NEURAL_NETWORKS_COMPILATION_FAILED__ERROR_CODE__RESULT_CODE_DEAD_OBJECT = 14;
132 
133 // Values for NeuralNetworksExecutionFailed.mode
134 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__MODE__MODE_UNKNOWN = 0;
135 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__MODE__MODE_ASYNC = 1;
136 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__MODE__MODE_SYNC = 2;
137 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__MODE__MODE_BURST = 3;
138 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__MODE__MODE_ASYNC_WITH_DEPS = 4;
139 
140 // Values for NeuralNetworksExecutionFailed.input_data_class
141 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
142 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
143 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
144 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
145 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
146 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__INPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
147 
148 // Values for NeuralNetworksExecutionFailed.output_data_class
149 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_UNKNOWN = 0;
150 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_OTHER = 1;
151 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT32 = 2;
152 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_FLOAT16 = 3;
153 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_QUANT = 4;
154 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__OUTPUT_DATA_CLASS__DATA_CLASS_MIXED = 5;
155 
156 // Values for NeuralNetworksExecutionFailed.error_code
157 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_NO_ERROR = 0;
158 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_OUT_OF_MEMORY = 1;
159 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_INCOMPLETE = 2;
160 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_UNEXPECTED_NULL = 3;
161 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_BAD_DATA = 4;
162 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_OP_FAILED = 5;
163 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_BAD_STATE = 6;
164 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_UNMAPPABLE = 7;
165 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_OUTPUT_INSUFFICIENT_SIZE = 8;
166 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_UNAVAILABLE_DEVICE = 9;
167 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_MISSED_DEADLINE_TRANSIENT = 10;
168 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_MISSED_DEADLINE_PERSISTENT = 11;
169 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_RESOURCE_EXHAUSTED_TRANSIENT = 12;
170 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_RESOURCE_EXHAUSTED_PERSISTENT = 13;
171 const int32_t NEURAL_NETWORKS_EXECUTION_FAILED__ERROR_CODE__RESULT_CODE_DEAD_OBJECT = 14;
172 
173 struct BytesField {
BytesFieldBytesField174   BytesField(char const* array, size_t len) : arg(array), arg_length(len) {}
175   char const* arg;
176   size_t arg_length;
177 };
178 
179 //
180 // Write methods
181 //
182 int stats_write(int32_t code, int32_t arg1, int32_t arg2, int64_t arg3, const BytesField& arg4, char const* arg5, int32_t arg6, int32_t arg7, bool arg8, bool arg9, bool arg10, bool arg11, bool arg12, int64_t arg13, int64_t arg14, int64_t arg15, int64_t arg16, int32_t arg17, int32_t arg18, int64_t arg19);
183 int stats_write(int32_t code, int32_t arg1, int32_t arg2, int64_t arg3, const BytesField& arg4, char const* arg5, int32_t arg6, int32_t arg7, int32_t arg8, bool arg9, bool arg10, bool arg11, bool arg12, int32_t arg13, int64_t arg14);
184 int stats_write(int32_t code, int32_t arg1, int32_t arg2, int64_t arg3, const BytesField& arg4, char const* arg5, int32_t arg6, int32_t arg7, int32_t arg8, bool arg9, bool arg10, bool arg11, bool arg12, int64_t arg13, int64_t arg14, int64_t arg15, int64_t arg16, int32_t arg17, int64_t arg18, int64_t arg19, int64_t arg20, int64_t arg21, int32_t arg22, int64_t arg23, int64_t arg24, int64_t arg25, int64_t arg26, int32_t arg27, int32_t arg28, int64_t arg29);
185 int stats_write(int32_t code, int32_t arg1, int32_t arg2, int64_t arg3, const BytesField& arg4, char const* arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, bool arg10, bool arg11, bool arg12, bool arg13, int32_t arg14, int64_t arg15);
186 
187 //
188 // Write flattened methods
189 //
190 
191 //
192 // Add AStatsEvent methods
193 //
194 
195 } // namespace stats
196 } // namespace nn
197 } // namespace android
198