Deep Neural Network Library (DNNL)  1.1.3
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 for given op_desc, attr, engine, and optionally a hint primitive descriptor from forward propagation (required for backward propagation). More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_next (dnnl_primitive_desc_iterator_t iterator)
 Iterates over primitive descriptors. More...
 
dnnl_primitive_desc_t DNNL_API dnnl_primitive_desc_iterator_fetch (const_dnnl_primitive_desc_iterator_t iterator)
 Fetches the current primitive descriptor. More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy (dnnl_primitive_desc_iterator_t iterator)
 Deletes a primitive descriptor iterator.
 
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_desc using op_desc, attr, engine, and optionally a hint primitive descriptor from forward propagation. More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_clone (dnnl_primitive_desc_t *primitive_desc, const_dnnl_primitive_desc_t existing_primitive_desc)
 Makes a copy of a primitive_desc.
 
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 attribute of a primitive_desc. More...
 
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy (dnnl_primitive_desc_t primitive_desc)
 Deletes a primitive_desc.
 
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 primitive descriptor. 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 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 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 using a primitive_desc descriptor.
 
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 using a stream, and nargs arguments args. 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 reference to the primitive_desc descriptor of given primitive. More...
 
dnnl_status_t DNNL_API dnnl_primitive_destroy (dnnl_primitive_t primitive)
 Deletes a primitive.
 
dnnl_status_t DNNL_API dnnl_primitive_attr_create (dnnl_primitive_attr_t *attr)
 Creates an empty (default) attr attribute. More...
 
dnnl_status_t DNNL_API dnnl_primitive_attr_clone (dnnl_primitive_attr_t *attr, const_dnnl_primitive_attr_t existing_attr)
 Makes a copy of an existing_attr.
 
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy (dnnl_primitive_attr_t attr)
 Deletes an attr.
 
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scratchpad_mode (const_dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t *mode)
 Returns the scratchpad mode set in the attribute attr.
 
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scratchpad_mode (dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t mode)
 Sets 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 count, correspondence scale mask, and a pointer to a constant floating point array of output scales for given attr, previously set by dnnl_primitive_attr_set_output_scales. 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 scales for primitive operations. 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 post_ops for given attr. 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 configured post_ops to an attribute attr for future use (when primitive descriptor is being created). More...
 
dnnl_status_t DNNL_API dnnl_post_ops_create (dnnl_post_ops_t *post_ops)
 Creates an empty sequence of post operations post_ops.
 
dnnl_status_t DNNL_API dnnl_post_ops_destroy (dnnl_post_ops_t post_ops)
 Deletes a post_ops sequence.
 
int DNNL_API dnnl_post_ops_len (const_dnnl_post_ops_t post_ops)
 Returns the length of post operations for given post_ops.
 
dnnl_primitive_kind_t DNNL_API dnnl_post_ops_get_kind (const_dnnl_post_ops_t post_ops, int index)
 Returns the kind of post operation with index index in given post_ops. More...
 
dnnl_status_t DNNL_API dnnl_post_ops_append_sum (dnnl_post_ops_t post_ops, float scale)
 Appends accumulation (sum) post operation to the 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)
 Gets the parameters of the accumulation (sum) post operation with index index in the sequence of post_ops. More...
 
dnnl_status_t DNNL_API dnnl_post_ops_append_eltwise (dnnl_post_ops_t post_ops, float scale, dnnl_alg_kind_t alg, float alpha, float beta)
 Appends eltwise post operation to the post_ops with given parameters kind, alpha, and beta (. 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, float *alpha, float *beta)
 Gets the eltwise parameters of the post operation with index index in the sequence of post_ops. 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_desc memory descriptor using ndims, dims, data_type, 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_desc memory descriptor using ndims, dims, data_type, and 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_desc for a given parent_memory_desc, with dims sizes and offsets. 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 an out_memory_desc with new ndims and dims from a in_memory_desc. 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 (in bytes) that is required for given memory_desc.
 
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 for given memory_desc and engine. More...
 
dnnl_status_t DNNL_API dnnl_memory_get_memory_desc (const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc)
 Returns a memory_desc associated with memory.
 
dnnl_status_t DNNL_API dnnl_memory_get_engine (const_dnnl_memory_t memory, dnnl_engine_t *engine)
 Returns an engine associated with memory.
 
