1/*******************************************************************************
2* Copyright 2018-2019 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
17/* DO NOT EDIT, AUTO-GENERATED */
18
19#include <assert.h>
20
21#include "mkldnn_debug.h"
22#include "mkldnn_types.h"
23
24const char *mkldnn_status2str(mkldnn_status_t v) {
25 if (v == mkldnn_success) return "success";
26 if (v == mkldnn_out_of_memory) return "out_of_memory";
27 if (v == mkldnn_try_again) return "try_again";
28 if (v == mkldnn_invalid_arguments) return "invalid_arguments";
29 if (v == mkldnn_not_ready) return "not_ready";
30 if (v == mkldnn_unimplemented) return "unimplemented";
31 if (v == mkldnn_iterator_ends) return "iterator_ends";
32 if (v == mkldnn_runtime_error) return "runtime_error";
33 if (v == mkldnn_not_required) return "not_required";
34 assert(!"unknown status");
35 return "unknown status";
36}
37
38const char *mkldnn_dt2str(mkldnn_data_type_t v) {
39 if (v == mkldnn_data_type_undef) return "undef";
40 if (v == mkldnn_f32) return "f32";
41 if (v == mkldnn_s32) return "s32";
42 if (v == mkldnn_s8) return "s8";
43 if (v == mkldnn_u8) return "u8";
44 assert(!"unknown dt");
45 return "unknown dt";
46}
47
48const char *mkldnn_fmt_kind2str(mkldnn_format_kind_t v) {
49 if (v == mkldnn_format_kind_undef) return "undef";
50 if (v == mkldnn_format_kind_any) return "any";
51 if (v == mkldnn_blocked) return "blocked";
52 if (v == mkldnn_format_kind_wino) return "wino";
53 if (v == mkldnn_format_kind_rnn_packed) return "rnn_packed";
54 assert(!"unknown fmt_kind");
55 return "unknown fmt_kind";
56}
57
58const char *mkldnn_fmt_tag2str(mkldnn_format_tag_t v) {
59 if (v == mkldnn_format_tag_undef) return "undef";
60 if (v == mkldnn_format_tag_any) return "format_tag_any";
61 if (v == mkldnn_a) return "a";
62 if (v == mkldnn_ab) return "ab";
63 if (v == mkldnn_abc) return "abc";
64 if (v == mkldnn_abcd) return "abcd";
65 if (v == mkldnn_abcde) return "abcde";
66 if (v == mkldnn_abcdef) return "abcdef";
67 if (v == mkldnn_abdec) return "abdec";
68 if (v == mkldnn_acb) return "acb";
69 if (v == mkldnn_acbde) return "acbde";
70 if (v == mkldnn_acdb) return "acdb";
71 if (v == mkldnn_acdeb) return "acdeb";
72 if (v == mkldnn_ba) return "ba";
73 if (v == mkldnn_bac) return "bac";
74 if (v == mkldnn_bacd) return "bacd";
75 if (v == mkldnn_bcda) return "bcda";
76 if (v == mkldnn_cba) return "cba";
77 if (v == mkldnn_cdba) return "cdba";
78 if (v == mkldnn_cdeba) return "cdeba";
79 if (v == mkldnn_decab) return "decab";
80 if (v == mkldnn_Abc16a) return "Abc16a";
81 if (v == mkldnn_ABc16a16b) return "ABc16a16b";
82 if (v == mkldnn_aBc16b) return "aBc16b";
83 if (v == mkldnn_ABc16b16a) return "ABc16b16a";
84 if (v == mkldnn_Abc4a) return "Abc4a";
85 if (v == mkldnn_aBc4b) return "aBc4b";
86 if (v == mkldnn_ABc4b16a4b) return "ABc4b16a4b";
87 if (v == mkldnn_ABc4b4a) return "ABc4b4a";
88 if (v == mkldnn_ABc8a16b2a) return "ABc8a16b2a";
89 if (v == mkldnn_ABc8a8b) return "ABc8a8b";
90 if (v == mkldnn_aBc8b) return "aBc8b";
91 if (v == mkldnn_ABc8b16a2b) return "ABc8b16a2b";
92 if (v == mkldnn_ABc8b8a) return "ABc8b8a";
93 if (v == mkldnn_Abcd16a) return "Abcd16a";
94 if (v == mkldnn_ABcd16a16b) return "ABcd16a16b";
95 if (v == mkldnn_aBcd16b) return "aBcd16b";
96 if (v == mkldnn_ABcd16b16a) return "ABcd16b16a";
97 if (v == mkldnn_aBCd16b16c) return "aBCd16b16c";
98 if (v == mkldnn_aBCd16c16b) return "aBCd16c16b";
99 if (v == mkldnn_Abcd4a) return "Abcd4a";
100 if (v == mkldnn_aBcd4b) return "aBcd4b";
101 if (v == mkldnn_ABcd4b16a4b) return "ABcd4b16a4b";
102 if (v == mkldnn_ABcd4b4a) return "ABcd4b4a";
103 if (v == mkldnn_aBCd4c16b4c) return "aBCd4c16b4c";
104 if (v == mkldnn_aBCd4c4b) return "aBCd4c4b";
105 if (v == mkldnn_ABcd8a16b2a) return "ABcd8a16b2a";
106 if (v == mkldnn_ABcd8a8b) return "ABcd8a8b";
107 if (v == mkldnn_aBcd8b) return "aBcd8b";
108 if (v == mkldnn_ABcd8b16a2b) return "ABcd8b16a2b";
109 if (v == mkldnn_aBCd8b16c2b) return "aBCd8b16c2b";
110 if (v == mkldnn_ABcd8b8a) return "ABcd8b8a";
111 if (v == mkldnn_aBCd8b8c) return "aBCd8b8c";
112 if (v == mkldnn_aBCd8c16b2c) return "aBCd8c16b2c";
113 if (v == mkldnn_aBCd8c8b) return "aBCd8c8b";
114 if (v == mkldnn_Abcde16a) return "Abcde16a";
115 if (v == mkldnn_ABcde16a16b) return "ABcde16a16b";
116 if (v == mkldnn_aBcde16b) return "aBcde16b";
117 if (v == mkldnn_ABcde16b16a) return "ABcde16b16a";
118 if (v == mkldnn_aBCde16b16c) return "aBCde16b16c";
119 if (v == mkldnn_aBCde16c16b) return "aBCde16c16b";
120 if (v == mkldnn_aBCde2c8b4c) return "aBCde2c8b4c";
121 if (v == mkldnn_Abcde4a) return "Abcde4a";
122 if (v == mkldnn_aBcde4b) return "aBcde4b";
123 if (v == mkldnn_ABcde4b4a) return "ABcde4b4a";
124 if (v == mkldnn_aBCde4b4c) return "aBCde4b4c";
125 if (v == mkldnn_aBCde4c16b4c) return "aBCde4c16b4c";
126 if (v == mkldnn_aBCde4c4b) return "aBCde4c4b";
127 if (v == mkldnn_Abcde8a) return "Abcde8a";
128 if (v == mkldnn_ABcde8a8b) return "ABcde8a8b";
129 if (v == mkldnn_ABcde8b16a2b) return "ABcde8b16a2b";
130 if (v == mkldnn_aBCde8b16c2b) return "aBCde8b16c2b";
131 if (v == mkldnn_ABcde8b8a) return "ABcde8b8a";
132 if (v == mkldnn_aBCde8b8c) return "aBCde8b8c";
133 if (v == mkldnn_aBCde8c16b2c) return "aBCde8c16b2c";
134 if (v == mkldnn_aBCde8c8b) return "aBCde8c8b";
135 if (v == mkldnn_aBcdef16b) return "aBcdef16b";
136 if (v == mkldnn_aBCdef16b16c) return "aBCdef16b16c";
137 if (v == mkldnn_aBCdef16c16b) return "aBCdef16c16b";
138 if (v == mkldnn_aBcdef4b) return "aBcdef4b";
139 if (v == mkldnn_aBCdef4c4b) return "aBCdef4c4b";
140 if (v == mkldnn_aBCdef8b8c) return "aBCdef8b8c";
141 if (v == mkldnn_aBCdef8c16b2c) return "aBCdef8c16b2c";
142 if (v == mkldnn_aBCdef8c8b) return "aBCdef8c8b";
143 if (v == mkldnn_aBdc16b) return "aBdc16b";
144 if (v == mkldnn_aBdc4b) return "aBdc4b";
145 if (v == mkldnn_aBdc8b) return "aBdc8b";
146 if (v == mkldnn_aBdec16b) return "aBdec16b";
147 if (v == mkldnn_aBdec4b) return "aBdec4b";
148 if (v == mkldnn_aBdec8b) return "aBdec8b";
149 if (v == mkldnn_aBdefc16b) return "aBdefc16b";
150 if (v == mkldnn_aBdefc4b) return "aBdefc4b";
151 if (v == mkldnn_aBdefc8b) return "aBdefc8b";
152 if (v == mkldnn_Acb16a) return "Acb16a";
153 if (v == mkldnn_Acb4a) return "Acb4a";
154 if (v == mkldnn_Acb8a) return "Acb8a";
155 if (v == mkldnn_aCBd16b16c) return "aCBd16b16c";
156 if (v == mkldnn_aCBde16b16c) return "aCBde16b16c";
157 if (v == mkldnn_Acdb16a) return "Acdb16a";
158 if (v == mkldnn_Acdb4a) return "Acdb4a";
159 if (v == mkldnn_Acdb8a) return "Acdb8a";
160 if (v == mkldnn_Acdeb16a) return "Acdeb16a";
161 if (v == mkldnn_Acdeb4a) return "Acdeb4a";
162 if (v == mkldnn_Acdeb8a) return "Acdeb8a";
163 if (v == mkldnn_BAc16a16b) return "BAc16a16b";
164 if (v == mkldnn_BAcd16a16b) return "BAcd16a16b";
165 if (v == mkldnn_format_tag_last) return "format_tag_last";
166 if (v == mkldnn_x) return "x";
167 if (v == mkldnn_nc) return "nc";
168 if (v == mkldnn_cn) return "cn";
169 if (v == mkldnn_ncw) return "ncw";
170 if (v == mkldnn_nwc) return "nwc";
171 if (v == mkldnn_nchw) return "nchw";
172 if (v == mkldnn_nhwc) return "nhwc";
173 if (v == mkldnn_chwn) return "chwn";
174 if (v == mkldnn_ncdhw) return "ncdhw";
175 if (v == mkldnn_ndhwc) return "ndhwc";
176 if (v == mkldnn_oi) return "oi";
177 if (v == mkldnn_io) return "io";
178 if (v == mkldnn_oiw) return "oiw";
179 if (v == mkldnn_wio) return "wio";
180 if (v == mkldnn_oihw) return "oihw";
181 if (v == mkldnn_hwio) return "hwio";
182 if (v == mkldnn_ihwo) return "ihwo";
183 if (v == mkldnn_iohw) return "iohw";
184 if (v == mkldnn_oidhw) return "oidhw";
185 if (v == mkldnn_dhwio) return "dhwio";
186 if (v == mkldnn_goiw) return "goiw";
187 if (v == mkldnn_goihw) return "goihw";
188 if (v == mkldnn_hwigo) return "hwigo";
189 if (v == mkldnn_giohw) return "giohw";
190 if (v == mkldnn_goidhw) return "goidhw";
191 if (v == mkldnn_tnc) return "tnc";
192 if (v == mkldnn_ntc) return "ntc";
193 if (v == mkldnn_ldsnc) return "ldsnc";
194 if (v == mkldnn_ldigo) return "ldigo";
195 if (v == mkldnn_ldgoi) return "ldgoi";
196 if (v == mkldnn_ldgo) return "ldgo";
197 if (v == mkldnn_nCdhw16c) return "nCdhw16c";
198 if (v == mkldnn_nCdhw4c) return "nCdhw4c";
199 if (v == mkldnn_nCdhw8c) return "nCdhw8c";
200 if (v == mkldnn_nChw16c) return "nChw16c";
201 if (v == mkldnn_nChw4c) return "nChw4c";
202 if (v == mkldnn_nChw8c) return "nChw8c";
203 if (v == mkldnn_nCw16c) return "nCw16c";
204 if (v == mkldnn_nCw4c) return "nCw4c";
205 if (v == mkldnn_nCw8c) return "nCw8c";
206 if (v == mkldnn_IOw16o16i) return "IOw16o16i";
207 if (v == mkldnn_OIw16i16o) return "OIw16i16o";
208 if (v == mkldnn_OIw16o16i) return "OIw16o16i";
209 if (v == mkldnn_Oiw16o) return "Oiw16o";
210 if (v == mkldnn_OIw4i16o4i) return "OIw4i16o4i";
211 if (v == mkldnn_OIw4i4o) return "OIw4i4o";
212 if (v == mkldnn_Oiw4o) return "Oiw4o";
213 if (v == mkldnn_OIw8i16o2i) return "OIw8i16o2i";
214 if (v == mkldnn_OIw8i8o) return "OIw8i8o";
215 if (v == mkldnn_OIw8o16i2o) return "OIw8o16i2o";
216 if (v == mkldnn_OIw8o8i) return "OIw8o8i";
217 if (v == mkldnn_Owi16o) return "Owi16o";
218 if (v == mkldnn_Owi4o) return "Owi4o";
219 if (v == mkldnn_Owi8o) return "Owi8o";
220 if (v == mkldnn_IOhw16o16i) return "IOhw16o16i";
221 if (v == mkldnn_Ohwi16o) return "Ohwi16o";
222 if (v == mkldnn_Ohwi4o) return "Ohwi4o";
223 if (v == mkldnn_Ohwi8o) return "Ohwi8o";
224 if (v == mkldnn_OIhw16i16o) return "OIhw16i16o";
225 if (v == mkldnn_OIhw16o16i) return "OIhw16o16i";
226 if (v == mkldnn_Oihw16o) return "Oihw16o";
227 if (v == mkldnn_OIhw4i16o4i) return "OIhw4i16o4i";
228 if (v == mkldnn_OIhw4i4o) return "OIhw4i4o";
229 if (v == mkldnn_Oihw4o) return "Oihw4o";
230 if (v == mkldnn_OIhw8i16o2i) return "OIhw8i16o2i";
231 if (v == mkldnn_OIhw8i8o) return "OIhw8i8o";
232 if (v == mkldnn_OIhw8o16i2o) return "OIhw8o16i2o";
233 if (v == mkldnn_OIhw8o8i) return "OIhw8o8i";
234 if (v == mkldnn_Odhwi16o) return "Odhwi16o";
235 if (v == mkldnn_Odhwi4o) return "Odhwi4o";
236 if (v == mkldnn_Odhwi8o) return "Odhwi8o";
237 if (v == mkldnn_OIdhw16i16o) return "OIdhw16i16o";
238 if (v == mkldnn_OIdhw16o16i) return "OIdhw16o16i";
239 if (v == mkldnn_Oidhw16o) return "Oidhw16o";
240 if (v == mkldnn_OIdhw4i4o) return "OIdhw4i4o";
241 if (v == mkldnn_Oidhw4o) return "Oidhw4o";
242 if (v == mkldnn_OIdhw8i16o2i) return "OIdhw8i16o2i";
243 if (v == mkldnn_OIdhw8i8o) return "OIdhw8i8o";
244 if (v == mkldnn_OIdhw8o8i) return "OIdhw8o8i";
245 if (v == mkldnn_Goiw16g) return "Goiw16g";
246 if (v == mkldnn_gIOw16o16i) return "gIOw16o16i";
247 if (v == mkldnn_gOIw16i16o) return "gOIw16i16o";
248 if (v == mkldnn_gOIw16o16i) return "gOIw16o16i";
249 if (v == mkldnn_gOiw16o) return "gOiw16o";
250 if (v == mkldnn_gOIw4i16o4i) return "gOIw4i16o4i";
251 if (v == mkldnn_gOIw4i4o) return "gOIw4i4o";
252 if (v == mkldnn_gOiw4o) return "gOiw4o";
253 if (v == mkldnn_gOIw8i16o2i) return "gOIw8i16o2i";
254 if (v == mkldnn_gOIw8i8o) return "gOIw8i8o";
255 if (v == mkldnn_gOIw8o16i2o) return "gOIw8o16i2o";
256 if (v == mkldnn_gOIw8o8i) return "gOIw8o8i";
257 if (v == mkldnn_gOwi16o) return "gOwi16o";
258 if (v == mkldnn_gOwi4o) return "gOwi4o";
259 if (v == mkldnn_gOwi8o) return "gOwi8o";
260 if (v == mkldnn_gIOhw16o16i) return "gIOhw16o16i";
261 if (v == mkldnn_gOhwi16o) return "gOhwi16o";
262 if (v == mkldnn_gOhwi4o) return "gOhwi4o";
263 if (v == mkldnn_gOhwi8o) return "gOhwi8o";
264 if (v == mkldnn_Goihw16g) return "Goihw16g";
265 if (v == mkldnn_gOIhw16i16o) return "gOIhw16i16o";
266 if (v == mkldnn_gOIhw16o16i) return "gOIhw16o16i";
267 if (v == mkldnn_gOihw16o) return "gOihw16o";
268 if (v == mkldnn_gOIhw2i8o4i) return "gOIhw2i8o4i";
269 if (v == mkldnn_gOIhw4i16o4i) return "gOIhw4i16o4i";
270 if (v == mkldnn_gOIhw4i4o) return "gOIhw4i4o";
271 if (v == mkldnn_gOIhw4o4i) return "gOIhw4o4i";
272 if (v == mkldnn_gOihw4o) return "gOihw4o";
273 if (v == mkldnn_Goihw8g) return "Goihw8g";
274 if (v == mkldnn_gOIhw8i16o2i) return "gOIhw8i16o2i";
275 if (v == mkldnn_gOIhw8i8o) return "gOIhw8i8o";
276 if (v == mkldnn_gOIhw8o16i2o) return "gOIhw8o16i2o";
277 if (v == mkldnn_gOIhw8o8i) return "gOIhw8o8i";
278 if (v == mkldnn_gOdhwi16o) return "gOdhwi16o";
279 if (v == mkldnn_gOdhwi4o) return "gOdhwi4o";
280 if (v == mkldnn_gOdhwi8o) return "gOdhwi8o";
281 if (v == mkldnn_gOIdhw16i16o) return "gOIdhw16i16o";
282 if (v == mkldnn_gOIdhw16o16i) return "gOIdhw16o16i";
283 if (v == mkldnn_gOidhw16o) return "gOidhw16o";
284 if (v == mkldnn_gOIdhw4i4o) return "gOIdhw4i4o";
285 if (v == mkldnn_gOidhw4o) return "gOidhw4o";
286 if (v == mkldnn_gOIdhw8i16o2i) return "gOIdhw8i16o2i";
287 if (v == mkldnn_gOIdhw8i8o) return "gOIdhw8i8o";
288 if (v == mkldnn_gOIdhw8o8i) return "gOIdhw8o8i";
289 assert(!"unknown fmt_tag");
290 return "unknown fmt_tag";
291}
292
293const char *mkldnn_prop_kind2str(mkldnn_prop_kind_t v) {
294 if (v == mkldnn_prop_kind_undef) return "undef";
295 if (v == mkldnn_forward_training) return "forward_training";
296 if (v == mkldnn_forward_inference) return "forward_inference";
297 if (v == mkldnn_forward_scoring) return "forward_scoring";
298 if (v == mkldnn_forward) return "forward";
299 if (v == mkldnn_backward) return "backward";
300 if (v == mkldnn_backward_data) return "backward_data";
301 if (v == mkldnn_backward_weights) return "backward_weights";
302 if (v == mkldnn_backward_bias) return "backward_bias";
303 assert(!"unknown prop_kind");
304 return "unknown prop_kind";
305}
306
307const char *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v) {
308 if (v == mkldnn_undefined_primitive) return "undef";
309 if (v == mkldnn_reorder) return "reorder";
310 if (v == mkldnn_shuffle) return "shuffle";
311 if (v == mkldnn_concat) return "concat";
312 if (v == mkldnn_sum) return "sum";
313 if (v == mkldnn_convolution) return "convolution";
314 if (v == mkldnn_deconvolution) return "deconvolution";
315 if (v == mkldnn_eltwise) return "eltwise";
316 if (v == mkldnn_softmax) return "softmax";
317 if (v == mkldnn_pooling) return "pooling";
318 if (v == mkldnn_lrn) return "lrn";
319 if (v == mkldnn_batch_normalization) return "batch_normalization";
320 if (v == mkldnn_inner_product) return "inner_product";
321 if (v == mkldnn_rnn) return "rnn";
322 assert(!"unknown prim_kind");
323 return "unknown prim_kind";
324}
325
326const char *mkldnn_alg_kind2str(mkldnn_alg_kind_t v) {
327 if (v == mkldnn_alg_kind_undef) return "undef";
328 if (v == mkldnn_convolution_direct) return "convolution_direct";
329 if (v == mkldnn_convolution_winograd) return "convolution_winograd";
330 if (v == mkldnn_convolution_auto) return "convolution_auto";
331 if (v == mkldnn_deconvolution_direct) return "deconvolution_direct";
332 if (v == mkldnn_deconvolution_winograd) return "deconvolution_winograd";
333 if (v == mkldnn_eltwise_relu) return "eltwise_relu";
334 if (v == mkldnn_eltwise_tanh) return "eltwise_tanh";
335 if (v == mkldnn_eltwise_elu) return "eltwise_elu";
336 if (v == mkldnn_eltwise_square) return "eltwise_square";
337 if (v == mkldnn_eltwise_abs) return "eltwise_abs";
338 if (v == mkldnn_eltwise_sqrt) return "eltwise_sqrt";
339 if (v == mkldnn_eltwise_linear) return "eltwise_linear";
340 if (v == mkldnn_eltwise_bounded_relu) return "eltwise_bounded_relu";
341 if (v == mkldnn_eltwise_soft_relu) return "eltwise_soft_relu";
342 if (v == mkldnn_eltwise_logistic) return "eltwise_logistic";
343 if (v == mkldnn_pooling_max) return "pooling_max";
344 if (v == mkldnn_pooling_avg_include_padding) return "pooling_avg_include_padding";
345 if (v == mkldnn_pooling_avg_exclude_padding) return "pooling_avg_exclude_padding";
346 if (v == mkldnn_pooling_avg) return "pooling_avg";
347 if (v == mkldnn_lrn_across_channels) return "lrn_across_channels";
348 if (v == mkldnn_lrn_within_channel) return "lrn_within_channel";
349 if (v == mkldnn_vanilla_rnn) return "vanilla_rnn";
350 if (v == mkldnn_vanilla_lstm) return "vanilla_lstm";
351 if (v == mkldnn_vanilla_gru) return "vanilla_gru";
352 if (v == mkldnn_gru_linear_before_reset) return "gru_linear_before_reset";
353 assert(!"unknown alg_kind");
354 return "unknown alg_kind";
355}
356
357const char *mkldnn_rnn_direction2str(mkldnn_rnn_direction_t v) {
358 if (v == mkldnn_unidirectional_left2right) return "unidirectional_left2right";
359 if (v == mkldnn_unidirectional_right2left) return "unidirectional_right2left";
360 if (v == mkldnn_bidirectional_concat) return "bidirectional_concat";
361 if (v == mkldnn_bidirectional_sum) return "bidirectional_sum";
362 if (v == mkldnn_unidirectional) return "unidirectional";
363 assert(!"unknown rnn_direction");
364 return "unknown rnn_direction";
365}
366