Deep Neural Network Library (DNNL)  1.3.0
Performance library for Deep Learning
Functions
dnnl.h File Reference

C API. More...

#include "dnnl_config.h"
#include "dnnl_types.h"
#include "dnnl_version.h"

Go to the source code of this file.

Functions

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. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy (dnnl_primitive_desc_iterator_t iterator)
 Destroys a primitive descriptor iterator. More...
 
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. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy (dnnl_primitive_desc_t primitive_desc)
 Destroys a primitive descriptor. More...
 
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. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_primitive_create (dnnl_primitive_t *primitive, const_dnnl_primitive_desc_t primitive_desc)
 Creates a primitive. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_primitive_destroy (dnnl_primitive_t primitive)
 Destroys a primitive. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_primitive_attr_clone (dnnl_primitive_attr_t *attr, const_dnnl_primitive_attr_t existing_attr)
 Clones primitive attributes. More...
 
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy (dnnl_primitive_attr_t attr)
 Destroys primitive attributes. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 argument. More...
 
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. More...
 
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_points for given attr and memory argument (index), previously set by dnnl_primitive_attr_set_zero_points. More...
 
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. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_post_ops_create (dnnl_post_ops_t *post_ops)
 Creates empty post-ops sequence. More...
 
dnnl_status_t DNNL_API dnnl_post_ops_destroy (dnnl_post_ops_t post_ops)
 Destroys post-ops. More...
 
int DNNL_API dnnl_post_ops_len (const_dnnl_post_ops_t post_ops)
 Returns the length of post-ops. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 descriptor. More...
 
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. More...
 
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. More...
 
int DNNL_API dnnl_memory_desc_equal (const dnnl_memory_desc_t *lhs, const dnnl_memory_desc_t *rhs)
 Compares two memory descriptors. More...
 
size_t DNNL_API dnnl_memory_desc_get_size (const dnnl_memory_desc_t *memory_desc)
 Returns the size of a memory descriptor. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_memory_get_data_handle (const_dnnl_memory_t memory, void **handle)
 Returns memory object's data handle. More...
 
dnnl_status_t DNNL_API dnnl_memory_set_data_handle (dnnl_memory_t memory, void *handle)
 Sets a memory object's data handle. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_memory_destroy (dnnl_memory_t memory)
 Destroys a memory object. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
size_t DNNL_API dnnl_engine_get_count (dnnl_engine_kind_t kind)
 Returns the number of engines of a particular kind. More...
 
dnnl_status_t DNNL_API dnnl_engine_create (dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index)
 Creates an engine. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_engine_get_kind (dnnl_engine_t engine, dnnl_engine_kind_t *kind)
 Returns the kind of an engine. More...
 
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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_engine_destroy (dnnl_engine_t engine)
 Destroys an engine. More...
 
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_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. More...
 
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. More...
 
dnnl_status_t DNNL_API dnnl_stream_wait (dnnl_stream_t stream)
 Waits for all primitives in the execution stream to finish computations. More...
 
dnnl_status_t DNNL_API dnnl_stream_destroy (dnnl_stream_t stream)
 Destroys an execution stream. More...
 
dnnl_status_t DNNL_API dnnl_set_verbose (int level)
 Configures verbose output to stdout. More...
 
dnnl_status_t DNNL_API dnnl_set_jit_dump (int enable)
 Configures dumping of JIT-generated code. More...
 
const dnnl_version_t DNNL_API * dnnl_version ()
 Returns library version information. More...
 
dnnl_status_t DNNL_API dnnl_set_jit_profiling_flags (unsigned flags)
 Sets library profiling flags. More...
 
dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir (const char *dir)
 Sets JIT dump output path. More...
 
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. More...
 
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. More...
 
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, and 32-bit signed resulting matrix C. More...
 
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, and 32-bit signed resulting matrix C. More...
 

Detailed Description

C API.