Deep Neural Network Library (DNNL)  1.1.3
Performance library for Deep Learning
Classes | Macros | Typedefs | Enumerations
dnnl_types.h File Reference

C API types definitions. More...

Go to the source code of this file.

Classes

struct  dnnl_version_t
 Version type. More...
 
struct  dnnl_blocking_desc_t
 Generic description of blocked data layout for most memory formats. More...
 
struct  dnnl_wino_desc_t
 Description of tensor of weights for winograd 2x3 convolution. More...
 
struct  dnnl_rnn_packed_desc_t
 Description of tensor of packed weights for rnn. More...
 
struct  dnnl_memory_extra_desc_t
 Description of extra information stored in memory. More...
 
struct  dnnl_memory_desc_t
 Memory descriptor. More...
 
struct  dnnl_convolution_desc_t
 A descriptor of a convolution operation. More...
 
struct  dnnl_shuffle_desc_t
 A descriptor of a shuffle operation. More...
 
struct  dnnl_eltwise_desc_t
 A descriptor of a element-wise operation. More...
 
struct  dnnl_softmax_desc_t
 A descriptor of a Softmax operation. More...
 
struct  dnnl_pooling_desc_t
 A descriptor of a pooling operation. More...
 
struct  dnnl_lrn_desc_t
 A descriptor of a Local Response Normalization (LRN) operation. More...
 
struct  dnnl_batch_normalization_desc_t
 A descriptor of a Batch Normalization operation. More...
 
struct  dnnl_layer_normalization_desc_t
 A descriptor of a Layer Normalization operation. More...
 
struct  dnnl_inner_product_desc_t
 A descriptor of an inner product operation. More...
 
struct  dnnl_rnn_desc_t
 A descriptor for an RNN operation. More...
 
struct  dnnl_binary_desc_t
 A descriptor of a binary operation. More...
 
struct  dnnl_exec_arg_t
 An auxiliary structure to specify primitive's inputs/outputs at execution. More...
 

Macros

#define DNNL_MAX_NDIMS   12
 Maximum number of dimensions a tensor can have. More...
 
#define DNNL_RNN_MAX_N_PARTS   4
 Maximum number of parts of RNN weights tensor that require separate computation. More...
 

Typedefs

typedef int64_t dnnl_dim_t
 A type to describe tensor dimension.
 
typedef dnnl_dim_t dnnl_dims_t[DNNL_MAX_NDIMS]
 A type to describe tensor dimensions.
 
typedef struct dnnl_memorydnnl_memory_t
 A memory handle.
 
typedef const struct dnnl_memoryconst_dnnl_memory_t
 A constant memory handle.
 
typedef void * dnnl_op_desc_t
 A pointer to any of the operation descriptors.
 
typedef const void * const_dnnl_op_desc_t
 A pointer to any of the operation descriptors (constant variant).
 
typedef dnnl_convolution_desc_t dnnl_deconvolution_desc_t
 A descriptor of a deconvolution operation.
 
typedef struct dnnl_enginednnl_engine_t
 An engine handle.
 
typedef struct dnnl_primitive_desc_iteratordnnl_primitive_desc_iterator_t
 A primitive descriptor iterator handle.
 
typedef const struct dnnl_primitive_desc_iteratorconst_dnnl_primitive_desc_iterator_t
 A constant primitive descriptor iterator handle.
 
typedef struct dnnl_primitive_descdnnl_primitive_desc_t
 A primitive descriptor handle.
 
typedef const struct dnnl_primitive_descconst_dnnl_primitive_desc_t
 A constant primitive descriptor handle.
 
typedef struct dnnl_primitive_attrdnnl_primitive_attr_t
 A primitive descriptor attributes handle that controls primitive behavior. More...
 
typedef const struct dnnl_primitive_attrconst_dnnl_primitive_attr_t
 A constant primitive descriptor attributes handle.
 
typedef struct dnnl_post_opsdnnl_post_ops_t
 A post operation chain handle.
 
typedef const struct dnnl_post_opsconst_dnnl_post_ops_t
 A constant post operation chain handle.
 
typedef struct dnnl_primitivednnl_primitive_t
 A primitive handle.
 
typedef const struct dnnl_primitiveconst_dnnl_primitive_t
 A constant primitive handle.
 
typedef struct dnnl_streamdnnl_stream_t
 An execution stream handle.
 
typedef const struct dnnl_streamconst_dnnl_stream_t
 A constant execution stream handle.
 

Enumerations

enum  dnnl_status_t {
  dnnl_success = 0, dnnl_out_of_memory = 1, dnnl_invalid_arguments = 2, dnnl_unimplemented = 3,
  dnnl_iterator_ends = 4, dnnl_runtime_error = 5, dnnl_not_required = 6
}
 Status values returned by the library functions. More...
 