dnnl_status_t DNNL_API dnnl_memory_map_data (const_dnnl_memory_t memory, void **mapped_ptr)
 For a memory, maps the data of the memory to mapped_ptr. More...
 
dnnl_status_t DNNL_API dnnl_memory_unmap_data (const_dnnl_memory_t memory, void *mapped_ptr)
 For a memory, unmaps a mapped pointer to the data of the memory. More...
 
dnnl_status_t DNNL_API dnnl_memory_get_data_handle (const_dnnl_memory_t memory, void **handle)
 For a memory, returns the data handle. More...
 
dnnl_status_t DNNL_API dnnl_memory_set_data_handle (dnnl_memory_t memory, void *handle)
 For a memory, sets the data handle.
 
dnnl_status_t DNNL_API dnnl_memory_get_ocl_mem_object (const_dnnl_memory_t memory, cl_mem *mem_object)
 For a memory returns the OpenCL memory object associated with it.
 
dnnl_status_t DNNL_API dnnl_memory_set_ocl_mem_object (dnnl_memory_t memory, cl_mem mem_object)
 For a memory sets the OpenCL memory object associated with it.
 
dnnl_status_t DNNL_API dnnl_memory_destroy (dnnl_memory_t memory)
 Deletes a memory.
 
dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create (dnnl_primitive_desc_t *reorder_primitive_desc, const dnnl_memory_desc_t *src_md, dnnl_engine_t src_engine, const dnnl_memory_desc_t *dst_md, dnnl_engine_t dst_engine, const_dnnl_primitive_attr_t attr)
 Initializes a reorder_primitive_desc using the description of the source (src_engine and src_md) and destination (dst_engine and dst_md) memory, and an attr attribute. More...
 
