Classes | |
struct | mkldnn_version_t |
Version type. More... | |
enum mkldnn_status_t |
Status values returned by the library functions.
enum mkldnn_data_type_t |
Data type specification.
enum mkldnn_format_kind_t |
Memory format kind.
Enumerator | |
---|---|
mkldnn_format_kind_undef | Undefined memory format kind, used for empty memory descriptors. |
mkldnn_format_kind_any | Unspecified format kind. The primitive selects a format automatically. |
mkldnn_blocked | A tensor in a generic format described by the stride and blocking values in each dimension. See mkldnn_blocking_desc_t for more information. |
mkldnn_format_kind_wino | Weights format used in 8bit Winograd convolution. |
mkldnn_format_kind_rnn_packed | Packed weights format used in RNN. |
enum mkldnn_format_tag_t |
Memory format tag specification.
Intel MKL-DNN formats describe physical data layout. The physical layout is described as a sequence of the dimensions as they are laid out in the memory (from the outer-most to the inner-most). Note that this order doesn't affect the logical order of the dimensions that is kept in the dims
field of the mkldnn_memory_desc_t structure. The logical order of the dimensions is specified by the primitive that uses the tensor.
For example, CNN 5D tensor always has its logical dimensions in the order (batch, channels, depth, height, width)
, while the physical layout might be NCDHW
(corresponds to mkldnn_ncdhw format tag) or NDHWC
(corresponds to mkldnn_ndhwc format tag).
Memory format tags can be further divided into two categories:
a
to l
to denote logical dimension from 1 to 12, and form the order in which the dimensions are laid in memory. For instance, mkldnn_ab is used to denote 2D tensor where the second logical dimension (aka b
) is the innermost, i.e. has stride = 1, and the first logical dimension (a
) laid out in memory with stride equal to the size of second dimension. On the other hand, mkldnn_ba is just transposed version of the same tensor: the first dimension (a
) becomes the innermost one.a
), channels correspond to the second one (b
).The following domain-specific notation applies to memory format tags:
'n'
denotes the mini-batch dimension'c'
denotes a channels dimension'i'
and 'o'
denote dimensions of input and output channels'd'
, 'h'
, and 'w'
denote spatial depth, height, and width respectivelyUpper-case letters indicate that the data is laid out in blocks for a particular dimension. In such cases, the format name contains both upper- and lower-case letters for that dimension with a lower-case letter preceded by the block size. For example: mkldnn_nChw8c describes a format where the outermost dimension is mini-batch, followed by the channel block number, followed by the spatial height and width, and finally followed by 8-element channel blocks.
Enumerator | |
---|---|
mkldnn_format_tag_undef | Undefined memory format tag. |
mkldnn_format_tag_any | Undefined memory format tag. The primitive selects a format automatically. |
mkldnn_a | plain 1D tensor |
mkldnn_ab | plain 2D tensor |
mkldnn_abc | plain 3D tensor |
mkldnn_abcd | plain 4D tensor |
mkldnn_abcde | plain 5D tensor |
mkldnn_abcdef | plain 6D tensor |
mkldnn_abdec | permuted 5D tensor |
mkldnn_acb | permuted 3D tensor |
mkldnn_acbde | permuted 5D tensor |
mkldnn_acdb | permuted 4D tensor |
mkldnn_acdeb | permuted 5D tensor |
mkldnn_ba | permuted 2D tensor |
mkldnn_bac | permuted 3D tensor |
mkldnn_bacd | permuted 4D tensor |
mkldnn_bca | permuted 3D tensor |
mkldnn_bcda | permuted 4D tensor |
mkldnn_bcdea | permuted 5D tensor |
mkldnn_cba | permuted 3D tensor |
mkldnn_cdba | permuted 4D tensor |
mkldnn_cdeba | permuted 5D tensor |
mkldnn_decab | permuted 5D tensor |
mkldnn_aBc16b | 3D tensor blocked by 2nd dimension with block size 16 |
mkldnn_aBc4b | 3D tensor blocked by 2nd dimension with block size 4 |
mkldnn_aBc8b | 3D tensor blocked by 2nd dimension with block size 8 |
mkldnn_aBcd16b | 4D tensor blocked by 2nd dimension with block size 16 |
mkldnn_aBcd4b | 4D tensor blocked by 2nd dimension with block size 4 |
mkldnn_aBcd8b | 4D tensor blocked by 2nd dimension with block size 8 |
mkldnn_ABcd8b8a | 4D tensor blocked by 1st and 2nd dimension with block size 8 |
mkldnn_aBcde16b | 5D tensor blocked by 2nd dimension with block size 16 |
mkldnn_aBcde4b | 5D tensor blocked by 2nd dimension with block size 4 |
mkldnn_aBcde8b | 5D tensor blocked by 2nd dimension with block size 8 |
mkldnn_aBcdef16b | 6D tensor blocked by 2nd dimension with block size 16 |
mkldnn_aBcdef4b | 6D tensor blocked by 2nd dimension with block size 4 |
mkldnn_format_tag_last | Just a sentinel, not real memory format tag. Must be changed after new format tag is added. |
mkldnn_x | 1D tensor, an alias to mkldnn_a |
mkldnn_nc | 2D CNN activations tensor, an alias to mkldnn_ab |
mkldnn_cn | 2D CNN activations tensor, an alias to mkldnn_ba |
mkldnn_ncw | 3D CNN activations tensor, an alias to mkldnn_abc |
mkldnn_nwc | 3D CNN activations tensor, an alias to mkldnn_acb |
mkldnn_nchw | 4D CNN activations tensor, an alias to mkldnn_abcd |
mkldnn_nhwc | 4D CNN activations tensor, an alias to mkldnn_acdb |
mkldnn_chwn | 4D CNN activations tensor, an alias to mkldnn_bcda |
mkldnn_ncdhw | 5D CNN activations tensor, an alias to mkldnn_abcde |
mkldnn_ndhwc | 5D CNN activations tensor, an alias to mkldnn_acdeb |
mkldnn_oi | 2D CNN weights tensor, an alias to mkldnn_ab |
mkldnn_io | 2D CNN weights tensor, an alias to mkldnn_ba |
mkldnn_oiw | 3D CNN weights tensor, an alias to mkldnn_abc |
mkldnn_owi | 3D CNN weights tensor, an alias to mkldnn_acb |
mkldnn_wio | 3D CNN weights tensor, an alias to mkldnn_cba |
mkldnn_iwo | 3D CNN weights tensor, an alias to mkldnn_bca |
mkldnn_oihw | 4D CNN weights tensor, an alias to mkldnn_abcd |
mkldnn_hwio | 4D CNN weights tensor, an alias to mkldnn_cdba |
mkldnn_ohwi | 4D CNN weights tensor, an alias to mkldnn_acdb |
mkldnn_ihwo | 4D CNN weights tensor, an alias to mkldnn_bcda |
mkldnn_iohw | 4D CNN weights tensor, an alias to mkldnn_bacd |
mkldnn_oidhw | 5D CNN weights tensor, an alias to mkldnn_abcde |
mkldnn_dhwio | 5D CNN weights tensor, an alias to mkldnn_cdeba |
mkldnn_odhwi | 5D CNN weights tensor, an alias to mkldnn_acdeb |
mkldnn_idhwo | 5D CNN weights tensor, an alias to mkldnn_bcdea |
mkldnn_goiw | 4D CNN weights tensor (incl. groups), an alias to mkldnn_abcd |
mkldnn_goihw | 5D CNN weights tensor (incl. groups), an alias to mkldnn_abcde |
mkldnn_hwigo | 5D CNN weights tensor (incl. groups), an alias to mkldnn_decab |
mkldnn_giohw | 5D CNN weights tensor (incl. groups), an alias to mkldnn_acbde |
mkldnn_goidhw | 6D CNN weights tensor (incl. groups), an alias to mkldnn_abcdef |
mkldnn_tnc | 3D RNN data tensor in the format (seq_length, batch, input channels). |
mkldnn_ntc | 3D RNN data tensor in the format (batch, seq_length, input channels). |
mkldnn_ldnc | 4D RNN states tensor in the format (num_layers, num_directions, batch, state channels). |
mkldnn_ldigo | 5D RNN weights tensor in the format (num_layers, num_directions, input_channels, num_gates, output_channels).
|
mkldnn_ldgoi | 5D RNN weights tensor in the format (num_layers, num_directions, num_gates, output_channels, input_channels).
|
mkldnn_ldgo | 4D RNN bias tensor in the format (num_layers, num_directions, num_gates, output_channels).
|
mkldnn_nCdhw16c | 5D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBcde16b |
mkldnn_nCdhw4c | 5D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBcde4b |
mkldnn_nCdhw8c | 5D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBcde8b |
mkldnn_nChw16c | 4D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBcd16b |
mkldnn_nChw4c | 4D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBcd4b |
mkldnn_nChw8c | 4D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBcd8b |
mkldnn_nCw16c | 3D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBc16b |
mkldnn_nCw4c | 3D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBc4b |
mkldnn_nCw8c | 3D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBc8b |
enum mkldnn_prop_kind_t |
Kinds of propagation.
Kinds of primitives.
Used to implement a way to extend the library with new primitives without changing the ABI.
enum mkldnn_alg_kind_t |
Kinds of algorithms.
Enumerator | |
---|---|
mkldnn_convolution_direct | Direct convolution. |
mkldnn_convolution_winograd | Winograd convolution. |
mkldnn_convolution_auto | Convolution algorithm(either direct or Winograd) is chosen just in time. |
mkldnn_deconvolution_direct | Direct deconvolution. |
mkldnn_deconvolution_winograd | Winograd deconvolution. |
mkldnn_eltwise_relu | Eltwise: ReLU. |
mkldnn_eltwise_tanh | Eltwise: hyperbolic tangent non-linearity (tanh) |
mkldnn_eltwise_elu | Eltwise: parametric exponential linear unit (elu) |
mkldnn_eltwise_square | Eltwise: square. |
mkldnn_eltwise_abs | Eltwise: abs. |
mkldnn_eltwise_sqrt | Eltwise: square root. |
mkldnn_eltwise_linear | Eltwise: linear. |
mkldnn_eltwise_bounded_relu | Eltwise: bounded_relu. |
mkldnn_eltwise_soft_relu | Eltwise: soft_relu. |
mkldnn_eltwise_logistic | Eltwise: logistic. |
mkldnn_eltwise_exp | Eltwise: exponent. |
mkldnn_eltwise_gelu | Eltwise: gelu.
|
mkldnn_pooling_max | Max pooling. |
mkldnn_pooling_avg_include_padding | Average pooling include padding. |
mkldnn_pooling_avg_exclude_padding | Average pooling exclude padding. |
mkldnn_lrn_across_channels | Local response normalization (LRN) across multiple channels. |
mkldnn_lrn_within_channel | LRN within a single channel. |
mkldnn_vanilla_rnn | RNN cell. |
mkldnn_vanilla_lstm | LSTM cell. |
mkldnn_vanilla_gru | GRU cell. |
mkldnn_lbr_gru | GRU cell with linear before reset. Modification of original GRU cell. Differs from mkldnn_vanilla_gru in how the new memory gate is calculated: \[ c_t = tanh(W_c*x_t + b_{c_x} + r_t*(U_c*h_{t-1}+b_{c_h})) \] Primitive expects 4 biases on input: \([b_{u}, b_{r}, b_{c_x}, b_{c_h}]\) |
Flags for batch normalization primitive.
Enumerator | |
---|---|
mkldnn_use_global_stats | Use global statistics. If specified
If not specified:
|
mkldnn_use_scaleshift | Use scale and shift parameters. If specified:
If no specified:
|
mkldnn_fuse_norm_relu | Fuse with ReLU. If specified:
|