enum  dnnl_data_type_t {
  dnnl_data_type_undef = 0, dnnl_f16 = 1, dnnl_bf16 = 2, dnnl_f32 = 3,
  dnnl_s32 = 4, dnnl_s8 = 5, dnnl_u8 = 6
}
 Data type specification. More...
 
enum  dnnl_format_kind_t {
  dnnl_format_kind_undef = 0, dnnl_format_kind_any, dnnl_blocked, dnnl_format_kind_wino,
  dnnl_format_kind_rnn_packed
}
 Memory format kind. More...
 
enum  dnnl_format_tag_t {
  dnnl_format_tag_undef = 0, dnnl_format_tag_any, dnnl_a, dnnl_ab,
  dnnl_abc, dnnl_abcd, dnnl_abcde, dnnl_abcdef,
  dnnl_abdec, dnnl_acb, dnnl_acbde, dnnl_acdb,
  dnnl_acdeb, dnnl_ba, dnnl_bac, dnnl_bacd,
  dnnl_bca, dnnl_bcda, dnnl_bcdea, dnnl_cba,
  dnnl_cdba, dnnl_cdeba, dnnl_decab , dnnl_aBc16b ,
  dnnl_aBc4b , dnnl_aBc8b , dnnl_aBcd16b , dnnl_aBcd4b ,
  dnnl_aBcd8b , dnnl_ABcd8b8a , dnnl_aBcde16b , dnnl_aBcde4b ,
  dnnl_aBcde8b , dnnl_aBcdef16b , dnnl_aBcdef4b , dnnl_format_tag_last,
  dnnl_x = dnnl_a, dnnl_nc = dnnl_ab, dnnl_cn = dnnl_ba, dnnl_tn = dnnl_ab,
  dnnl_nt = dnnl_ba, dnnl_ncw = dnnl_abc, dnnl_nwc = dnnl_acb, dnnl_nchw = dnnl_abcd,
  dnnl_nhwc = dnnl_acdb, dnnl_chwn = dnnl_bcda, dnnl_ncdhw = dnnl_abcde, dnnl_ndhwc = dnnl_acdeb,
  dnnl_oi = dnnl_ab, dnnl_io = dnnl_ba, dnnl_oiw = dnnl_abc, dnnl_owi = dnnl_acb,
  dnnl_wio = dnnl_cba, dnnl_iwo = dnnl_bca, dnnl_oihw = dnnl_abcd, dnnl_hwio = dnnl_cdba,
  dnnl_ohwi = dnnl_acdb, dnnl_ihwo = dnnl_bcda, dnnl_iohw = dnnl_bacd, dnnl_oidhw = dnnl_abcde,
  dnnl_dhwio = dnnl_cdeba, dnnl_odhwi = dnnl_acdeb, dnnl_idhwo = dnnl_bcdea, dnnl_goiw = dnnl_abcd,
  dnnl_goihw = dnnl_abcde, dnnl_hwigo = dnnl_decab, dnnl_giohw = dnnl_acbde, dnnl_goidhw = dnnl_abcdef,
  dnnl_tnc = dnnl_abc, dnnl_ntc = dnnl_bac, dnnl_ldnc = dnnl_abcd, dnnl_ldigo = dnnl_abcde,
  dnnl_ldgoi = dnnl_abdec, dnnl_ldgo = dnnl_abcd, dnnl_nCdhw16c = dnnl_aBcde16b, dnnl_nCdhw4c = dnnl_aBcde4b,
  dnnl_nCdhw8c = dnnl_aBcde8b, dnnl_nChw16c = dnnl_aBcd16b, dnnl_nChw4c = dnnl_aBcd4b, dnnl_nChw8c = dnnl_aBcd8b,
  dnnl_nCw16c = dnnl_aBc16b, dnnl_nCw4c = dnnl_aBc4b, dnnl_nCw8c = dnnl_aBc8b
}
 Memory format tag specification. More...
 
enum  dnnl_prop_kind_t {
  dnnl_prop_kind_undef = 0, dnnl_forward_training = 64, dnnl_forward_inference = 96, dnnl_forward_scoring = dnnl_forward_inference,
  dnnl_forward = dnnl_forward_training, dnnl_backward = 128, dnnl_backward_data = 160, dnnl_backward_weights = 192,
  dnnl_backward_bias = 193
}
 Kinds of propagation. More...
 
enum  dnnl_primitive_kind_t {
  dnnl_undefined_primitive, dnnl_reorder, dnnl_shuffle, dnnl_concat,
  dnnl_sum, dnnl_convolution, dnnl_deconvolution, dnnl_eltwise,
  dnnl_softmax, dnnl_pooling, dnnl_lrn, dnnl_batch_normalization,
  dnnl_layer_normalization, dnnl_inner_product, dnnl_rnn, dnnl_gemm,
  dnnl_binary
}
 Kinds of primitives. More...
 