dnnl_status_t DNNL_API dnnl_concat_primitive_desc_create (dnnl_primitive_desc_t *concat_primitive_desc, const dnnl_memory_desc_t *dst_md, int n, int concat_dimension, const dnnl_memory_desc_t *src_mds, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
 Creates out-of-place concat_primitive_desc for concatenation of n inputs by concat_dimension with resulting output_desc memory descriptor. More...
 
dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create (dnnl_primitive_desc_t *sum_primitive_desc, const dnnl_memory_desc_t *dst_mds, int n, const float *scales, const dnnl_memory_desc_t *src_mds, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
 Creates out-of-place sum_primitive_desc for sum of n inputs multiplied by scale with resulting output_desc memory descriptor. 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 binary descriptor binary_desc, alg_kind (possible values are dnnl_binary_add and dnnl_binary_mul), and memory descriptors. 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 convolution descriptor conv_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptors, strides, padding_l, and padding_r. 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 dilated convolution descriptor conv_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptors, strides, dilates, padding_l, and padding_r. 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 convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, padding_l, and padding_r. 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 dilated convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, dilates padding_l, and padding_r. 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 convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, padding_l, and padding_r. 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 convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, dilates padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_deconvolution_forward_desc_init (dnnl_deconvolution_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 deconvolution descriptor deconv_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptors, strides, padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_forward_desc_init (dnnl_deconvolution_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 dilated deconvolution descriptor deconv_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptors, strides, dilates, padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_deconvolution_backward_data_desc_init (dnnl_deconvolution_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 deconvolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_data_desc_init (dnnl_deconvolution_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 dilated deconvolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, dilates, padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_deconvolution_backward_weights_desc_init (dnnl_deconvolution_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 deconvolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, padding_l, and padding_r. More...
 
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_weights_desc_init (dnnl_deconvolution_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 dilated deconvolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, dilates, padding_l, and padding_r. 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 shuffle_desc for forward propagation using prop_kind, memory descriptor data_desc, axis, and group_size. 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 shuffle_desc for backward propagation using memory descriptor diff_data_desc, axis, and group_size. 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 an eltwise_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind algorithm, memory descriptor data_desc, alpha, and beta parameters. 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 an eltwise_desc for backward propagation using alg_kind algorithm memory descriptors diff_data_desc and data_desc, and the alpha and beta parameters. 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 softmax_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference) and memory descriptor data_desc. More...
 
dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init (dnnl_softmax_desc_t *softmax_desc, const dnnl_memory_desc_t *diff_desc, const dnnl_memory_desc_t *data_desc, int softmax_axis)
 Initializes a softmax_desc for backward propagation using memory descriptors diff_desc and data_desc. 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 pooling descriptor pool_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptors, and pooling parameters in the spatial domain: strides, kernel sizes, padding_l, and padding_r. 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 pooling descriptor pool_desc for backward propagation using alg_kind, memory descriptors, and pooling parameters in the spatial domain: strides, kernel sizes, padding_l, and padding_r. 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 an lrn_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), alg_kind, memory descriptor data_desc, and regularization parameters local_size, alpha, beta, and k. 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 an lrn_desc for backward propagation using alg_kind, memory descriptors data_desc and diff_data_desc, and regularization parameters local_size, alpha, beta, and k. 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 batch normalization descriptor bnrm_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), memory descriptor data_desc, normalization parameter epsilon, and flags set using bit flags of type dnnl_batch_normalization_desc_t. 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 batch normalization descriptor bnrm_desc for backward propagation with respect to data and scale-shift parameters using memory descriptors data_desc and diff_data_desc, normalization parameter epsilon, and flags set using bit flags of type dnnl_batch_normalization_desc_t. 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 layer normalization descriptor lnrm_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference), memory descriptor data_desc, normalization parameter epsilon, and flags set using bit flags of type dnnl_layer_normalization_desc_t. 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 layer normalization descriptor lnrm_desc for backward propagation with respect to data and scale-shift parameters using memory descriptors data_desc and diff_data_desc, normalization parameter epsilon, and flags set using bit flags of type dnnl_layer_normalization_desc_t. 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 an inner product descriptor ip_desc for forward propagation using prop_kind (possible values are dnnl_forward_training and dnnl_forward_inference) and memory descriptors. 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 an inner product descriptor ip_desc for backward propagation with respect to data using memory descriptors. 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 an inner product descriptor ip_desc for backward propagation with respect to weights using memory descriptors. More...
 
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_data_qparams (dnnl_primitive_attr_t attr, const float scale, const float shift)
 Sets quantization scale and shift 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 *weights_scales)
 Sets quantization scales weights_scales 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 an RNN descriptor rnn_desc for forward propagation using prop_kind, activation, direction, and memory descriptors. 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 an RNN descriptor rnn_desc for backward propagation using prop_kind, activation, direction, and memory descriptors. 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 an LSTM descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors. 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 an LSTM descriptor rnn_desc for backward propagation using prop_kind, direction, and memory descriptors. 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 GRU descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors. 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 GRU descriptor rnn_desc for backward propagation using prop_kind, direction, and memory descriptors. 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 an LBR GRU descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors. 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 an LBR GRU descriptor rnn_desc for backward propagation using prop_kind, direction, and memory descriptors. More...
 
size_t DNNL_API dnnl_engine_get_count (dnnl_engine_kind_t kind)
 Returns the number of engines of a particular kind.
 
dnnl_status_t DNNL_API dnnl_engine_create (dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index)
 Creates an engine of particular kind and index.
 
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 of particular kind associated with a given OpenCL device and context objects. 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.
 
dnnl_status_t DNNL_API dnnl_engine_get_ocl_context (dnnl_engine_t engine, cl_context *context)
 Returns an OpenCL context associated with an engine.
 
dnnl_status_t DNNL_API dnnl_engine_get_ocl_device (dnnl_engine_t engine, cl_device_id *device)
 Returns an OpenCL device associated with an engine.
 
dnnl_status_t DNNL_API dnnl_engine_destroy (dnnl_engine_t engine)
 Destroys an engine.
 
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.
 
dnnl_status_t DNNL_API dnnl_stream_destroy (dnnl_stream_t stream)
 Destroys an execution stream.
 
dnnl_status_t DNNL_API dnnl_set_verbose (int level)
 Sets verbosity level (print information to stdout). More...
 
dnnl_status_t DNNL_API dnnl_set_jit_dump (int enable)
 Enables or disables dumping of JIT-generated code. More...
 
const dnnl_version_t DNNL_API * dnnl_version ()
 Gets library version information. 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)
 SGEMM performs a matrix-matrix multiplication operation defined as. 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)
 dnnl_gemm_u8s8s32() and dnnl_gemm_s8s8s32() perform a matrix-matrix multiplication operation and add the result to a scalar-matrix product. 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)
 dnnl_gemm_u8s8s32() and dnnl_gemm_s8s8s32() perform a matrix-matrix multiplication operation and add the result to a scalar-matrix product. More...
 

Detailed Description

C API.