oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
dnnl.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2016-2020 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 
19 
20 #ifndef ONEAPI_DNNL_DNNL_H
21 #define ONEAPI_DNNL_DNNL_H
22 
23 #include "oneapi/dnnl/dnnl_config.h"
24 #include "oneapi/dnnl/dnnl_types.h"
25 #include "oneapi/dnnl/dnnl_version.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
33 
36 
39 
54  const_dnnl_primitive_desc_t hint_forward_primitive_desc);
55 
65 
77 
85 
101  dnnl_primitive_desc_t *primitive_desc, const_dnnl_op_desc_t op_desc,
103  const_dnnl_primitive_desc_t hint_forward_primitive_desc);
104 
113  dnnl_primitive_desc_t *primitive_desc,
114  const_dnnl_primitive_desc_t existing_primitive_desc);
115 
131  const_dnnl_primitive_desc_t primitive_desc,
133 
140  dnnl_primitive_desc_t primitive_desc);
141 
182  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
183  int index, void *result);
184 
200  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
201  int index);
202 
216 int DNNL_API dnnl_primitive_desc_query_s32(
217  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
218  int index);
219 
227  const_dnnl_primitive_desc_t primitive_desc);
228 
243  dnnl_stream_t stream, int nargs, const dnnl_exec_arg_t *args);
244 
258  const_dnnl_primitive_t primitive,
259  const_dnnl_primitive_desc_t *primitive_desc);
260 
267 
269 
272 
282 
291 
298 
307 
318 
342  const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask,
343  const float **scales);
344 
391  dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask,
392  const float *scales);
393 
421  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask,
422  const float **scales);
423 
445  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask,
446  const float *scales);
447 
477  const_dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask,
478  const int32_t **zero_points);
479 
506  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask,
507  const int32_t *zero_points);
508 
523 
537 
544 
551 
556 int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops);
557 
566  const_dnnl_post_ops_t post_ops, int index);
567 
593  dnnl_post_ops_t post_ops, float scale);
594 
628  dnnl_post_ops_t post_ops, float scale, dnnl_data_type_t data_type);
629 
640  const_dnnl_post_ops_t post_ops, int index, float *scale);
641 
652  const_dnnl_post_ops_t post_ops, int index, float *scale,
653  dnnl_data_type_t *data_type);
654 
674  float scale, dnnl_alg_kind_t alg_kind, float alpha, float beta);
675 
689  const_dnnl_post_ops_t post_ops, int index, float *scale,
690  dnnl_alg_kind_t *alg_kind, float *alpha, float *beta);
691 
723  dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type,
724  dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask,
725  const float *scales);
726 
744  const_dnnl_post_ops_t post_ops, int index,
745  dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type,
746  dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask,
747  const float **scales);
748 
783  dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type,
784  dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask,
785  const float *scales);
786 
804  const_dnnl_post_ops_t post_ops, int index,
805  dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type,
806  dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask,
807  const float **scales);
808 
827  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src1_desc);
828 
840  const_dnnl_post_ops_t post_ops, int index, dnnl_alg_kind_t *alg_kind,
841  const dnnl_memory_desc_t **src1_desc);
842 
844 
846 
849 
866  dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims,
867  dnnl_data_type_t data_type, const dnnl_dims_t strides);
868 
888  dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims,
889  dnnl_data_type_t data_type, dnnl_format_tag_t tag);
890 
897 //
906  dnnl_memory_desc_t *memory_desc,
907  const dnnl_memory_desc_t *parent_memory_desc, const dnnl_dims_t dims,
908  const dnnl_dims_t offsets);
909 
950  dnnl_memory_desc_t *out_memory_desc,
951  const dnnl_memory_desc_t *in_memory_desc, int ndims,
952  const dnnl_dims_t dims);
953 
995  dnnl_memory_desc_t *out_memory_desc,
996  const dnnl_memory_desc_t *in_memory_desc, const int *permutation);
997 
1007 int DNNL_API dnnl_memory_desc_equal(
1008  const dnnl_memory_desc_t *lhs, const dnnl_memory_desc_t *rhs);
1009 
1015 size_t DNNL_API dnnl_memory_desc_get_size(
1016  const dnnl_memory_desc_t *memory_desc);
1017 
1039  const dnnl_memory_desc_t *memory_desc, dnnl_engine_t engine,
1040  void *handle);
1041 
1049  const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc);
1050 
1058  const_dnnl_memory_t memory, dnnl_engine_t *engine);
1059 
1084  const_dnnl_memory_t memory, void **mapped_ptr);
1085 
1101  const_dnnl_memory_t memory, void *mapped_ptr);
1102 
1111  const_dnnl_memory_t memory, void **handle);
1112 
1123  dnnl_memory_t memory, void *handle);
1124 
1154  dnnl_memory_t memory, void *handle, dnnl_stream_t stream);
1155 
1162 
1164 
1167 
1170 
1184  dnnl_primitive_desc_t *reorder_primitive_desc,
1185  const dnnl_memory_desc_t *src_desc, dnnl_engine_t src_engine,
1186  const dnnl_memory_desc_t *dst_desc, dnnl_engine_t dst_engine,
1188 
1190 
1193 
1209  dnnl_primitive_desc_t *concat_primitive_desc,
1210  const dnnl_memory_desc_t *dst_desc, int n, int concat_dimension,
1211  const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr,
1212  dnnl_engine_t engine);
1213 
1215 
1218 
1232  dnnl_primitive_desc_t *sum_primitive_desc,
1233  const dnnl_memory_desc_t *dst_desc, int n, const float *scales,
1234  const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr,
1235  dnnl_engine_t engine);
1236 
1238 
1241 
1263  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src0_desc,
1264  const dnnl_memory_desc_t *src1_desc,
1265  const dnnl_memory_desc_t *dst_desc);
1266 
1268 
1271 
1305  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1306  const dnnl_memory_desc_t *weights_desc,
1307  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1308  const dnnl_dims_t strides, const dnnl_dims_t padding_l,
1309  const dnnl_dims_t padding_r);
1310 
1348  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1349  const dnnl_memory_desc_t *weights_desc,
1350  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1351  const dnnl_dims_t strides, const dnnl_dims_t dilates,
1352  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1353 
1381  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1382  const dnnl_memory_desc_t *diff_src_desc,
1383  const dnnl_memory_desc_t *weights_desc,
1384  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1385  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1386 
1418  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1419  const dnnl_memory_desc_t *diff_src_desc,
1420  const dnnl_memory_desc_t *weights_desc,
1421  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1422  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1423  const dnnl_dims_t padding_r);
1424 
1455  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1456  const dnnl_memory_desc_t *src_desc,
1457  const dnnl_memory_desc_t *diff_weights_desc,
1458  const dnnl_memory_desc_t *diff_bias_desc,
1459  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1460  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1461 
1496  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1497  const dnnl_memory_desc_t *src_desc,
1498  const dnnl_memory_desc_t *diff_weights_desc,
1499  const dnnl_memory_desc_t *diff_bias_desc,
1500  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1501  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1502  const dnnl_dims_t padding_r);
1503 
1505 
1508 
1541  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1542  const dnnl_memory_desc_t *weights_desc,
1543  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1544  const dnnl_dims_t strides, const dnnl_dims_t padding_l,
1545  const dnnl_dims_t padding_r);
1546 
1583  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1584  const dnnl_memory_desc_t *weights_desc,
1585  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1586  const dnnl_dims_t strides, const dnnl_dims_t dilates,
1587  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1588 
1615  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1616  const dnnl_memory_desc_t *diff_src_desc,
1617  const dnnl_memory_desc_t *weights_desc,
1618  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1619  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1620 
1651  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1652  const dnnl_memory_desc_t *diff_src_desc,
1653  const dnnl_memory_desc_t *weights_desc,
1654  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1655  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1656  const dnnl_dims_t padding_r);
1657 
1687  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1688  const dnnl_memory_desc_t *src_desc,
1689  const dnnl_memory_desc_t *diff_weights_desc,
1690  const dnnl_memory_desc_t *diff_bias_desc,
1691  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1692  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1693 
1727  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1728  const dnnl_memory_desc_t *src_desc,
1729  const dnnl_memory_desc_t *diff_weights_desc,
1730  const dnnl_memory_desc_t *diff_bias_desc,
1731  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1732  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1733  const dnnl_dims_t padding_r);
1734 
1736 
1739 
1752  const dnnl_memory_desc_t *data_desc, int axis, dnnl_dim_t group_size);
1753 
1763  dnnl_shuffle_desc_t *shuffle_desc,
1764  const dnnl_memory_desc_t *diff_data_desc, int axis,
1765  dnnl_dim_t group_size);
1766 
1768 
1771 
1787  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc,
1788  float alpha, float beta);
1789 
1803  dnnl_eltwise_desc_t *eltwise_desc, dnnl_alg_kind_t alg_kind,
1804  const dnnl_memory_desc_t *diff_data_desc,
1805  const dnnl_memory_desc_t *data_desc, float alpha, float beta);
1806 
1808 
1811 
1823  const dnnl_memory_desc_t *data_desc, int softmax_axis);
1824 
1834  dnnl_softmax_desc_t *softmax_desc,
1835  const dnnl_memory_desc_t *diff_data_desc,
1836  const dnnl_memory_desc_t *data_desc, int softmax_axis);
1837 
1839 
1842 
1854  const dnnl_memory_desc_t *data_desc, int logsoftmax_axis);
1855 
1865  dnnl_logsoftmax_desc_t *logsoftmax_desc,
1866  const dnnl_memory_desc_t *diff_data_desc,
1867  const dnnl_memory_desc_t *data_desc, int logsoftmax_axis);
1868 
1870 
1873 
1900  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1901  const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides,
1902  const dnnl_dims_t kernel, const dnnl_dims_t padding_l,
1903  const dnnl_dims_t padding_r);
1904 
1928  dnnl_pooling_desc_t *pool_desc, dnnl_alg_kind_t alg_kind,
1929  const dnnl_memory_desc_t *diff_src_desc,
1930  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1931  const dnnl_dims_t kernel, const dnnl_dims_t padding_l,
1932  const dnnl_dims_t padding_r);
1933 
1963  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1964  const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides,
1965  const dnnl_dims_t kernel, const dnnl_dims_t dilation,
1966  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1967 
1994  dnnl_pooling_v2_desc_t *pool_desc, dnnl_alg_kind_t alg_kind,
1995  const dnnl_memory_desc_t *diff_src_desc,
1996  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1997  const dnnl_dims_t kernel, const dnnl_dims_t dilation,
1998  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1999 
2001 
2004 
2021  dnnl_prelu_desc_t *prelu_desc, dnnl_prop_kind_t prop_kind,
2022  const dnnl_memory_desc_t *data_desc,
2023  const dnnl_memory_desc_t *weights_desc);
2024 
2042  dnnl_prelu_desc_t *prelu_desc, const dnnl_memory_desc_t *data_desc,
2043  const dnnl_memory_desc_t *weights_desc,
2044  const dnnl_memory_desc_t *diff_data_desc,
2045  const dnnl_memory_desc_t *diff_weights_desc);
2046 
2048 
2051 
2068  const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha,
2069  float beta, float k);
2070 
2085  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc,
2086  const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha,
2087  float beta, float k);
2088 
2090 
2093 
2111  const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags);
2112 
2132  const dnnl_memory_desc_t *diff_data_desc,
2133  const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags);
2134 
2136 
2139 
2162  const dnnl_memory_desc_t *data_desc,
2163  const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags);
2164 
2189  const dnnl_memory_desc_t *diff_data_desc,
2190  const dnnl_memory_desc_t *data_desc,
2191  const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags);
2192 
2194 
2197 
2217  const dnnl_memory_desc_t *src_desc,
2218  const dnnl_memory_desc_t *weights_desc,
2219  const dnnl_memory_desc_t *bias_desc,
2220  const dnnl_memory_desc_t *dst_desc);
2221 
2235  dnnl_inner_product_desc_t *ip_desc,
2236  const dnnl_memory_desc_t *diff_src_desc,
2237  const dnnl_memory_desc_t *weights_desc,
2238  const dnnl_memory_desc_t *diff_dst_desc);
2239 
2256  dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *src_desc,
2257  const dnnl_memory_desc_t *diff_weights_desc,
2258  const dnnl_memory_desc_t *diff_bias_desc,
2259  const dnnl_memory_desc_t *diff_dst_desc);
2260 
2262 
2265 
2306  dnnl_primitive_attr_t attr, const float scale, const float shift);
2307 
2320  const_dnnl_primitive_attr_t attr, float *scale, float *shift);
2321 
2352  dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask,
2353  const float *scales);
2354 
2371  const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask,
2372  const float **scales);
2373 
2401  dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask,
2402  const float *scales);
2403 
2420  const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask,
2421  const float **scales);
2422 
2424 
2427 
2468  const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction,
2469  const dnnl_memory_desc_t *src_layer_desc,
2470  const dnnl_memory_desc_t *src_iter_desc,
2471  const dnnl_memory_desc_t *weights_layer_desc,
2472  const dnnl_memory_desc_t *weights_iter_desc,
2473  const dnnl_memory_desc_t *bias_desc,
2474  const dnnl_memory_desc_t *dst_layer_desc,
2475  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags, float alpha,
2476  float beta);
2477 
2529  const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction,
2530  const dnnl_memory_desc_t *src_layer_desc,
2531  const dnnl_memory_desc_t *src_iter_desc,
2532  const dnnl_memory_desc_t *weights_layer_desc,
2533  const dnnl_memory_desc_t *weights_iter_desc,
2534  const dnnl_memory_desc_t *bias_desc,
2535  const dnnl_memory_desc_t *dst_layer_desc,
2536  const dnnl_memory_desc_t *dst_iter_desc,
2537  const dnnl_memory_desc_t *diff_src_layer_desc,
2538  const dnnl_memory_desc_t *diff_src_iter_desc,
2539  const dnnl_memory_desc_t *diff_weights_layer_desc,
2540  const dnnl_memory_desc_t *diff_weights_iter_desc,
2541  const dnnl_memory_desc_t *diff_bias_desc,
2542  const dnnl_memory_desc_t *diff_dst_layer_desc,
2543  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags,
2544  float alpha, float beta);
2545 
2591  const dnnl_memory_desc_t *src_layer_desc,
2592  const dnnl_memory_desc_t *src_iter_desc,
2593  const dnnl_memory_desc_t *src_iter_c_desc,
2594  const dnnl_memory_desc_t *weights_layer_desc,
2595  const dnnl_memory_desc_t *weights_iter_desc,
2596  const dnnl_memory_desc_t *bias_desc,
2597  const dnnl_memory_desc_t *dst_layer_desc,
2598  const dnnl_memory_desc_t *dst_iter_desc,
2599  const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags);
2600 
2648  const dnnl_memory_desc_t *src_layer_desc,
2649  const dnnl_memory_desc_t *src_iter_desc,
2650  const dnnl_memory_desc_t *src_iter_c_desc,
2651  const dnnl_memory_desc_t *weights_layer_desc,
2652  const dnnl_memory_desc_t *weights_iter_desc,
2653  const dnnl_memory_desc_t *weights_peephole_desc,
2654  const dnnl_memory_desc_t *bias_desc,
2655  const dnnl_memory_desc_t *dst_layer_desc,
2656  const dnnl_memory_desc_t *dst_iter_desc,
2657  const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags);
2658 
2710  const dnnl_memory_desc_t *src_layer_desc,
2711  const dnnl_memory_desc_t *src_iter_desc,
2712  const dnnl_memory_desc_t *src_iter_c_desc,
2713  const dnnl_memory_desc_t *weights_layer_desc,
2714  const dnnl_memory_desc_t *weights_iter_desc,
2715  const dnnl_memory_desc_t *weights_peephole_desc,
2716  const dnnl_memory_desc_t *weights_projection_desc,
2717  const dnnl_memory_desc_t *bias_desc,
2718  const dnnl_memory_desc_t *dst_layer_desc,
2719  const dnnl_memory_desc_t *dst_iter_desc,
2720  const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags);
2721 
2784  const dnnl_memory_desc_t *src_layer_desc,
2785  const dnnl_memory_desc_t *src_iter_desc,
2786  const dnnl_memory_desc_t *src_iter_c_desc,
2787  const dnnl_memory_desc_t *weights_layer_desc,
2788  const dnnl_memory_desc_t *weights_iter_desc,
2789  const dnnl_memory_desc_t *bias_desc,
2790  const dnnl_memory_desc_t *dst_layer_desc,
2791  const dnnl_memory_desc_t *dst_iter_desc,
2792  const dnnl_memory_desc_t *dst_iter_c_desc,
2793  const dnnl_memory_desc_t *diff_src_layer_desc,
2794  const dnnl_memory_desc_t *diff_src_iter_desc,
2795  const dnnl_memory_desc_t *diff_src_iter_c_desc,
2796  const dnnl_memory_desc_t *diff_weights_layer_desc,
2797  const dnnl_memory_desc_t *diff_weights_iter_desc,
2798  const dnnl_memory_desc_t *diff_bias_desc,
2799  const dnnl_memory_desc_t *diff_dst_layer_desc,
2800  const dnnl_memory_desc_t *diff_dst_iter_desc,
2801  const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags);
2802 
2869  dnnl_rnn_direction_t direction,
2870  const dnnl_memory_desc_t *src_layer_desc,
2871  const dnnl_memory_desc_t *src_iter_desc,
2872  const dnnl_memory_desc_t *src_iter_c_desc,
2873  const dnnl_memory_desc_t *weights_layer_desc,
2874  const dnnl_memory_desc_t *weights_iter_desc,
2875  const dnnl_memory_desc_t *weights_peephole_desc,
2876  const dnnl_memory_desc_t *bias_desc,
2877  const dnnl_memory_desc_t *dst_layer_desc,
2878  const dnnl_memory_desc_t *dst_iter_desc,
2879  const dnnl_memory_desc_t *dst_iter_c_desc,
2880  const dnnl_memory_desc_t *diff_src_layer_desc,
2881  const dnnl_memory_desc_t *diff_src_iter_desc,
2882  const dnnl_memory_desc_t *diff_src_iter_c_desc,
2883  const dnnl_memory_desc_t *diff_weights_layer_desc,
2884  const dnnl_memory_desc_t *diff_weights_iter_desc,
2885  const dnnl_memory_desc_t *diff_weights_peephole_desc,
2886  const dnnl_memory_desc_t *diff_bias_desc,
2887  const dnnl_memory_desc_t *diff_dst_layer_desc,
2888  const dnnl_memory_desc_t *diff_dst_iter_desc,
2889  const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags);
2890 
2965  dnnl_rnn_direction_t direction,
2966  const dnnl_memory_desc_t *src_layer_desc,
2967  const dnnl_memory_desc_t *src_iter_desc,
2968  const dnnl_memory_desc_t *src_iter_c_desc,
2969  const dnnl_memory_desc_t *weights_layer_desc,
2970  const dnnl_memory_desc_t *weights_iter_desc,
2971  const dnnl_memory_desc_t *weights_peephole_desc,
2972  const dnnl_memory_desc_t *weights_projection_desc,
2973  const dnnl_memory_desc_t *bias_desc,
2974  const dnnl_memory_desc_t *dst_layer_desc,
2975  const dnnl_memory_desc_t *dst_iter_desc,
2976  const dnnl_memory_desc_t *dst_iter_c_desc,
2977  const dnnl_memory_desc_t *diff_src_layer_desc,
2978  const dnnl_memory_desc_t *diff_src_iter_desc,
2979  const dnnl_memory_desc_t *diff_src_iter_c_desc,
2980  const dnnl_memory_desc_t *diff_weights_layer_desc,
2981  const dnnl_memory_desc_t *diff_weights_iter_desc,
2982  const dnnl_memory_desc_t *diff_weights_peephole_desc,
2983  const dnnl_memory_desc_t *diff_weights_projection_desc,
2984  const dnnl_memory_desc_t *diff_bias_desc,
2985  const dnnl_memory_desc_t *diff_dst_layer_desc,
2986  const dnnl_memory_desc_t *diff_dst_iter_desc,
2987  const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags);
2988 
3025  const dnnl_memory_desc_t *src_layer_desc,
3026  const dnnl_memory_desc_t *src_iter_desc,
3027  const dnnl_memory_desc_t *weights_layer_desc,
3028  const dnnl_memory_desc_t *weights_iter_desc,
3029  const dnnl_memory_desc_t *bias_desc,
3030  const dnnl_memory_desc_t *dst_layer_desc,
3031  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags);
3032 
3080  const dnnl_memory_desc_t *src_layer_desc,
3081  const dnnl_memory_desc_t *src_iter_desc,
3082  const dnnl_memory_desc_t *weights_layer_desc,
3083  const dnnl_memory_desc_t *weights_iter_desc,
3084  const dnnl_memory_desc_t *bias_desc,
3085  const dnnl_memory_desc_t *dst_layer_desc,
3086  const dnnl_memory_desc_t *dst_iter_desc,
3087  const dnnl_memory_desc_t *diff_src_layer_desc,
3088  const dnnl_memory_desc_t *diff_src_iter_desc,
3089  const dnnl_memory_desc_t *diff_weights_layer_desc,
3090  const dnnl_memory_desc_t *diff_weights_iter_desc,
3091  const dnnl_memory_desc_t *diff_bias_desc,
3092  const dnnl_memory_desc_t *diff_dst_layer_desc,
3093  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags);
3094 
3127  const dnnl_memory_desc_t *src_layer_desc,
3128  const dnnl_memory_desc_t *src_iter_desc,
3129  const dnnl_memory_desc_t *weights_layer_desc,
3130  const dnnl_memory_desc_t *weights_iter_desc,
3131  const dnnl_memory_desc_t *bias_desc,
3132  const dnnl_memory_desc_t *dst_layer_desc,
3133  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags);
3134 
3182  dnnl_rnn_direction_t direction,
3183  const dnnl_memory_desc_t *src_layer_desc,
3184  const dnnl_memory_desc_t *src_iter_desc,
3185  const dnnl_memory_desc_t *weights_layer_desc,
3186  const dnnl_memory_desc_t *weights_iter_desc,
3187  const dnnl_memory_desc_t *bias_desc,
3188  const dnnl_memory_desc_t *dst_layer_desc,
3189  const dnnl_memory_desc_t *dst_iter_desc,
3190  const dnnl_memory_desc_t *diff_src_layer_desc,
3191  const dnnl_memory_desc_t *diff_src_iter_desc,
3192  const dnnl_memory_desc_t *diff_weights_layer_desc,
3193  const dnnl_memory_desc_t *diff_weights_iter_desc,
3194  const dnnl_memory_desc_t *diff_bias_desc,
3195  const dnnl_memory_desc_t *diff_dst_layer_desc,
3196  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags);
3197 
3199 
3202 
3215  const dnnl_memory_desc_t *src_desc,
3216  const dnnl_memory_desc_t *weights_desc,
3217  const dnnl_memory_desc_t *bias_desc,
3218  const dnnl_memory_desc_t *dst_desc);
3219 
3221 
3224 
3244  dnnl_alg_kind_t alg_kind, const float *factors,
3245  const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc);
3246 
3259  dnnl_resampling_desc_t *resampling_desc, dnnl_alg_kind_t alg_kind,
3260  const float *factors, const dnnl_memory_desc_t *diff_src_desc,
3261  const dnnl_memory_desc_t *diff_dst_desc);
3262 
3264 
3267 
3289  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
3290  const dnnl_memory_desc_t *dst_desc, float p, float eps);
3291 
3293 
3295 
3298 
3303 size_t DNNL_API dnnl_engine_get_count(dnnl_engine_kind_t kind);
3304 
3314  dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index);
3315 
3323  dnnl_engine_t engine, dnnl_engine_kind_t *kind);
3324 
3331 
3333 
3336 
3345  dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags);
3346 
3354  const_dnnl_stream_t stream, dnnl_engine_t *engine);
3355 
3362 
3369 
3371 
3374 
3383 dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity(int *capacity);
3384 
3396 dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity(int capacity);
3397 
3399 
3402 
3416 dnnl_status_t DNNL_API dnnl_set_verbose(int level);
3417 
3427 dnnl_status_t DNNL_API dnnl_set_jit_dump(int enable);
3428 
3435 const dnnl_version_t DNNL_API *dnnl_version(void);
3436 
3461 dnnl_status_t DNNL_API dnnl_set_jit_profiling_flags(unsigned flags);
3462 
3486 dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char *dir);
3487 
3520 
3530 
3532 
3535 
3576 dnnl_status_t DNNL_API dnnl_sgemm(char transa, char transb, dnnl_dim_t M,
3577  dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda,
3578  const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc);
3579 
3643 dnnl_status_t DNNL_API dnnl_gemm_u8s8s32(char transa, char transb, char offsetc,
3644  dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A,
3645  dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo,
3646  float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co);
3647 
3711 dnnl_status_t DNNL_API dnnl_gemm_s8s8s32(char transa, char transb, char offsetc,
3712  dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A,
3713  dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo,
3714  float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co);
3715 
3717 
3719 
3720 #ifdef __cplusplus
3721 }
3722 #endif
3723 
3724 #endif /* ONEAPI_DNNL_DNNL_H */
dnnl_status_t DNNL_API dnnl_primitive_attr_create(dnnl_primitive_attr_t *attr)
Creates an empty (default) primitive attributes with all the parameters set to their default values...
dnnl_status_t DNNL_API dnnl_post_ops_get_params_dw_k3s1p1(const_dnnl_post_ops_t post_ops, int index, dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type, dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask, const float **scales)
Returns the parameters of an depthwise post-op with stride 1.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_data_qparams(dnnl_primitive_attr_t attr, const float scale, const float shift)
Set quantization scale and shift parameters for RNN data tensors.
dnnl_status_t DNNL_API dnnl_post_ops_get_params_dw_k3s2p1(const_dnnl_post_ops_t post_ops, int index, dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type, dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask, const float **scales)
Returns the parameters of an depthwise post-op with stride 2.
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags)
Initializes a descriptor for LSTM forward propagation primitive.
prop_kind
Propagation kind.
Definition: dnnl.hpp:435
dnnl_status_t DNNL_API dnnl_gemm_s8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit signed matrix A, 8-bit signed matrix B...
dnnl_status_t DNNL_API dnnl_primitive_desc_get_attr(const_dnnl_primitive_desc_t primitive_desc, const_dnnl_primitive_attr_t *attr)
Returns a constant reference to the attributes of a primitive descriptor.
dnnl_status_t DNNL_API dnnl_convolution_backward_weights_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a convolution weights gradient primitive.
dnnl_status_t DNNL_API dnnl_gemm_u8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit unsigned matrix A, 8-bit signed matrix B...
A descriptor for an RNN operation.
Definition: dnnl_types.h:1778
dnnl_primitive_kind_t
Kinds of primitives.
Definition: dnnl_types.h:888
dnnl_status_t DNNL_API dnnl_post_ops_get_params_binary(const_dnnl_post_ops_t post_ops, int index, dnnl_alg_kind_t *alg_kind, const dnnl_memory_desc_t **src1_desc)
Returns the parameters of a binary post-op.
An opaque structure to describe a primitive.
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init_v2(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *weights_peephole_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_src_iter_c_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_weights_peephole_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags)
Initializes a descriptor for an LSTM (with or without peephole) backward propagation primitive...
dnnl_status_t DNNL_API dnnl_memory_desc_init_by_strides(dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims, dnnl_data_type_t data_type, const dnnl_dims_t strides)
Initializes a memory descriptor using dimensions and strides.
dnnl_status_t DNNL_API dnnl_dilated_convolution_forward_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated convolution forward propagation primitive. ...
dnnl_status_t DNNL_API dnnl_lrn_backward_desc_init(dnnl_lrn_desc_t *lrn_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha, float beta, float k)
Initializes a descriptor for LRN backward propagation primitive.
dnnl_status_t DNNL_API dnnl_layer_normalization_backward_desc_init(dnnl_layer_normalization_desc_t *lnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags)
Initializes a descriptor for a layer normalization backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_next(dnnl_primitive_desc_iterator_t iterator)
Advances the primitive descriptor iterator to point to the next available implementation.
const void * const_dnnl_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: dnnl_types.h:1351
An opaque structure for primitive descriptor attributes.
dnnl_status_t DNNL_API dnnl_convolution_backward_data_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a convolution backward propagation primitive.
An opaque structure to describe a memory.
dnnl_engine_kind_t
Kinds of engines.
Definition: dnnl_types.h:1972
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init_v3(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *weights_peephole_desc, const dnnl_memory_desc_t *weights_projection_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags)
Initializes a descriptor for an LSTM (with or without peephole and with or without recurrent projecti...
dnnl_status_t DNNL_API dnnl_memory_destroy(dnnl_memory_t memory)
Destroys a memory object.
dnnl_status_t DNNL_API dnnl_memory_get_data_handle(const_dnnl_memory_t memory, void **handle)
Returns memory object's data handle.
dnnl_status_t DNNL_API dnnl_stream_get_engine(const_dnnl_stream_t stream, dnnl_engine_t *engine)
Returns the engine of a stream object.
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy(dnnl_primitive_attr_t attr)
Destroys primitive attributes.
A descriptor of a pooling operation.
Definition: dnnl_types.h:1521
dnnl_status_t DNNL_API dnnl_vanilla_rnn_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags, float alpha, float beta)
Initializes a descriptor for vanilla RNN backward propagation primitive.
dnnl_status_t DNNL_API dnnl_post_ops_get_params_eltwise(const_dnnl_post_ops_t post_ops, int index, float *scale, dnnl_alg_kind_t *alg_kind, float *alpha, float *beta)
Returns the parameters of an elementwise post-op.
int DNNL_API dnnl_primitive_desc_query_s32(const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what, int index)
Queries primitive descriptor for a signed 32bit int.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_data_qparams(const_dnnl_primitive_attr_t attr, float *scale, float *shift)
Returns the quantization scale and shift parameters for RNN data tensors.
An opaque structure to describe a primitive descriptor iterator.
dnnl_status_t DNNL_API dnnl_memory_set_data_handle(dnnl_memory_t memory, void *handle)
Sets the underlying memory buffer.
dnnl_status_t DNNL_API dnnl_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags)
Creates an execution stream.
dnnl_status_t DNNL_API dnnl_memory_desc_permute_axes(dnnl_memory_desc_t *out_memory_desc, const dnnl_memory_desc_t *in_memory_desc, const int *permutation)
Initializes a memory descriptor by permuting axes in an existing one.
dnnl_status_t DNNL_API dnnl_primitive_desc_query(const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what, int index, void *result)
Queries a primitive descriptor for various pieces of information.
dnnl_status_t DNNL_API dnnl_memory_unmap_data(const_dnnl_memory_t memory, void *mapped_ptr)
Unmaps a memory object and writes back any changes made to the previously mapped memory buffer...
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init_v2(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *weights_peephole_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags)
Initializes a descriptor for an LSTM (with or without peephole) forward propagation primitive...
dnnl_status_t DNNL_API dnnl_gru_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags)
Initializes a descriptor for GRU backward propagation primitive.
dnnl_status_t DNNL_API dnnl_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a deconvolution weights gradient primitive.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_create(dnnl_primitive_desc_iterator_t *iterator, const_dnnl_op_desc_t op_desc, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine, const_dnnl_primitive_desc_t hint_forward_primitive_desc)
Creates a primitive descriptor iterator.
dnnl_status_t DNNL_API dnnl_post_ops_append_eltwise(dnnl_post_ops_t post_ops, float scale, dnnl_alg_kind_t alg_kind, float alpha, float beta)
Appends an elementwise post-op.
A descriptor of a matrix multiplication operation.
Definition: dnnl_types.h:1886
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scales(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask, const float **scales)
Returns primitive attributes scaling factors correspondence mask and values for a given memory argume...
dnnl_status_t DNNL_API dnnl_set_jit_profiling_flags(unsigned flags)
Sets library profiling flags.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_output_scales(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *scales)
Sets output scaling factors correspondence mask and values.
dnnl_query_t
Primitive descriptor query specification.
Definition: dnnl_types.h:2339
A descriptor of a binary operation.
Definition: dnnl_types.h:1860
dnnl_status_t DNNL_API dnnl_gru_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, unsigned flags)
Initializes a descriptor for GRU forward propagation primitive.
Structure containing version information as per Semantic Versioning
Definition: dnnl_types.h:2466
dnnl_status_t DNNL_API dnnl_primitive_attr_set_zero_points(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask, const int32_t *zero_points)
Sets primitive attributes zero points for primitive operations for a given memory argument...
int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops)
Returns the length of post-ops.
dnnl_status_t DNNL_API dnnl_softmax_forward_desc_init(dnnl_softmax_desc_t *softmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int softmax_axis)
Initializes a descriptor for softmax forward propagation primitive.
A descriptor of a convolution operation.
Definition: dnnl_types.h:1363
dnnl_status_t DNNL_API dnnl_dilated_convolution_backward_weights_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated convolution weights gradient primitive.
dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create(dnnl_primitive_desc_t *sum_primitive_desc, const dnnl_memory_desc_t *dst_desc, int n, const float *scales, const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates a primitive descriptor for an (out-of-place) sum primitive.
dnnl_scratchpad_mode_t
Scratchpad mode.
Definition: dnnl_types.h:2026
dnnl_status_t DNNL_API dnnl_logsoftmax_backward_desc_init(dnnl_logsoftmax_desc_t *logsoftmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
Initializes a descriptor for logsoftmax backward propagation primitive.
dnnl_status_t DNNL_API dnnl_concat_primitive_desc_create(dnnl_primitive_desc_t *concat_primitive_desc, const dnnl_memory_desc_t *dst_desc, int n, int concat_dimension, const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates a primitive descriptor for an out-of-place concatenation primitive.
dnnl_status_t DNNL_API dnnl_lrn_forward_desc_init(dnnl_lrn_desc_t *lrn_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha, float beta, float k)
Initializes a descriptor for LRN forward propagation primitive.
dnnl_status_t DNNL_API dnnl_shuffle_backward_desc_init(dnnl_shuffle_desc_t *shuffle_desc, const dnnl_memory_desc_t *diff_data_desc, int axis, dnnl_dim_t group_size)
Initializes a descriptor for shuffle backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_desc_create(dnnl_primitive_desc_t *primitive_desc, const_dnnl_op_desc_t op_desc, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine, const_dnnl_primitive_desc_t hint_forward_primitive_desc)
Creates a primitive descriptor.
An opaque structure to describe an engine.
dnnl_status_t DNNL_API dnnl_reduction_desc_init(dnnl_reduction_desc_t *desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, float p, float eps)
Initializes a descriptor for a reduction primitive.
size_t DNNL_API dnnl_memory_desc_get_size(const dnnl_memory_desc_t *memory_desc)
Returns the size of a memory descriptor.
A descriptor of a element-wise operation.
Definition: dnnl_types.h:1438
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum(const_dnnl_post_ops_t post_ops, int index, float *scale)
Returns the parameters of an accumulation (sum) post-op.
A descriptor of a Softmax operation.
Definition: dnnl_types.h:1491
An opaque structure for a chain of post operations.
A descriptor of an inner product operation.
Definition: dnnl_types.h:1722
dnnl_rnn_direction_t
A direction of RNN primitive execution.
Definition: dnnl_types.h:1762
A descriptor of reduction operation.
Definition: dnnl_types.h:1936
dnnl_status_t DNNL_API dnnl_memory_get_memory_desc(const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc)
Returns the memory descriptor for a memory object.
dnnl_status_t
Status values returned by the library functions.
Definition: dnnl_types.h:39
dnnl_status_t DNNL_API dnnl_primitive_create(dnnl_primitive_t *primitive, const_dnnl_primitive_desc_t primitive_desc)
Creates a primitive.
dnnl_status_t DNNL_API dnnl_pooling_v2_backward_desc_init(dnnl_pooling_v2_desc_t *pool_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t dilation, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling v2 (pooling with dilation support) backward propagation primitiv...
dnnl_status_t DNNL_API dnnl_post_ops_destroy(dnnl_post_ops_t post_ops)
Destroys post-ops.
const dnnl_memory_desc_t DNNL_API * dnnl_primitive_desc_query_md(const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what, int index)
Queries primitive descriptor for a memory descriptor.
int64_t dnnl_dim_t
A type to describe tensor dimension.
Definition: dnnl_types.h:1162
dnnl_status_t DNNL_API dnnl_primitive_desc_clone(dnnl_primitive_desc_t *primitive_desc, const_dnnl_primitive_desc_t existing_primitive_desc)
Clones a primitive descriptor.
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_src_iter_c_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags)
Initializes a descriptor for an LSTM backward propagation primitive.
dnnl_data_type_t
Data type specification.
Definition: dnnl_types.h:62
dnnl_status_t DNNL_API dnnl_pooling_v2_forward_desc_init(dnnl_pooling_v2_desc_t *pool_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t dilation, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling v2 (pooling with dilation support) forward propagation primitive...
dnnl_status_t DNNL_API dnnl_engine_create(dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index)
Creates an engine.
dnnl_format_tag_t
Memory format tag specification.
Definition: dnnl_types.h:164
dnnl_status_t DNNL_API dnnl_memory_get_engine(const_dnnl_memory_t memory, dnnl_engine_t *engine)
Returns the engine of a memory object.
dnnl_status_t DNNL_API dnnl_memory_map_data(const_dnnl_memory_t memory, void **mapped_ptr)
Maps a memory object and returns a host-side pointer to a memory buffer with a copy of its contents...
dnnl_status_t DNNL_API dnnl_post_ops_append_binary(dnnl_post_ops_t post_ops, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src1_desc)
Appends a binary post-op.
dnnl_status_t DNNL_API dnnl_inner_product_backward_data_desc_init(dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes descriptor for inner product backward propagation.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_weights_projection_qparams(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns the quantization scaling factors for RNN projection weights tensors.
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init_v3(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *weights_peephole_desc, const dnnl_memory_desc_t *weights_projection_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_src_iter_c_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_weights_peephole_desc, const dnnl_memory_desc_t *diff_weights_projection_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags)
Initializes a descriptor for an LSTM (with or without peephole and with or with out recurrent project...
dnnl_status_t DNNL_API dnnl_pooling_forward_desc_init(dnnl_pooling_desc_t *pool_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling forward propagation primitive.
A descriptor of a shuffle operation.
Definition: dnnl_types.h:1416
dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create(dnnl_primitive_desc_t *reorder_primitive_desc, const dnnl_memory_desc_t *src_desc, dnnl_engine_t src_engine, const dnnl_memory_desc_t *dst_desc, dnnl_engine_t dst_engine, const_dnnl_primitive_attr_t attr)
Creates a primitive descriptor for a reorder primitive.
dnnl_status_t DNNL_API dnnl_lbr_gru_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags)
Initializes a descriptor for LBR GRU backward propagation primitive.
dnnl_status_t DNNL_API dnnl_shuffle_forward_desc_init(dnnl_shuffle_desc_t *shuffle_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int axis, dnnl_dim_t group_size)
Initializes a descriptor for shuffle forward propagation primitive.
dnnl_status_t DNNL_API dnnl_memory_desc_reshape(dnnl_memory_desc_t *out_memory_desc, const dnnl_memory_desc_t *in_memory_desc, int ndims, const dnnl_dims_t dims)
Initializes a memory descriptor by reshaping an existing one.
dnnl_status_t DNNL_API dnnl_set_max_cpu_isa(dnnl_cpu_isa_t isa)
Sets the maximal ISA the library can dispatch to on the CPU.
dnnl_status_t DNNL_API dnnl_memory_desc_init_by_tag(dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims, dnnl_data_type_t data_type, dnnl_format_tag_t tag)
Initializes a memory descriptor using dimensions and memory format tag.
dnnl_status_t DNNL_API dnnl_eltwise_forward_desc_init(dnnl_eltwise_desc_t *eltwise_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, float alpha, float beta)
Initializes a descriptor for eltwise forward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_get_primitive_desc(const_dnnl_primitive_t primitive, const_dnnl_primitive_desc_t *primitive_desc)
Retrieves a constant reference to the primitive descriptor of a given primitive.
int DNNL_API dnnl_memory_desc_equal(const dnnl_memory_desc_t *lhs, const dnnl_memory_desc_t *rhs)
Compares two memory descriptors.
dnnl_status_t DNNL_API dnnl_post_ops_append_dw_k3s1p1(dnnl_post_ops_t post_ops, dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type, dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask, const float *scales)
Appends a depthwise post-op convolution with stride 1.
dnnl_status_t DNNL_API dnnl_post_ops_append_dw_k3s2p1(dnnl_post_ops_t post_ops, dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type, dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask, const float *scales)
Appends a depthwise post-op convolution with stride 2.
A descriptor of a Layer Normalization operation.
Definition: dnnl_types.h:1685
dnnl_status_t DNNL_API dnnl_prelu_forward_desc_init(dnnl_prelu_desc_t *prelu_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc)
Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) forward propagation pr...
dnnl_status_t DNNL_API dnnl_convolution_forward_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a convolution forward propagation primitive.
dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char *dir)
Sets JIT dump output path.
dnnl_status_t DNNL_API dnnl_primitive_destroy(dnnl_primitive_t primitive)
Destroys a primitive.
dnnl_status_t DNNL_API dnnl_dilated_convolution_backward_data_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated convolution backward propagation primitive.
dnnl_status_t DNNL_API dnnl_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a deconvolution forward propagation primitive.
dnnl_status_t DNNL_API dnnl_post_ops_append_sum(dnnl_post_ops_t post_ops, float scale)
Appends an accumulation (sum) to post-ops.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_output_scales(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns primitive attributes output scaling factors correspondence mask and values.
dnnl_status_t DNNL_API dnnl_binary_desc_init(dnnl_binary_desc_t *binary_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src0_desc, const dnnl_memory_desc_t *src1_desc, const dnnl_memory_desc_t *dst_desc)
Initializes a descriptor for a binary primitive.
dnnl_status_t DNNL_API dnnl_set_jit_dump(int enable)
Configures dumping of JIT-generated code.
dnnl_status_t DNNL_API dnnl_memory_set_data_handle_v2(dnnl_memory_t memory, void *handle, dnnl_stream_t stream)
Sets the underlying memory buffer.
dnnl_status_t DNNL_API dnnl_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a deconvolution backward propagation primitive.
dnnl_cpu_isa_t DNNL_API dnnl_get_effective_cpu_isa(void)
Gets the maximal ISA the library can dispatch to on the CPU.
dnnl_status_t DNNL_API dnnl_stream_wait(dnnl_stream_t stream)
Waits for all primitives in the execution stream to finish computations.
dnnl_primitive_kind_t DNNL_API dnnl_post_ops_get_kind(const_dnnl_post_ops_t post_ops, int index)
Returns the kind of a post-op entry.
dnnl_status_t DNNL_API dnnl_batch_normalization_backward_desc_init(dnnl_batch_normalization_desc_t *bnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a descriptor for a batch normalization backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scales(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask, const float *scales)
Sets primitive attributes scaling factors for primitive operations for a given memory argument...
Memory descriptor.
Definition: dnnl_types.h:1274
const dnnl_version_t DNNL_API * dnnl_version(void)
Returns library version information.
A descriptor of a pooling operation.
Definition: dnnl_types.h:1559
dnnl_status_t DNNL_API dnnl_prelu_backward_desc_init(dnnl_prelu_desc_t *prelu_desc, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *diff_weights_desc)
Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) backward propagation p...
dnnl_status_t DNNL_API dnnl_layer_normalization_forward_desc_init(dnnl_layer_normalization_desc_t *lnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags)
Initializes a descriptor for layer normalization forward propagation primitive.
dnnl_status_t DNNL_API dnnl_engine_destroy(dnnl_engine_t engine)
Destroys an engine.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_weights_projection_qparams(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *scales)
Sets quantization scaling factors for RNN projection weights tensors.
dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init(dnnl_softmax_desc_t *softmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int softmax_axis)
Initializes a descriptor for softmax backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_execute(const_dnnl_primitive_t primitive, dnnl_stream_t stream, int nargs, const dnnl_exec_arg_t *args)
Executes a primitive.
dnnl_status_t DNNL_API dnnl_sgemm(char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc)
Performs single-precision matrix-matrix multiply.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_weights_qparams(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *scales)
Sets quantization scaling factors for RNN weights tensors.
A structure that contains an index and a memory object, and is used to pass arguments to dnnl_primiti...
Definition: dnnl_types.h:2300
dnnl_status_t DNNL_API dnnl_memory_create(dnnl_memory_t *memory, const dnnl_memory_desc_t *memory_desc, dnnl_engine_t engine, void *handle)
Creates a memory object.
dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity(int capacity)
Sets a number of primitives that can be held in the primitive cache at a time.
dnnl_status_t DNNL_API dnnl_eltwise_backward_desc_init(dnnl_eltwise_desc_t *eltwise_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, float alpha, float beta)
Initializes a descriptor for eltwise backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scratchpad_mode(dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t mode)
Sets primitive attributes scratchpad mode.
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated deconvolution weights gradient primitive.
dnnl_status_t DNNL_API dnnl_pooling_backward_desc_init(dnnl_pooling_desc_t *pool_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling backward propagation primitive.
dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity(int *capacity)
Returns the number of primitives that can be held in the primitive cache at the same time...
dnnl_alg_kind_t
Kinds of algorithms.
Definition: dnnl_types.h:942
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy(dnnl_primitive_desc_t primitive_desc)
Destroys a primitive descriptor.
dnnl_status_t DNNL_API dnnl_post_ops_create(dnnl_post_ops_t *post_ops)
Creates empty post-ops sequence.
A descriptor of a Local Response Normalization (LRN) operation.
Definition: dnnl_types.h:1621
dnnl_dim_t dnnl_dims_t[DNNL_MAX_NDIMS]
A type to describe tensor dimensions.
Definition: dnnl_types.h:1165
dnnl_status_t DNNL_API dnnl_engine_get_kind(dnnl_engine_t engine, dnnl_engine_kind_t *kind)
Returns the kind of an engine.
dnnl_status_t DNNL_API dnnl_primitive_attr_clone(dnnl_primitive_attr_t *attr, const_dnnl_primitive_attr_t existing_attr)
Clones primitive attributes.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_weights_qparams(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns the quantization scaling factors for RNN weights tensors.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy(dnnl_primitive_desc_iterator_t iterator)
Destroys a primitive descriptor iterator.
dnnl_status_t DNNL_API dnnl_logsoftmax_forward_desc_init(dnnl_logsoftmax_desc_t *logsoftmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
Initializes a descriptor for logsoftmax forward propagation primitive.
dnnl_status_t DNNL_API dnnl_inner_product_backward_weights_desc_init(dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes descriptor for inner product weights gradient primitive.
A descriptor of a Batch Normalization operation.
Definition: dnnl_types.h:1652
dnnl_status_t DNNL_API dnnl_lbr_gru_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, unsigned flags)
Initializes a descriptor for LBR GRU forward propagation primitive.
dnnl_status_t DNNL_API dnnl_matmul_desc_init(dnnl_matmul_desc_t *matmul_desc, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc)
Initializes a matrix multiplication descriptor.
dnnl_primitive_desc_t DNNL_API dnnl_primitive_desc_iterator_fetch(const_dnnl_primitive_desc_iterator_t iterator)
Fetches the current primitive descriptor from a primitive descriptor iterator.
size_t DNNL_API dnnl_engine_get_count(dnnl_engine_kind_t kind)
Returns the number of engines of a particular kind.
An opaque structure to describe a primitive descriptor.
An opaque structure to describe an execution stream.
dnnl_status_t DNNL_API dnnl_resampling_backward_desc_init(dnnl_resampling_desc_t *resampling_desc, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes a descriptor for resampling backward propagation primitive.
dnnl_status_t DNNL_API dnnl_post_ops_append_sum_v2(dnnl_post_ops_t post_ops, float scale, dnnl_data_type_t data_type)
Appends an accumulation v2 (sum) to post-ops.
dnnl_status_t DNNL_API dnnl_memory_desc_init_submemory(dnnl_memory_desc_t *memory_desc, const dnnl_memory_desc_t *parent_memory_desc, const dnnl_dims_t dims, const dnnl_dims_t offsets)
Initializes a memory descriptor for a region inside an area described by an existing memory descripto...
A descriptor of resampling operation.
Definition: dnnl_types.h:1908
dnnl_status_t DNNL_API dnnl_set_verbose(int level)
Configures verbose output to stdout.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_post_ops(const_dnnl_primitive_attr_t attr, const_dnnl_post_ops_t *post_ops)
Returns primitive attributes post-ops.
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum_v2(const_dnnl_post_ops_t post_ops, int index, float *scale, dnnl_data_type_t *data_type)
Returns the parameters of an accumulation (sum) post-op with a data type parameter.
dnnl_prop_kind_t
Kinds of propagation.
Definition: dnnl_types.h:861
dnnl_status_t DNNL_API dnnl_batch_normalization_forward_desc_init(dnnl_batch_normalization_desc_t *bnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a descriptor for a batch normalization forward propagation primitive. ...
dnnl_status_t DNNL_API dnnl_stream_destroy(dnnl_stream_t stream)
Destroys an execution stream.
dnnl_status_t DNNL_API dnnl_vanilla_rnn_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, unsigned flags, float alpha, float beta)
Initializes a descriptor for vanilla RNN forward propagation primitive.
dnnl_status_t DNNL_API dnnl_inner_product_forward_desc_init(dnnl_inner_product_desc_t *ip_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc)
Initializes descriptor for inner product forward propagation.
C API types definitions.
dnnl_status_t DNNL_API dnnl_resampling_forward_desc_init(dnnl_resampling_desc_t *resampling_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc)
Initializes a descriptor for a resampling forward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_zero_points(const_dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask, const int32_t **zero_points)
Returns count, correspondence zero point mask, and a pointer to a constant int32_t array of zero_poin...
dnnl_cpu_isa_t
CPU instruction set flags.
Definition: dnnl_types.h:2496
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated deconvolution backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_post_ops(dnnl_primitive_attr_t attr, const_dnnl_post_ops_t post_ops)
Sets primitive attributes post-ops.
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scratchpad_mode(const_dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t *mode)
Returns the primitive attributes scratchpad mode.
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *deconv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for a dilated deconvolution forward propagation primitive.