mxnet
|
Classes | |
struct | dnnl_exec_arg_t |
struct | dnnl_primitive_desc_iterator |
An opaque structure to describe a primitive descriptor iterator. More... | |
struct | dnnl_primitive_desc |
An opaque structure to describe a primitive descriptor. More... | |
struct | dnnl_primitive |
Macros | |
#define | DNNL_ARG_SRC_0 1 |
Source argument #0. More... | |
#define | DNNL_ARG_SRC DNNL_ARG_SRC_0 |
#define | DNNL_ARG_SRC_LAYER DNNL_ARG_SRC_0 |
#define | DNNL_ARG_FROM DNNL_ARG_SRC_0 |
#define | DNNL_ARG_SRC_1 2 |
Source argument #1. More... | |
#define | DNNL_ARG_SRC_ITER DNNL_ARG_SRC_1 |
#define | DNNL_ARG_SRC_2 3 |
Source argument #2. More... | |
#define | DNNL_ARG_SRC_ITER_C DNNL_ARG_SRC_2 |
#define | DNNL_ARG_DST_0 17 |
Destination argument #0. More... | |
#define | DNNL_ARG_DST DNNL_ARG_DST_0 |
#define | DNNL_ARG_TO DNNL_ARG_DST_0 |
#define | DNNL_ARG_DST_LAYER DNNL_ARG_DST_0 |
A special mnemonic for RNN output vector. An alias for DNNL_ARG_DST_0. More... | |
#define | DNNL_ARG_DST_1 18 |
Destination argument #1. More... | |
#define | DNNL_ARG_DST_ITER DNNL_ARG_DST_1 |
#define | DNNL_ARG_DST_2 19 |
Destination argument #2. More... | |
#define | DNNL_ARG_DST_ITER_C DNNL_ARG_DST_2 |
#define | DNNL_ARG_WEIGHTS_0 33 |
Weights argument #0. More... | |
#define | DNNL_ARG_WEIGHTS DNNL_ARG_WEIGHTS_0 |
#define | DNNL_ARG_SCALE_SHIFT DNNL_ARG_WEIGHTS_0 |
#define | DNNL_ARG_WEIGHTS_LAYER DNNL_ARG_WEIGHTS_0 |
#define | DNNL_ARG_WEIGHTS_1 34 |
Weights argument #1. More... | |
#define | DNNL_ARG_WEIGHTS_ITER DNNL_ARG_WEIGHTS_1 |
#define | DNNL_ARG_WEIGHTS_2 35 |
Weights argument #2. More... | |
#define | DNNL_ARG_WEIGHTS_PEEPHOLE DNNL_ARG_WEIGHTS_2 |
#define | DNNL_ARG_WEIGHTS_3 36 |
Weights argument #3. More... | |
#define | DNNL_ARG_WEIGHTS_PROJECTION DNNL_ARG_WEIGHTS_3 |
#define | DNNL_ARG_BIAS 41 |
Bias tensor argument. More... | |
#define | DNNL_ARG_MEAN 49 |
Mean values tensor argument. More... | |
#define | DNNL_ARG_VARIANCE 50 |
Variance values tensor argument. More... | |
#define | DNNL_ARG_SCALE 51 |
A special mnemonic for scale argument of normalization primitives. More... | |
#define | DNNL_ARG_SHIFT 52 |
A special mnemonic for shift argument of normalization primitives. More... | |
#define | DNNL_ARG_WORKSPACE 64 |
#define | DNNL_ARG_SCRATCHPAD 80 |
Scratchpad (temporary storage) tensor argument. More... | |
#define | DNNL_ARG_DIFF_SRC_0 129 |
Gradient (diff) of the source argument #0. More... | |
#define | DNNL_ARG_DIFF_SRC DNNL_ARG_DIFF_SRC_0 |
#define | DNNL_ARG_DIFF_SRC_LAYER DNNL_ARG_DIFF_SRC_0 |
#define | DNNL_ARG_DIFF_SRC_1 130 |
Gradient (diff) of the source argument #1. More... | |
#define | DNNL_ARG_DIFF_SRC_ITER DNNL_ARG_DIFF_SRC_1 |
#define | DNNL_ARG_DIFF_SRC_2 131 |
Gradient (diff) of the source argument #2. More... | |
#define | DNNL_ARG_DIFF_SRC_ITER_C DNNL_ARG_DIFF_SRC_2 |
#define | DNNL_ARG_DIFF_DST_0 145 |
Gradient (diff) of the destination argument #0. More... | |
#define | DNNL_ARG_DIFF_DST DNNL_ARG_DIFF_DST_0 |
#define | DNNL_ARG_DIFF_DST_LAYER DNNL_ARG_DIFF_DST_0 |
#define | DNNL_ARG_DIFF_DST_1 146 |
Gradient (diff) of the destination argument #1. More... | |
#define | DNNL_ARG_DIFF_DST_ITER DNNL_ARG_DIFF_DST_1 |
#define | DNNL_ARG_DIFF_DST_2 147 |
Gradient (diff) of the destination argument #2. More... | |
#define | DNNL_ARG_DIFF_DST_ITER_C DNNL_ARG_DIFF_DST_2 |
#define | DNNL_ARG_DIFF_WEIGHTS_0 161 |
Gradient (diff) of the weights argument #0. More... | |
#define | DNNL_ARG_DIFF_WEIGHTS DNNL_ARG_DIFF_WEIGHTS_0 |
#define | DNNL_ARG_DIFF_SCALE_SHIFT DNNL_ARG_DIFF_WEIGHTS_0 |
#define | DNNL_ARG_DIFF_WEIGHTS_LAYER DNNL_ARG_DIFF_WEIGHTS_0 |
#define | DNNL_ARG_DIFF_WEIGHTS_1 162 |
Gradient (diff) of the weights argument #1. More... | |
#define | DNNL_ARG_DIFF_WEIGHTS_ITER DNNL_ARG_DIFF_WEIGHTS_1 |
#define | DNNL_ARG_DIFF_WEIGHTS_2 163 |
Gradient (diff) of the weights argument #2. More... | |
#define | DNNL_ARG_DIFF_WEIGHTS_PEEPHOLE DNNL_ARG_DIFF_WEIGHTS_2 |
#define | DNNL_ARG_DIFF_WEIGHTS_3 164 |
Gradient (diff) of the weights argument #3. More... | |
#define | DNNL_ARG_DIFF_WEIGHTS_PROJECTION DNNL_ARG_DIFF_WEIGHTS_3 |
#define | DNNL_ARG_DIFF_BIAS 169 |
Gradient (diff) of the bias tensor argument. More... | |
#define | DNNL_ARG_DIFF_SCALE 255 |
A special mnemonic for scale argument of normalization primitives. More... | |
#define | DNNL_ARG_DIFF_SHIFT 256 |
A special mnemonic for shift argument of normalization primitives. More... | |
#define | DNNL_ARG_ATTR_OUTPUT_SCALES 513 |
Output scaling factors provided at execution time. More... | |
#define | DNNL_ARG_MULTIPLE_SRC 1024 |
#define | DNNL_ARG_MULTIPLE_DST 2048 |
#define | DNNL_ARG_ATTR_ZERO_POINTS 4096 |
Zero points provided at execution time. More... | |
#define | DNNL_ARG_ATTR_POST_OP_DW 8192 |
#define | DNNL_ARG_ATTR_MULTIPLE_POST_OP_BASE 16384 |
Starting point for a binary post operation. More... | |
#define | DNNL_ARG_ATTR_MULTIPLE_POST_OP(idx) (DNNL_ARG_ATTR_MULTIPLE_POST_OP_BASE * ((idx) + 1)) |
#define | DNNL_ARG_ATTR_INPUT_SCALES 1048576 |
Input scaling factors provided at execution time. More... | |
Typedefs | |
typedef void * | dnnl_op_desc_t |
A pointer to any of the operation descriptors. More... | |
typedef const void * | const_dnnl_op_desc_t |
A pointer to any of the operation descriptors (constant variant). More... | |
typedef struct dnnl_primitive_desc_iterator * | dnnl_primitive_desc_iterator_t |
A primitive descriptor iterator handle. More... | |
typedef const struct dnnl_primitive_desc_iterator * | const_dnnl_primitive_desc_iterator_t |
A constant primitive descriptor iterator handle. More... | |
typedef struct dnnl_primitive_desc * | dnnl_primitive_desc_t |
A primitive descriptor handle. More... | |
typedef const struct dnnl_primitive_desc * | const_dnnl_primitive_desc_t |
A constant primitive descriptor handle. More... | |
typedef struct dnnl_primitive * | dnnl_primitive_t |
A primitive handle. More... | |
typedef const struct dnnl_primitive * | const_dnnl_primitive_t |
A constant primitive handle. More... | |
#define DNNL_ARG_ATTR_INPUT_SCALES 1048576 |
Input scaling factors provided at execution time.
#define DNNL_ARG_ATTR_MULTIPLE_POST_OP | ( | idx | ) | (DNNL_ARG_ATTR_MULTIPLE_POST_OP_BASE * ((idx) + 1)) |
Arguments for a binary post operation. Up to 32 arguments are supported. See dev_guide_attributes_post_ops_binary_fusion
#define DNNL_ARG_ATTR_MULTIPLE_POST_OP_BASE 16384 |
Starting point for a binary post operation.
#define DNNL_ARG_ATTR_OUTPUT_SCALES 513 |
Output scaling factors provided at execution time.
#define DNNL_ARG_ATTR_POST_OP_DW 8192 |
Arguments for fused depthwise convolution. See dev_guide_attributes_post_ops_depthwise_fusion
#define DNNL_ARG_ATTR_ZERO_POINTS 4096 |
Zero points provided at execution time.
#define DNNL_ARG_BIAS 41 |
Bias tensor argument.
#define DNNL_ARG_DIFF_BIAS 169 |
Gradient (diff) of the bias tensor argument.
#define DNNL_ARG_DIFF_DST DNNL_ARG_DIFF_DST_0 |
A special mnemonic for primitives that have a single diff destination argument. An alias for DNNL_ARG_DIFF_DST_0.
#define DNNL_ARG_DIFF_DST_0 145 |
Gradient (diff) of the destination argument #0.
#define DNNL_ARG_DIFF_DST_1 146 |
Gradient (diff) of the destination argument #1.
#define DNNL_ARG_DIFF_DST_2 147 |
Gradient (diff) of the destination argument #2.
#define DNNL_ARG_DIFF_DST_ITER DNNL_ARG_DIFF_DST_1 |
A special mnemonic for gradient (diff) of RNN input recurrent hidden state vector. An alias for DNNL_ARG_DIFF_DST_1.
#define DNNL_ARG_DIFF_DST_ITER_C DNNL_ARG_DIFF_DST_2 |
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector. An alias for DNNL_ARG_DIFF_DST_2.
#define DNNL_ARG_DIFF_DST_LAYER DNNL_ARG_DIFF_DST_0 |
A special mnemonic for gradient (diff) of RNN output vector. An alias for DNNL_ARG_DIFF_DST_0.
#define DNNL_ARG_DIFF_SCALE 255 |
A special mnemonic for scale argument of normalization primitives.
#define DNNL_ARG_DIFF_SCALE_SHIFT DNNL_ARG_DIFF_WEIGHTS_0 |
A special mnemonic for diff of scale and shift argument of normalization primitives. Alias for DNNL_ARG_DIFF_WEIGHTS_0.
#define DNNL_ARG_DIFF_SHIFT 256 |
A special mnemonic for shift argument of normalization primitives.
#define DNNL_ARG_DIFF_SRC DNNL_ARG_DIFF_SRC_0 |
A special mnemonic for primitives that have a single diff source argument. An alias for DNNL_ARG_DIFF_SRC_0.
#define DNNL_ARG_DIFF_SRC_0 129 |
Gradient (diff) of the source argument #0.
#define DNNL_ARG_DIFF_SRC_1 130 |
Gradient (diff) of the source argument #1.
#define DNNL_ARG_DIFF_SRC_2 131 |
Gradient (diff) of the source argument #2.
#define DNNL_ARG_DIFF_SRC_ITER DNNL_ARG_DIFF_SRC_1 |
A special mnemonic for gradient (diff) of RNN input recurrent hidden state vector. An alias for DNNL_ARG_DIFF_SRC_1.
#define DNNL_ARG_DIFF_SRC_ITER_C DNNL_ARG_DIFF_SRC_2 |
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector. An alias for DNNL_ARG_DIFF_SRC_1.
#define DNNL_ARG_DIFF_SRC_LAYER DNNL_ARG_DIFF_SRC_0 |
A special mnemonic for gradient (diff) of RNN input vector. An alias for DNNL_ARG_DIFF_SRC_0.
#define DNNL_ARG_DIFF_WEIGHTS DNNL_ARG_DIFF_WEIGHTS_0 |
A special mnemonic for primitives that have a single diff weights argument. Alias for DNNL_ARG_DIFF_WEIGHTS_0.
#define DNNL_ARG_DIFF_WEIGHTS_0 161 |
Gradient (diff) of the weights argument #0.
#define DNNL_ARG_DIFF_WEIGHTS_1 162 |
Gradient (diff) of the weights argument #1.
#define DNNL_ARG_DIFF_WEIGHTS_2 163 |
Gradient (diff) of the weights argument #2.
#define DNNL_ARG_DIFF_WEIGHTS_3 164 |
Gradient (diff) of the weights argument #3.
#define DNNL_ARG_DIFF_WEIGHTS_ITER DNNL_ARG_DIFF_WEIGHTS_1 |
A special mnemonic for diff of RNN weights applied to the recurrent input. An alias for DNNL_ARG_DIFF_WEIGHTS_1.
#define DNNL_ARG_DIFF_WEIGHTS_LAYER DNNL_ARG_DIFF_WEIGHTS_0 |
A special mnemonic for diff of RNN weights applied to the layer input. An alias for DNNL_ARG_DIFF_WEIGHTS_0.
#define DNNL_ARG_DIFF_WEIGHTS_PEEPHOLE DNNL_ARG_DIFF_WEIGHTS_2 |
A special mnemonic for diff of RNN weights applied to the peephole weights. An alias for DNNL_ARG_DIFF_WEIGHTS_2.
#define DNNL_ARG_DIFF_WEIGHTS_PROJECTION DNNL_ARG_DIFF_WEIGHTS_3 |
A special mnemonic for diff of RNN weights applied to the projection weights. An alias for DNNL_ARG_DIFF_WEIGHTS_3.
#define DNNL_ARG_DST DNNL_ARG_DST_0 |
A special mnemonic for destination argument for primitives that have a single destination. An alias for DNNL_ARG_DST_0.
#define DNNL_ARG_DST_0 17 |
Destination argument #0.
#define DNNL_ARG_DST_1 18 |
Destination argument #1.
#define DNNL_ARG_DST_2 19 |
Destination argument #2.
#define DNNL_ARG_DST_ITER DNNL_ARG_DST_1 |
A special mnemonic for RNN input recurrent hidden state vector. An alias for DNNL_ARG_DST_1.
#define DNNL_ARG_DST_ITER_C DNNL_ARG_DST_2 |
A special mnemonic for LSTM output recurrent cell state vector. An alias for DNNL_ARG_DST_2.
#define DNNL_ARG_DST_LAYER DNNL_ARG_DST_0 |
A special mnemonic for RNN output vector. An alias for DNNL_ARG_DST_0.
#define DNNL_ARG_FROM DNNL_ARG_SRC_0 |
A special mnemonic for reorder source argument. An alias for DNNL_ARG_SRC_0.
#define DNNL_ARG_MEAN 49 |
Mean values tensor argument.
#define DNNL_ARG_MULTIPLE_DST 2048 |
Starting index for destination arguments for primitives that produce a variable number of destination arguments.
#define DNNL_ARG_MULTIPLE_SRC 1024 |
Starting index for source arguments for primitives that take a variable number of source arguments.
#define DNNL_ARG_SCALE 51 |
A special mnemonic for scale argument of normalization primitives.
#define DNNL_ARG_SCALE_SHIFT DNNL_ARG_WEIGHTS_0 |
A special mnemonic for scale and shift argument of normalization primitives. Alias for DNNL_ARG_WEIGHTS_0.
#define DNNL_ARG_SCRATCHPAD 80 |
Scratchpad (temporary storage) tensor argument.
#define DNNL_ARG_SHIFT 52 |
A special mnemonic for shift argument of normalization primitives.
#define DNNL_ARG_SRC DNNL_ARG_SRC_0 |
A special mnemonic for source argument for primitives that have a single source. An alias for DNNL_ARG_SRC_0.
#define DNNL_ARG_SRC_0 1 |
Source argument #0.
#define DNNL_ARG_SRC_1 2 |
Source argument #1.
#define DNNL_ARG_SRC_2 3 |
Source argument #2.
#define DNNL_ARG_SRC_ITER DNNL_ARG_SRC_1 |
A special mnemonic for RNN input recurrent hidden state vector. An alias for DNNL_ARG_SRC_1.
#define DNNL_ARG_SRC_ITER_C DNNL_ARG_SRC_2 |
A special mnemonic for RNN input recurrent cell state vector. An alias for DNNL_ARG_SRC_2.
#define DNNL_ARG_SRC_LAYER DNNL_ARG_SRC_0 |
A special mnemonic for RNN input vector. An alias for DNNL_ARG_SRC_0.
#define DNNL_ARG_TO DNNL_ARG_DST_0 |
A special mnemonic for reorder destination argument. An alias for DNNL_ARG_DST_0.
#define DNNL_ARG_VARIANCE 50 |
Variance values tensor argument.
#define DNNL_ARG_WEIGHTS DNNL_ARG_WEIGHTS_0 |
A special mnemonic for primitives that have a single weights argument. Alias for DNNL_ARG_WEIGHTS_0.
#define DNNL_ARG_WEIGHTS_0 33 |
Weights argument #0.
#define DNNL_ARG_WEIGHTS_1 34 |
Weights argument #1.
#define DNNL_ARG_WEIGHTS_2 35 |
Weights argument #2.
#define DNNL_ARG_WEIGHTS_3 36 |
Weights argument #3.
#define DNNL_ARG_WEIGHTS_ITER DNNL_ARG_WEIGHTS_1 |
A special mnemonic for RNN weights applied to the recurrent input. An alias for DNNL_ARG_WEIGHTS_1.
#define DNNL_ARG_WEIGHTS_LAYER DNNL_ARG_WEIGHTS_0 |
A special mnemonic for RNN weights applied to the layer input. An alias for DNNL_ARG_WEIGHTS_0.
#define DNNL_ARG_WEIGHTS_PEEPHOLE DNNL_ARG_WEIGHTS_2 |
A special mnemonic for RNN weights applied to the peephole weights. An alias for DNNL_ARG_WEIGHTS_2.
#define DNNL_ARG_WEIGHTS_PROJECTION DNNL_ARG_WEIGHTS_3 |
A special mnemonic for RNN weights applied to the projection weights. An alias for DNNL_ARG_WEIGHTS_3.
#define DNNL_ARG_WORKSPACE 64 |
Workspace tensor argument. Workspace is used to pass information from forward propagation to backward propagation computations.
typedef const void* const_dnnl_op_desc_t |
A pointer to any of the operation descriptors (constant variant).
typedef const struct dnnl_primitive_desc_iterator* const_dnnl_primitive_desc_iterator_t |
A constant primitive descriptor iterator handle.
typedef const struct dnnl_primitive_desc* const_dnnl_primitive_desc_t |
A constant primitive descriptor handle.
typedef const struct dnnl_primitive* const_dnnl_primitive_t |
A constant primitive handle.
typedef void* dnnl_op_desc_t |
A pointer to any of the operation descriptors.
typedef struct dnnl_primitive_desc_iterator* dnnl_primitive_desc_iterator_t |
A primitive descriptor iterator handle.
typedef struct dnnl_primitive_desc* dnnl_primitive_desc_t |
A primitive descriptor handle.
typedef struct dnnl_primitive* dnnl_primitive_t |
A primitive handle.
enum dnnl_alg_kind_t |
Kinds of algorithms.
Enumerator | |
---|---|
dnnl_alg_kind_undef | |
dnnl_convolution_direct | Direct convolution. |
dnnl_convolution_winograd | Winograd convolution. |
dnnl_convolution_auto | Convolution algorithm(either direct or Winograd) is chosen just in time. |
dnnl_deconvolution_direct | Direct deconvolution. |
dnnl_deconvolution_winograd | Winograd deconvolution. |
dnnl_eltwise_relu | Eltwise: ReLU. |
dnnl_eltwise_tanh | Eltwise: hyperbolic tangent non-linearity (tanh) |
dnnl_eltwise_elu | Eltwise: exponential linear unit (elu) |
dnnl_eltwise_square | Eltwise: square. |
dnnl_eltwise_abs | Eltwise: abs. |
dnnl_eltwise_sqrt | Eltwise: square root. |
dnnl_eltwise_linear | Eltwise: linear. |
dnnl_eltwise_bounded_relu | Eltwise: bounded_relu. |
dnnl_eltwise_soft_relu | Eltwise: soft_relu. |
dnnl_eltwise_logistic | Eltwise: logistic. |
dnnl_eltwise_exp | Eltwise: exponent. |
dnnl_eltwise_gelu_tanh | Eltwise: gelu @note Tanh approximation formula is used to approximate the cumulative distribution function of a Gaussian here |
dnnl_eltwise_gelu | Eltwise: tanh-based gelu (alias for dnnl_eltwise_gelu_tanh) |
dnnl_eltwise_swish | Eltwise: swish. |
dnnl_eltwise_log | Eltwise: natural logarithm. |
dnnl_eltwise_clip | Eltwise: clip. |
dnnl_eltwise_clip_v2 | Eltwise: clip version 2. |
dnnl_eltwise_pow | Eltwise: pow. |
dnnl_eltwise_gelu_erf | Eltwise: erf-based gelu. |
dnnl_eltwise_round | Eltwise: round. |
dnnl_eltwise_logsigmoid | Eltwise: logsigmoid. |
dnnl_eltwise_mish | Eltwise: mish. |
dnnl_eltwise_hardswish | Eltwise: hardswish. |
dnnl_eltwise_relu_use_dst_for_bwd | Eltwise: ReLU (dst for backward) |
dnnl_eltwise_tanh_use_dst_for_bwd | Eltwise: hyperbolic tangent non-linearity (tanh) (dst for backward) |
dnnl_eltwise_elu_use_dst_for_bwd | Eltwise: exponential linear unit (elu) (dst for backward) |
dnnl_eltwise_sqrt_use_dst_for_bwd | Eltwise: square root (dst for backward) |
dnnl_eltwise_logistic_use_dst_for_bwd | Eltwise: logistic (dst for backward) |
dnnl_eltwise_exp_use_dst_for_bwd | Eltwise: exp (dst for backward) |
dnnl_eltwise_clip_v2_use_dst_for_bwd | Eltwise: clip version 2 (dst for backward) |
dnnl_pooling_max | Max pooling. |
dnnl_pooling_avg_include_padding | Average pooling include padding. |
dnnl_pooling_avg_exclude_padding | Average pooling exclude padding. |
dnnl_pooling_avg | Average pooling (alias for dnnl_pooling_avg_exclude_padding) |
dnnl_lrn_across_channels | Local response normalization (LRN) across multiple channels. |
dnnl_lrn_within_channel | LRN within a single channel. |
dnnl_vanilla_rnn | RNN cell. |
dnnl_vanilla_lstm | LSTM cell. |
dnnl_vanilla_gru | GRU cell. |
dnnl_lbr_gru | GRU cell with linear before reset Modification of original GRU cell. Differs from #dnnl_vanilla_gru in how the new memory gate is calculated:
Primitive expects 4 biases on input: |
dnnl_binary_add | Binary add. |
dnnl_binary_mul | Binary mul. |
dnnl_binary_max | Binary max. |
dnnl_binary_min | Binary min. |
dnnl_binary_div | Binary div. |
dnnl_binary_sub | Binary sub. |
dnnl_binary_ge | Binary greater or equal. |
dnnl_binary_gt | Binary greater than. |
dnnl_binary_le | Binary less or equal. |
dnnl_binary_lt | Binary less than. |
dnnl_binary_eq | Binary equal. |
dnnl_binary_ne | Binary not equal. |
dnnl_resampling_nearest | Nearest Neighbor Resampling Method. |
dnnl_resampling_linear | Linear Resampling Method. |
dnnl_reduction_max | Reduction using max. |
dnnl_reduction_min | Reduction using min. |
dnnl_reduction_sum | Reduction using sum. |
dnnl_reduction_mul | Reduction using mul. |
dnnl_reduction_mean | Reduction using mean. |
dnnl_reduction_norm_lp_max | Reduction using lp norm. |
dnnl_reduction_norm_lp_sum | Reduction using lp norm. |
dnnl_reduction_norm_lp_power_p_max | Reduction using lp norm without final pth-root. |
dnnl_reduction_norm_lp_power_p_sum | Reduction using lp norm without final pth-root. |
Flags for normalization primitives.
Kinds of primitives. Used to implement a way to extend the library with new primitives without changing the ABI.
enum dnnl_prop_kind_t |
Kinds of propagation.
enum dnnl_query_t |
Primitive descriptor query specification
For generic function dnnl_primitive_desc_query(), the type of result must agree with the queried argument. The correspondence table:
Query kind | Type of query result |
---|---|
dnnl_query_engine | dnnl_engine_t * |
dnnl_query_scratchpad_engine | dnnl_engine_t * |
dnnl_query_primitive_kind | dnnl_primitive_kind_t * |
dnnl_query_*_s32 | int * |
dnnl_query_*_s64 | dnnl_dim_t * (same as int64_t *) |
dnnl_query_*_f64 | double * |
dnnl_query_*_str | const char ** |
dnnl_query_op_d | const_dnnl_op_desc_t * |
dnnl_query_*_md | const dnnl_memory_desc_t ** |
dnnl_query_*_<op>_d | const dnnl_<op>_desc_t ** |
dnnl_query_*_pd | const_dnnl_primitive_desc_t * |
dnnl_status_t DNNL_API dnnl_primitive_create | ( | dnnl_primitive_t * | primitive, |
const_dnnl_primitive_desc_t | primitive_desc | ||
) |
Creates a primitive.
primitive | Output primitive. |
primitive_desc | Primitive descriptor used to create the primitive. |
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. The resulting primitive descriptor must be destroyed separately.
primitive_desc | Output primitive descriptor. |
existing_primitive_desc | Primitive descriptor to clone. |
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. This function is equivalent to a sequence of dnnl_primitive_desc_iterator_create() and dnnl_primitive_desc_iterator_fetch(). In other words, the library will pick the first suitable implementation.
primitive_desc | Output primitive descriptor. |
op_desc | Operation descriptor. |
attr | Primitive attributes (can be NULL). |
engine | Engine to use. |
hint_forward_primitive_desc | For backward propagation: primitive descriptor for a respective forward propagation primitive. Pass NULL for forward propagation. |
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy | ( | dnnl_primitive_desc_t | primitive_desc | ) |
Destroys a primitive descriptor.
primitive_desc | Primitive descriptor to destroy. |
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.
attr
.attr
is the same as that of a primitive_desc
, so it is an error to use the attr
once the primitive_desc
has been destroyed.primitive_desc | Primitive descriptor. |
attr | Output primitive attributes. |
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.
iterator | Output primitive descriptor iterator. |
op_desc | Operation descriptor. |
attr | Primitive attributes (can be NULL). |
engine | Engine to use. |
hint_forward_primitive_desc | For backward propagation: primitive descriptor for a respective forward propagation primitive. Pass NULL for forward propagation. |
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy | ( | dnnl_primitive_desc_iterator_t | iterator | ) |
Destroys a primitive descriptor iterator.
iterator | Primitive descriptor iterator to destroy. |
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.
iterator | A primitive descriptor iterator. |
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.
iterator | A primitive descriptor iterator to advance. |
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.
The most common use case is to query a primitive descriptor, created with source, weights, and destination memory descriptors with format tags set to dnnl_format_tag_any, for the corresponding memory descriptors (in this case the what
is set to dnnl_query_src_md, dnnl_query_weights_md, and dnnl_query_dst_md respectively) so that it is possible to create memory objects and reorder primitives if necessary.
Another typical use case is to query a primitive descriptor for workspace memory descriptor (with what
set to dnnl_query_workspace_md). If this query returns dnnl_not_required status, then workspace memory is not required.
A few other use cases:
primitive_desc | Primitive descriptor. |
what | Parameter to query. |
index | Index of the parameter to query for. |
result | Output result. The type depends on the query. For example, it must be a dnnl_memory_desc_t* if querying for a memory descriptor. |
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.
primitive_desc | Primitive descriptor. |
what | Kind of memory descriptor parameter to query for. |
index | Index of the parameter to query. |
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.
primitive_desc | Primitive descriptor. |
what | Kind of the value to query for. |
index | Index of the parameter to query. |
dnnl_status_t DNNL_API dnnl_primitive_destroy | ( | dnnl_primitive_t | primitive | ) |
Destroys a primitive.
primitive | The primitive to destroy. |
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.
primitive | Primitive to execute. |
stream | Stream to use. |
nargs | Number of arguments. |
args | Array of arguments. Each argument is an <index, dnnl_memory_t> pair. The index is one of the DNNL_ARG_* values such as DNNL_ARG_SRC . Unless runtime shapes are used (see DNNL_RUNTIME_DIM_VAL), the memory object must have the same memory descriptor as that returned by dnnl_primitive_desc_query_md(dnnl_query_exec_arg_md, index). |
args | is padded (padded_dims > dims), the primitive execution will assume properly zero-padded input arguments, and produce zero-padded output arguments. |
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.
const
qualifier of the returned object prevents such attempts.primitive | Primitive to query for the primitive descriptor. |
primitive_desc | Output primitive descriptor. |