enum  dnnl_alg_kind_t { ,
  dnnl_convolution_direct = 0x1, dnnl_convolution_winograd = 0x2, dnnl_convolution_auto = 0x3, dnnl_deconvolution_direct = 0xa,
  dnnl_deconvolution_winograd = 0xb, dnnl_eltwise_relu = 0x1f, dnnl_eltwise_tanh = 0x2f, dnnl_eltwise_elu = 0x3f,
  dnnl_eltwise_square = 0x4f, dnnl_eltwise_abs = 0x5f, dnnl_eltwise_sqrt = 0x6f, dnnl_eltwise_linear = 0x7f,
  dnnl_eltwise_bounded_relu = 0x8f, dnnl_eltwise_soft_relu = 0x9f, dnnl_eltwise_logistic = 0xaf, dnnl_eltwise_exp = 0xbf,
  dnnl_eltwise_gelu = 0xcf, dnnl_eltwise_swish = 0xdf, dnnl_pooling_max = 0x1ff, dnnl_pooling_avg_include_padding = 0x2ff,
  dnnl_pooling_avg_exclude_padding = 0x3ff , dnnl_lrn_across_channels = 0xaff, dnnl_lrn_within_channel = 0xbff, dnnl_vanilla_rnn = 0x1fff,
  dnnl_vanilla_lstm = 0x2fff, dnnl_vanilla_gru = 0x3fff, dnnl_lbr_gru = 0x4fff, dnnl_binary_add = 0x1fff0,
  dnnl_binary_mul = 0x1fff1
}
 Kinds of algorithms. More...
 
enum  dnnl_normalization_flags_t { dnnl_use_global_stats = 0x1U, dnnl_use_scaleshift = 0x2U, dnnl_fuse_norm_relu = 0x4U }
 Flags for batch normalization primitive. More...
 
enum  dnnl_wino_memory_format_t {
  dnnl_wino_undef = 0, dnnl_wino_wei_aaOIoi, dnnl_wino_wei_aaOio, dnnl_wino_wei_aaOBiOo,
  dnnl_wino_wei_OBaaIBOIio
}
 Winograd-specific formats. More...
 
enum  dnnl_memory_extra_flags_t { , dnnl_memory_extra_flag_compensation_conv_s8s8 = 0x1U }
 Flags for memory special features. More...
 
enum  dnnl_rnn_flags_t
 Flags for RNN cell.
 
enum  dnnl_rnn_direction_t { dnnl_unidirectional_left2right, dnnl_unidirectional_right2left, dnnl_bidirectional_concat, dnnl_bidirectional_sum }
 A direction of RNN primitive execution. More...
 
enum  dnnl_engine_kind_t { dnnl_any_engine, dnnl_cpu, dnnl_gpu }
 Kinds of engines. More...
 
enum  dnnl_scratchpad_mode_t { dnnl_scratchpad_mode_library, dnnl_scratchpad_mode_user }
 Scratchpad mode. More...
 
enum  dnnl_query_t {
  dnnl_query_undef = 0, dnnl_query_engine, dnnl_query_primitive_kind, dnnl_query_num_of_inputs_s32,
  dnnl_query_num_of_outputs_s32, dnnl_query_time_estimate_f64, dnnl_query_memory_consumption_s64, dnnl_query_scratchpad_engine,
  dnnl_query_impl_info_str, dnnl_query_reorder_src_engine, dnnl_query_reorder_dst_engine, dnnl_query_prop_kind,
  dnnl_query_some_d = 64, dnnl_query_op_d, dnnl_query_convolution_d, dnnl_query_deconvolution_d,
  dnnl_query_shuffle_d, dnnl_query_eltwise_d, dnnl_query_softmax_d, dnnl_query_pooling_d,
  dnnl_query_lrn_d, dnnl_query_batch_normalization_d, dnnl_query_layer_normalization_d, dnnl_query_inner_product_d,
  dnnl_query_rnn_d, dnnl_query_gemm_d, dnnl_query_binary_d, dnnl_query_some_md = 128,
  dnnl_query_src_md, dnnl_query_diff_src_md, dnnl_query_weights_md, dnnl_query_diff_weights_md,
  dnnl_query_dst_md, dnnl_query_diff_dst_md, dnnl_query_workspace_md, dnnl_query_scratchpad_md
}
 Primitive descriptor query specification. More...
 
enum  dnnl_stream_flags_t { dnnl_stream_default_order = 0x1U, dnnl_stream_in_order = 0x2U, dnnl_stream_out_of_order = 0x4U, dnnl_stream_default_flags = dnnl_stream_default_order }
 Stream flags. More...
 

Detailed Description

C API types definitions.