Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)  0.21.0
Performance library for Deep Learning
Functions

A primitive to compute convolution using different algorithms. More...

Functions

mkldnn_status_t MKLDNN_API mkldnn_convolution_forward_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a convolution descriptor conv_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference), alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind. More...
 
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_forward_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a dilated convolution descriptor conv_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference), alg_kind, memory descriptors, strides, dilates, padding_l, padding_r, and padding_kind. More...
 
mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_data_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind. More...
 
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_data_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a dilated convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, dilates padding_l, padding_r, and padding_kind. More...
 
mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_weights_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind. More...
 
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_weights_desc_init (mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r, mkldnn_padding_kind_t padding_kind)
 Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, dilates padding_l, padding_r, and padding_kind. More...
 

Detailed Description

A primitive to compute convolution using different algorithms.

\[dst[n][oc][oh][ow] = \sum_{kw=0}^{KW}\sum_{kh=0}^{KH}\sum_{ic=0}^{IC} src[n][ic][oh \cdot s_h - p_l[0] + kh][ow \cdot s_w - p_r[1] + kw] \cdot weights[g][oc][ic][kh][kw] + bias[g][oc],\]

where size of output spatial domain is given by $ OH = \left\lfloor{\frac{IH - KH + p_l[0] + p_r[0]}{s_h}} \right\rfloor + 1$, $ OW = \left\lfloor{\frac{IW - KW + p_l[1] + p_r[1]}{s_w}} \right\rfloor + 1$,

and summation is carried over input channels $ic$ in group $g$, and $s_h, s_w$ are strides and $p_l, p_r$ are padding_l and padding_r.

Function Documentation

◆ mkldnn_convolution_forward_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_convolution_forward_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_prop_kind_t  prop_kind,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t bias_desc,
const mkldnn_memory_desc_t dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a convolution descriptor conv_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference), alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind.

In order to create a convolution without bias, bias_desc should either be NULL or point to a descriptor with memory format equal to mkldnn_format_undef.

Note
If padding_r is NULL, the padding is supposed to be symmetric.
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_dilated_convolution_forward_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_forward_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_prop_kind_t  prop_kind,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t bias_desc,
const mkldnn_memory_desc_t dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  dilates,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a dilated convolution descriptor conv_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference), alg_kind, memory descriptors, strides, dilates, padding_l, padding_r, and padding_kind.

In order to create a dilated convolution without bias, bias_desc should either be NULL or point to a descriptor with memory format equal to mkldnn_format_undef.

Note
If padding_r is NULL, the padding is supposed to be symmetric.
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_convolution_backward_data_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_data_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t diff_src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t diff_dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_dilated_convolution_backward_data_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_data_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t diff_src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t diff_dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  dilates,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a dilated convolution descriptor conv_desc for backward propagation with respect to data using alg_kind, memory descriptors, strides, dilates padding_l, padding_r, and padding_kind.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_convolution_backward_weights_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_weights_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t diff_weights_desc,
const mkldnn_memory_desc_t diff_bias_desc,
const mkldnn_memory_desc_t diff_dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, padding_l, padding_r, and padding_kind.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_dilated_convolution_backward_weights_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_weights_desc_init ( mkldnn_convolution_desc_t conv_desc,
mkldnn_alg_kind_t  alg_kind,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t diff_weights_desc,
const mkldnn_memory_desc_t diff_bias_desc,
const mkldnn_memory_desc_t diff_dst_desc,
const mkldnn_dims_t  strides,
const mkldnn_dims_t  dilates,
const mkldnn_dims_t  padding_l,
const mkldnn_dims_t  padding_r,
mkldnn_padding_kind_t  padding_kind 
)

Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using alg_kind, memory descriptors, strides, dilates padding_l, padding_r, and padding_kind.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs: