Deep Neural Network Library (DNNL)  1.3.0
Performance library for Deep Learning
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 DNNL_H
21 #define DNNL_H
22 
23 #include "dnnl_config.h"
24 #include "dnnl_types.h"
25 #include "dnnl_version.h"
26 
28 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL
29 
30 // Set target version for OpenCL explicitly to suppress a compiler warning.
31 #ifndef CL_TARGET_OPENCL_VERSION
32 #define CL_TARGET_OPENCL_VERSION 120
33 #endif
34 
35 #include <CL/cl.h>
36 #endif
37 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
45 
48 
51 
66  const_dnnl_primitive_desc_t hint_forward_primitive_desc);
67 
77 
89 
97 
113  dnnl_primitive_desc_t *primitive_desc, const_dnnl_op_desc_t op_desc,
115  const_dnnl_primitive_desc_t hint_forward_primitive_desc);
116 
125  dnnl_primitive_desc_t *primitive_desc,
126  const_dnnl_primitive_desc_t existing_primitive_desc);
127 
143  const_dnnl_primitive_desc_t primitive_desc,
145 
152  dnnl_primitive_desc_t primitive_desc);
153 
194  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
195  int index, void *result);
196 
212  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
213  int index);
214 
228 int DNNL_API dnnl_primitive_desc_query_s32(
229  const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what,
230  int index);
231 
239  const_dnnl_primitive_desc_t primitive_desc);
240 
255  dnnl_stream_t stream, int nargs, const dnnl_exec_arg_t *args);
256 
270  const_dnnl_primitive_t primitive,
271  const_dnnl_primitive_desc_t *primitive_desc);
272 
279 
281 
284 
294 
303 
310 
319 
330 
354  const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask,
355  const float **scales);
356 
403  dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask,
404  const float *scales);
405 
433  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask,
434  const float **scales);
435 
457  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask,
458  const float *scales);
459 
489  const_dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask,
490  const int32_t **zero_points);
491 
518  dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask,
519  const int32_t *zero_points);
520 
535 
549 
556 
563 
568 int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops);
569 
578  const_dnnl_post_ops_t post_ops, int index);
579 
605  dnnl_post_ops_t post_ops, float scale);
606 
617  const_dnnl_post_ops_t post_ops, int index, float *scale);
618 
638  float scale, dnnl_alg_kind_t alg_kind, float alpha, float beta);
639 
653  const_dnnl_post_ops_t post_ops, int index, float *scale,
654  dnnl_alg_kind_t *alg_kind, float *alpha, float *beta);
655 
687  dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type,
688  dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask,
689  const float *scales);
690 
708  const_dnnl_post_ops_t post_ops, int index,
709  dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type,
710  dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask,
711  const float **scales);
712 
747  dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type,
748  dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask,
749  const float *scales);
750 
768  const_dnnl_post_ops_t post_ops, int index,
769  dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type,
770  dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask,
771  const float **scales);
772 
774 
776 
779 
796  dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims,
797  dnnl_data_type_t data_type, const dnnl_dims_t strides);
798 
818  dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims,
819  dnnl_data_type_t data_type, dnnl_format_tag_t tag);
820 
827 //
836  dnnl_memory_desc_t *memory_desc,
837  const dnnl_memory_desc_t *parent_memory_desc, const dnnl_dims_t dims,
838  const dnnl_dims_t offsets);
839 
880  dnnl_memory_desc_t *out_memory_desc,
881  const dnnl_memory_desc_t *in_memory_desc, int ndims,
882  const dnnl_dims_t dims);
883 
925  dnnl_memory_desc_t *out_memory_desc,
926  const dnnl_memory_desc_t *in_memory_desc, const int *permutation);
927 
937 int DNNL_API dnnl_memory_desc_equal(
938  const dnnl_memory_desc_t *lhs, const dnnl_memory_desc_t *rhs);
939 
945 size_t DNNL_API dnnl_memory_desc_get_size(
946  const dnnl_memory_desc_t *memory_desc);
947 
969  const dnnl_memory_desc_t *memory_desc, dnnl_engine_t engine,
970  void *handle);
971 
979  const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc);
980 
988  const_dnnl_memory_t memory, dnnl_engine_t *engine);
989 
1014  const_dnnl_memory_t memory, void **mapped_ptr);
1015 
1030  const_dnnl_memory_t memory, void *mapped_ptr);
1031 
1040  const_dnnl_memory_t memory, void **handle);
1041 
1071  dnnl_memory_t memory, void *handle);
1072 
1073 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL
1081  const_dnnl_memory_t memory, cl_mem *mem_object);
1082 
1092  dnnl_memory_t memory, cl_mem mem_object);
1093 #endif
1094 
1101 
1103 
1106 
1109 
1129  dnnl_primitive_desc_t *reorder_primitive_desc,
1130  const dnnl_memory_desc_t *src_desc, dnnl_engine_t src_engine,
1131  const dnnl_memory_desc_t *dst_desc, dnnl_engine_t dst_engine,
1133 
1135 
1138 
1163  dnnl_primitive_desc_t *concat_primitive_desc,
1164  const dnnl_memory_desc_t *dst_desc, int n, int concat_dimension,
1165  const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr,
1166  dnnl_engine_t engine);
1167 
1169 
1172 
1195  dnnl_primitive_desc_t *sum_primitive_desc,
1196  const dnnl_memory_desc_t *dst_desc, int n, const float *scales,
1197  const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr,
1198  dnnl_engine_t engine);
1199 
1201 
1204 
1232  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src0_desc,
1233  const dnnl_memory_desc_t *src1_desc,
1234  const dnnl_memory_desc_t *dst_desc);
1235 
1237 
1240 
1277  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1278  const dnnl_memory_desc_t *weights_desc,
1279  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1280  const dnnl_dims_t strides, const dnnl_dims_t padding_l,
1281  const dnnl_dims_t padding_r);
1282 
1322  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1323  const dnnl_memory_desc_t *weights_desc,
1324  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1325  const dnnl_dims_t strides, const dnnl_dims_t dilates,
1326  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1327 
1357  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1358  const dnnl_memory_desc_t *diff_src_desc,
1359  const dnnl_memory_desc_t *weights_desc,
1360  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1361  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1362 
1395  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1396  const dnnl_memory_desc_t *diff_src_desc,
1397  const dnnl_memory_desc_t *weights_desc,
1398  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1399  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1400  const dnnl_dims_t padding_r);
1401 
1435  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1436  const dnnl_memory_desc_t *src_desc,
1437  const dnnl_memory_desc_t *diff_weights_desc,
1438  const dnnl_memory_desc_t *diff_bias_desc,
1439  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1440  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1441 
1478  dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind,
1479  const dnnl_memory_desc_t *src_desc,
1480  const dnnl_memory_desc_t *diff_weights_desc,
1481  const dnnl_memory_desc_t *diff_bias_desc,
1482  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1483  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1484  const dnnl_dims_t padding_r);
1485 
1487 
1490 
1526  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1527  const dnnl_memory_desc_t *weights_desc,
1528  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1529  const dnnl_dims_t strides, const dnnl_dims_t padding_l,
1530  const dnnl_dims_t padding_r);
1531 
1570  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1571  const dnnl_memory_desc_t *weights_desc,
1572  const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc,
1573  const dnnl_dims_t strides, const dnnl_dims_t dilates,
1574  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1575 
1604  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1605  const dnnl_memory_desc_t *diff_src_desc,
1606  const dnnl_memory_desc_t *weights_desc,
1607  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1608  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1609 
1641  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1642  const dnnl_memory_desc_t *diff_src_desc,
1643  const dnnl_memory_desc_t *weights_desc,
1644  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1645  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1646  const dnnl_dims_t padding_r);
1647 
1680  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1681  const dnnl_memory_desc_t *src_desc,
1682  const dnnl_memory_desc_t *diff_weights_desc,
1683  const dnnl_memory_desc_t *diff_bias_desc,
1684  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1685  const dnnl_dims_t padding_l, const dnnl_dims_t padding_r);
1686 
1722  dnnl_deconvolution_desc_t *deconv_desc, dnnl_alg_kind_t alg_kind,
1723  const dnnl_memory_desc_t *src_desc,
1724  const dnnl_memory_desc_t *diff_weights_desc,
1725  const dnnl_memory_desc_t *diff_bias_desc,
1726  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1727  const dnnl_dims_t dilates, const dnnl_dims_t padding_l,
1728  const dnnl_dims_t padding_r);
1729 
1731 
1734 
1753  const dnnl_memory_desc_t *data_desc, int axis, dnnl_dim_t group_size);
1754 
1770  dnnl_shuffle_desc_t *shuffle_desc,
1771  const dnnl_memory_desc_t *diff_data_desc, int axis,
1772  dnnl_dim_t group_size);
1773 
1775 
1778 
1800  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc,
1801  float alpha, float beta);
1802 
1823  dnnl_eltwise_desc_t *eltwise_desc, dnnl_alg_kind_t alg_kind,
1824  const dnnl_memory_desc_t *diff_data_desc,
1825  const dnnl_memory_desc_t *data_desc, float alpha, float beta);
1826 
1828 
1831 
1849  const dnnl_memory_desc_t *data_desc, int softmax_axis);
1850 
1867  dnnl_softmax_desc_t *softmax_desc,
1868  const dnnl_memory_desc_t *diff_data_desc,
1869  const dnnl_memory_desc_t *data_desc, int softmax_axis);
1870 
1872 
1875 
1893  const dnnl_memory_desc_t *data_desc, int logsoftmax_axis);
1894 
1911  dnnl_logsoftmax_desc_t *logsoftmax_desc,
1912  const dnnl_memory_desc_t *diff_data_desc,
1913  const dnnl_memory_desc_t *data_desc, int logsoftmax_axis);
1914 
1916 
1919 
1952  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc,
1953  const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides,
1954  const dnnl_dims_t kernel, const dnnl_dims_t padding_l,
1955  const dnnl_dims_t padding_r);
1956 
1985  dnnl_pooling_desc_t *pool_desc, dnnl_alg_kind_t alg_kind,
1986  const dnnl_memory_desc_t *diff_src_desc,
1987  const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides,
1988  const dnnl_dims_t kernel, const dnnl_dims_t padding_l,
1989  const dnnl_dims_t padding_r);
1990 
1992 
1995 
2022  const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha,
2023  float beta, float k);
2024 
2050  dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc,
2051  const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha,
2052  float beta, float k);
2053 
2055 
2058 
2099  const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags);
2100 
2136  const dnnl_memory_desc_t *diff_data_desc,
2137  const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags);
2138 
2140 
2143 
2184  const dnnl_memory_desc_t *data_desc,
2185  const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags);
2186 
2225  const dnnl_memory_desc_t *diff_data_desc,
2226  const dnnl_memory_desc_t *data_desc,
2227  const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags);
2228 
2230 
2233 
2261  const dnnl_memory_desc_t *src_desc,
2262  const dnnl_memory_desc_t *weights_desc,
2263  const dnnl_memory_desc_t *bias_desc,
2264  const dnnl_memory_desc_t *dst_desc);
2265 
2286  dnnl_inner_product_desc_t *ip_desc,
2287  const dnnl_memory_desc_t *diff_src_desc,
2288  const dnnl_memory_desc_t *weights_desc,
2289  const dnnl_memory_desc_t *diff_dst_desc);
2290 
2315  dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *src_desc,
2316  const dnnl_memory_desc_t *diff_weights_desc,
2317  const dnnl_memory_desc_t *diff_bias_desc,
2318  const dnnl_memory_desc_t *diff_dst_desc);
2319 
2321 
2324 
2365  dnnl_primitive_attr_t attr, const float scale, const float shift);
2366 
2397  dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask,
2398  const float *scales);
2399 
2401 
2404 
2456  const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction,
2457  const dnnl_memory_desc_t *src_layer_desc,
2458  const dnnl_memory_desc_t *src_iter_desc,
2459  const dnnl_memory_desc_t *weights_layer_desc,
2460  const dnnl_memory_desc_t *weights_iter_desc,
2461  const dnnl_memory_desc_t *bias_desc,
2462  const dnnl_memory_desc_t *dst_layer_desc,
2463  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags, float alpha,
2464  float beta);
2465 
2534  const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction,
2535  const dnnl_memory_desc_t *src_layer_desc,
2536  const dnnl_memory_desc_t *src_iter_desc,
2537  const dnnl_memory_desc_t *weights_layer_desc,
2538  const dnnl_memory_desc_t *weights_iter_desc,
2539  const dnnl_memory_desc_t *bias_desc,
2540  const dnnl_memory_desc_t *dst_layer_desc,
2541  const dnnl_memory_desc_t *dst_iter_desc,
2542  const dnnl_memory_desc_t *diff_src_layer_desc,
2543  const dnnl_memory_desc_t *diff_src_iter_desc,
2544  const dnnl_memory_desc_t *diff_weights_layer_desc,
2545  const dnnl_memory_desc_t *diff_weights_iter_desc,
2546  const dnnl_memory_desc_t *diff_bias_desc,
2547  const dnnl_memory_desc_t *diff_dst_layer_desc,
2548  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags,
2549  float alpha, float beta);
2550 
2607  const dnnl_memory_desc_t *src_layer_desc,
2608  const dnnl_memory_desc_t *src_iter_desc,
2609  const dnnl_memory_desc_t *src_iter_c_desc,
2610  const dnnl_memory_desc_t *weights_layer_desc,
2611  const dnnl_memory_desc_t *weights_iter_desc,
2612  const dnnl_memory_desc_t *bias_desc,
2613  const dnnl_memory_desc_t *dst_layer_desc,
2614  const dnnl_memory_desc_t *dst_iter_desc,
2615  const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags);
2616 
2676  const dnnl_memory_desc_t *src_layer_desc,
2677  const dnnl_memory_desc_t *src_iter_desc,
2678  const dnnl_memory_desc_t *src_iter_c_desc,
2679  const dnnl_memory_desc_t *weights_layer_desc,
2680  const dnnl_memory_desc_t *weights_iter_desc,
2681  const dnnl_memory_desc_t *weights_peephole_desc,
2682  const dnnl_memory_desc_t *bias_desc,
2683  const dnnl_memory_desc_t *dst_layer_desc,
2684  const dnnl_memory_desc_t *dst_iter_desc,
2685  const dnnl_memory_desc_t *dst_iter_c_desc, unsigned flags);
2686 
2767  const dnnl_memory_desc_t *src_layer_desc,
2768  const dnnl_memory_desc_t *src_iter_desc,
2769  const dnnl_memory_desc_t *src_iter_c_desc,
2770  const dnnl_memory_desc_t *weights_layer_desc,
2771  const dnnl_memory_desc_t *weights_iter_desc,
2772  const dnnl_memory_desc_t *bias_desc,
2773  const dnnl_memory_desc_t *dst_layer_desc,
2774  const dnnl_memory_desc_t *dst_iter_desc,
2775  const dnnl_memory_desc_t *dst_iter_c_desc,
2776  const dnnl_memory_desc_t *diff_src_layer_desc,
2777  const dnnl_memory_desc_t *diff_src_iter_desc,
2778  const dnnl_memory_desc_t *diff_src_iter_c_desc,
2779  const dnnl_memory_desc_t *diff_weights_layer_desc,
2780  const dnnl_memory_desc_t *diff_weights_iter_desc,
2781  const dnnl_memory_desc_t *diff_bias_desc,
2782  const dnnl_memory_desc_t *diff_dst_layer_desc,
2783  const dnnl_memory_desc_t *diff_dst_iter_desc,
2784  const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags);
2785 
2875  dnnl_rnn_direction_t direction,
2876  const dnnl_memory_desc_t *src_layer_desc,
2877  const dnnl_memory_desc_t *src_iter_desc,
2878  const dnnl_memory_desc_t *src_iter_c_desc,
2879  const dnnl_memory_desc_t *weights_layer_desc,
2880  const dnnl_memory_desc_t *weights_iter_desc,
2881  const dnnl_memory_desc_t *weights_peephole_desc,
2882  const dnnl_memory_desc_t *bias_desc,
2883  const dnnl_memory_desc_t *dst_layer_desc,
2884  const dnnl_memory_desc_t *dst_iter_desc,
2885  const dnnl_memory_desc_t *dst_iter_c_desc,
2886  const dnnl_memory_desc_t *diff_src_layer_desc,
2887  const dnnl_memory_desc_t *diff_src_iter_desc,
2888  const dnnl_memory_desc_t *diff_src_iter_c_desc,
2889  const dnnl_memory_desc_t *diff_weights_layer_desc,
2890  const dnnl_memory_desc_t *diff_weights_iter_desc,
2891  const dnnl_memory_desc_t *diff_weights_peephole_desc,
2892  const dnnl_memory_desc_t *diff_bias_desc,
2893  const dnnl_memory_desc_t *diff_dst_layer_desc,
2894  const dnnl_memory_desc_t *diff_dst_iter_desc,
2895  const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags);
2896 
2944  const dnnl_memory_desc_t *src_layer_desc,
2945  const dnnl_memory_desc_t *src_iter_desc,
2946  const dnnl_memory_desc_t *weights_layer_desc,
2947  const dnnl_memory_desc_t *weights_iter_desc,
2948  const dnnl_memory_desc_t *bias_desc,
2949  const dnnl_memory_desc_t *dst_layer_desc,
2950  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags);
2951 
3015  const dnnl_memory_desc_t *src_layer_desc,
3016  const dnnl_memory_desc_t *src_iter_desc,
3017  const dnnl_memory_desc_t *weights_layer_desc,
3018  const dnnl_memory_desc_t *weights_iter_desc,
3019  const dnnl_memory_desc_t *bias_desc,
3020  const dnnl_memory_desc_t *dst_layer_desc,
3021  const dnnl_memory_desc_t *dst_iter_desc,
3022  const dnnl_memory_desc_t *diff_src_layer_desc,
3023  const dnnl_memory_desc_t *diff_src_iter_desc,
3024  const dnnl_memory_desc_t *diff_weights_layer_desc,
3025  const dnnl_memory_desc_t *diff_weights_iter_desc,
3026  const dnnl_memory_desc_t *diff_bias_desc,
3027  const dnnl_memory_desc_t *diff_dst_layer_desc,
3028  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags);
3029 
3073  const dnnl_memory_desc_t *src_layer_desc,
3074  const dnnl_memory_desc_t *src_iter_desc,
3075  const dnnl_memory_desc_t *weights_layer_desc,
3076  const dnnl_memory_desc_t *weights_iter_desc,
3077  const dnnl_memory_desc_t *bias_desc,
3078  const dnnl_memory_desc_t *dst_layer_desc,
3079  const dnnl_memory_desc_t *dst_iter_desc, unsigned flags);
3080 
3144  dnnl_rnn_direction_t direction,
3145  const dnnl_memory_desc_t *src_layer_desc,
3146  const dnnl_memory_desc_t *src_iter_desc,
3147  const dnnl_memory_desc_t *weights_layer_desc,
3148  const dnnl_memory_desc_t *weights_iter_desc,
3149  const dnnl_memory_desc_t *bias_desc,
3150  const dnnl_memory_desc_t *dst_layer_desc,
3151  const dnnl_memory_desc_t *dst_iter_desc,
3152  const dnnl_memory_desc_t *diff_src_layer_desc,
3153  const dnnl_memory_desc_t *diff_src_iter_desc,
3154  const dnnl_memory_desc_t *diff_weights_layer_desc,
3155  const dnnl_memory_desc_t *diff_weights_iter_desc,
3156  const dnnl_memory_desc_t *diff_bias_desc,
3157  const dnnl_memory_desc_t *diff_dst_layer_desc,
3158  const dnnl_memory_desc_t *diff_dst_iter_desc, unsigned flags);
3159 
3161 
3164 
3185  const dnnl_memory_desc_t *src_desc,
3186  const dnnl_memory_desc_t *weights_desc,
3187  const dnnl_memory_desc_t *bias_desc,
3188  const dnnl_memory_desc_t *dst_desc);
3189 
3191 
3194 
3220  dnnl_alg_kind_t alg_kind, const float *factors,
3221  const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc);
3222 
3241  dnnl_resampling_desc_t *resampling_desc, dnnl_alg_kind_t alg_kind,
3242  const float *factors, const dnnl_memory_desc_t *diff_src_desc,
3243  const dnnl_memory_desc_t *diff_dst_desc);
3244 
3246 
3248 
3251 
3256 size_t DNNL_API dnnl_engine_get_count(dnnl_engine_kind_t kind);
3257 
3267  dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index);
3268 
3269 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL
3279  dnnl_engine_kind_t kind, cl_device_id device, cl_context context);
3280 #endif
3281 
3289  dnnl_engine_t engine, dnnl_engine_kind_t *kind);
3290 
3291 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL
3299  dnnl_engine_t engine, cl_context *context);
3300 
3308  dnnl_engine_t engine, cl_device_id *device);
3309 #endif
3310 
3317 
3319 
3322 
3325  dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags);
3326 
3327 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL
3337  dnnl_stream_t *stream, dnnl_engine_t engine, cl_command_queue queue);
3338 
3346  dnnl_stream_t stream, cl_command_queue *queue);
3347 #endif
3348 
3355 
3362 
3364 
3367 
3381 dnnl_status_t DNNL_API dnnl_set_verbose(int level);
3382 
3392 dnnl_status_t DNNL_API dnnl_set_jit_dump(int enable);
3393 
3400 const dnnl_version_t DNNL_API *dnnl_version();
3401 
3425 dnnl_status_t DNNL_API dnnl_set_jit_profiling_flags(unsigned flags);
3426 
3450 dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char *dir);
3451 
3481 
3483 
3486 
3527 dnnl_status_t DNNL_API dnnl_sgemm(char transa, char transb, dnnl_dim_t M,
3528  dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda,
3529  const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc);
3530 
3594 dnnl_status_t DNNL_API dnnl_gemm_u8s8s32(char transa, char transb, char offsetc,
3595  dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A,
3596  dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo,
3597  float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co);
3598 
3662 dnnl_status_t DNNL_API dnnl_gemm_s8s8s32(char transa, char transb, char offsetc,
3663  dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A,
3664  dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo,
3665  float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co);
3667 
3669 
3670 #ifdef __cplusplus
3671 }
3672 #endif
3673 
3674 #endif
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:436
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:1439
dnnl_primitive_kind_t
Kinds of primitives.
Definition: dnnl_types.h:667
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.
C API types definitions.
const void * const_dnnl_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: dnnl_types.h:1075
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:1595
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&#39;s data handle.
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:1244
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-up.
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.
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 a memory object&#39;s data handle.
dnnl_status_t DNNL_API dnnl_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags)
Creates an execution stream for engine and with flags.
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 to the previously mapped 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:1543
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:1939
A descriptor of a binary operation.
Definition: dnnl_types.h:1517
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:2047
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:1087
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:1649
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.
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:1162
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:1214
An opaque structure for a chain of post operations.
A descriptor of an inner product operation.
Definition: dnnl_types.h:1383
dnnl_rnn_direction_t
A direction of RNN primitive execution.
Definition: dnnl_types.h:1423
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_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:897
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_engine_get_ocl_context(dnnl_engine_t engine, cl_context *context)
Returns the OpenCL context associated with an engine.
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_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 pointer to a host-side buffer with a copy of its contents...
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.
const dnnl_version_t DNNL_API * dnnl_version()
Returns library version information.
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:1140
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 DNNL 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:1346
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_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_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:1003
dnnl_status_t DNNL_API dnnl_engine_get_ocl_device(dnnl_engine_t engine, cl_device_id *device)
Returns the OpenCL device associated with an engine.
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_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.
dnnl_status_t DNNL_API dnnl_memory_get_ocl_mem_object(const_dnnl_memory_t memory, cl_mem *mem_object)
Returns an OpenCL memory object associated with a memory object.
A structure that contains an index and a memory object, and is used to pass arguments to dnnl_primiti...
Definition: dnnl_types.h:1900
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_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_stream_create_ocl(dnnl_stream_t *stream, dnnl_engine_t engine, cl_command_queue queue)
Creates an execution stream for a given engine associated with an OpenCL command queue.
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_alg_kind_t
Kinds of algorithms.
Definition: dnnl_types.h:711
dnnl_status_t DNNL_API dnnl_memory_set_ocl_mem_object(dnnl_memory_t memory, cl_mem mem_object)
Sets OpenCL memory object associated with a memory object.
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:1282
dnnl_dim_t dnnl_dims_t[DNNL_MAX_NDIMS]
A type to describe tensor dimensions.
Definition: dnnl_types.h:900
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_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:1313
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_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:1565
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_prop_kind_t
Kinds of propagation.
Definition: dnnl_types.h:640
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_stream_get_ocl_command_queue(dnnl_stream_t stream, cl_command_queue *queue)
Returns the OpenCL command queue associated with 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.
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_status_t DNNL_API dnnl_engine_create_ocl(dnnl_engine_t *engine, dnnl_engine_kind_t kind, cl_device_id device, cl_context context)
Creates an engine associated with an OpenCL device and an OpenCL context.
dnnl_cpu_isa_t
CPU instruction set flags.
Definition: dnnl_types.h:2077
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.