A proxy to Types in C API.
More...
|
enum | mkldnn::scratchpad_mode { mkldnn::scratchpad_mode::library = mkldnn_scratchpad_mode_library,
mkldnn::scratchpad_mode::user = mkldnn_scratchpad_mode_user
} |
| Scratchpad mode. More...
|
|
enum | mkldnn::prop_kind {
mkldnn::prop_kind::forward_training = mkldnn_forward_training,
mkldnn::prop_kind::forward_inference = mkldnn_forward_inference,
mkldnn::prop_kind::forward_scoring = mkldnn_forward_scoring,
mkldnn::prop_kind::forward = mkldnn_forward,
mkldnn::prop_kind::backward = mkldnn_backward,
mkldnn::prop_kind::backward_data = mkldnn_backward_data,
mkldnn::prop_kind::backward_weights = mkldnn_backward_weights,
mkldnn::prop_kind::backward_bias = mkldnn_backward_bias
} |
| Propagation kind. More...
|
|
enum | mkldnn::algorithm { ,
mkldnn::algorithm::convolution_auto = mkldnn_convolution_auto,
mkldnn::algorithm::convolution_direct = mkldnn_convolution_direct,
mkldnn::algorithm::convolution_winograd = mkldnn_convolution_winograd,
mkldnn::algorithm::deconvolution_direct = mkldnn_deconvolution_direct,
mkldnn::algorithm::deconvolution_winograd = mkldnn_deconvolution_winograd,
mkldnn::algorithm::eltwise_relu = mkldnn_eltwise_relu,
mkldnn::algorithm::eltwise_tanh = mkldnn_eltwise_tanh,
mkldnn::algorithm::eltwise_elu = mkldnn_eltwise_elu,
mkldnn::algorithm::eltwise_square = mkldnn_eltwise_square,
mkldnn::algorithm::eltwise_abs = mkldnn_eltwise_abs,
mkldnn::algorithm::eltwise_sqrt = mkldnn_eltwise_sqrt,
mkldnn::algorithm::eltwise_linear = mkldnn_eltwise_linear,
mkldnn::algorithm::eltwise_bounded_relu = mkldnn_eltwise_bounded_relu,
mkldnn::algorithm::eltwise_soft_relu = mkldnn_eltwise_soft_relu,
mkldnn::algorithm::eltwise_logistic = mkldnn_eltwise_logistic,
mkldnn::algorithm::eltwise_exp = mkldnn_eltwise_exp,
mkldnn::algorithm::eltwise_gelu = mkldnn_eltwise_gelu,
mkldnn::algorithm::lrn_across_channels = mkldnn_lrn_across_channels,
mkldnn::algorithm::lrn_within_channel = mkldnn_lrn_within_channel,
mkldnn::algorithm::pooling_max = mkldnn_pooling_max,
mkldnn::algorithm::pooling_avg = mkldnn_pooling_avg,
mkldnn::algorithm::pooling_avg_include_padding = mkldnn_pooling_avg_include_padding,
mkldnn::algorithm::pooling_avg_exclude_padding = mkldnn_pooling_avg_exclude_padding,
mkldnn::algorithm::vanilla_rnn = mkldnn_vanilla_rnn,
mkldnn::algorithm::vanilla_lstm = mkldnn_vanilla_lstm,
mkldnn::algorithm::vanilla_gru = mkldnn_vanilla_gru,
mkldnn::algorithm::lbr_gru = mkldnn_lbr_gru
} |
| Kinds of algorithms. More...
|
|
enum | mkldnn::normalization_flags : unsigned { mkldnn::normalization_flags::use_global_stats = mkldnn_use_global_stats,
mkldnn::normalization_flags::use_scale_shift = mkldnn_use_scaleshift,
mkldnn::normalization_flags::fuse_norm_relu = mkldnn_fuse_norm_relu
} |
| Flags for batch normalization primitive. More...
|
|
enum | mkldnn::query {
mkldnn::query::undef = mkldnn_query_undef,
mkldnn::query::engine = mkldnn_query_engine,
mkldnn::query::primitive_kind = mkldnn_query_primitive_kind,
mkldnn::query::num_of_inputs_s32 = mkldnn_query_num_of_inputs_s32,
mkldnn::query::num_of_outputs_s32 = mkldnn_query_num_of_outputs_s32,
mkldnn::query::time_estimate_f64 = mkldnn_query_time_estimate_f64,
mkldnn::query::memory_consumption_s64 = mkldnn_query_memory_consumption_s64,
mkldnn::query::scratchpad_engine = mkldnn_query_scratchpad_engine,
mkldnn::query::impl_info_str = mkldnn_query_impl_info_str,
mkldnn::query::op_d = mkldnn_query_op_d,
mkldnn::query::convolution_d = mkldnn_query_convolution_d,
mkldnn::query::deconvolution_d = mkldnn_query_deconvolution_d,
mkldnn::query::shuffle_d = mkldnn_query_shuffle_d,
mkldnn::query::eltwise_d = mkldnn_query_eltwise_d,
mkldnn::query::softmax_d = mkldnn_query_softmax_d,
mkldnn::query::pooling_d = mkldnn_query_pooling_d,
mkldnn::query::lrn_d = mkldnn_query_lrn_d,
mkldnn::query::batch_normalization_d = mkldnn_query_batch_normalization_d,
mkldnn::query::inner_product_d = mkldnn_query_inner_product_d,
mkldnn::query::rnn_d = mkldnn_query_rnn_d,
mkldnn::query::src_md = mkldnn_query_src_md,
mkldnn::query::diff_src_md = mkldnn_query_diff_src_md,
mkldnn::query::weights_md = mkldnn_query_weights_md,
mkldnn::query::diff_weights_md = mkldnn_query_diff_weights_md,
mkldnn::query::dst_md = mkldnn_query_dst_md,
mkldnn::query::diff_dst_md = mkldnn_query_diff_dst_md,
mkldnn::query::workspace_md = mkldnn_query_workspace_md,
mkldnn::query::scratchpad_md = mkldnn_query_scratchpad_md
} |
| Primitive descriptor query specification. More...
|
|
A proxy to Types in C API.
◆ scratchpad_mode
Scratchpad mode.
Enumerator |
---|
library | The library manages scratchpad (default)
|
user | A user shall query and provide the scratchpad memory to primitives.
|
◆ prop_kind
Propagation kind.
Enumerator |
---|
forward_training | Forward data propagation (training mode).
In this mode primitives perform computations necessary for subsequent backward propagation.
|
forward_inference | Forward data propagation (inference mode).
In this mode primitives perform only computations that are necessary for inference and omit computations that are necessary only for backward propagation.
|
forward_scoring | Forward data propagation, alias for mkldnn::prop_kind::forward_inference.
|
forward | Forward data propagation, alias for mkldnn::prop_kind::forward_training.
|
backward | Backward propagation (with respect to all parameters).
|
backward_data | Backward data propagation.
|
backward_weights | Backward weights propagation.
|
backward_bias | Backward bias propagation.
|
◆ algorithm
Kinds of algorithms.
Enumerator |
---|
convolution_auto | Convolution algorithm(either direct or Winograd) is chosen just in time.
|
convolution_direct | Direct convolution.
|
convolution_winograd | Winograd convolution.
|
deconvolution_direct | Direct deconvolution.
|
deconvolution_winograd | Winograd deconvolution.
|
eltwise_relu | Eltwise: ReLU.
|
eltwise_tanh | Eltwise: hyperbolic tangent non-linearity (tanh)
|
eltwise_elu | Eltwise: parametric exponential linear unit (elu)
|
eltwise_square | Eltwise: square.
|
eltwise_abs | Eltwise: abs.
|
eltwise_sqrt | Eltwise: square root.
|
eltwise_linear | Eltwise: linear.
|
eltwise_bounded_relu | Eltwise: bounded_relu.
|
eltwise_soft_relu | Eltwise: soft_relu.
|
eltwise_logistic | Eltwise: logistic.
|
eltwise_exp | Eltwise: exponent.
|
eltwise_gelu | Eltwise: gelu.
|
lrn_across_channels | Local response normalization (LRN) across multiple channels.
|
lrn_within_channel | LRN within a single channel.
|
pooling_max | Max pooling.
|
pooling_avg | Average pooling exclude padding, alias for mkldnn::algorithm::pooling_avg_include_padding.
|
pooling_avg_include_padding | Average pooling include padding.
|
pooling_avg_exclude_padding | Average pooling exclude padding.
|
vanilla_rnn | RNN cell.
|
vanilla_lstm | LSTM cell.
|
vanilla_gru | GRU cell.
|
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}]\)
|
◆ normalization_flags
Flags for batch normalization primitive.
Enumerator |
---|
use_global_stats | Use global statistics.
If specified
- on forward propagation use mean and variance provided by user (input)
- on backward propagation reduces the amount of computations, since mean and variance are considered as constants
If not specified:
- on forward propagation mean and variance are computed and stored in output
- on backward propagation compute full derivative wrt to data
|
use_scale_shift | Use scale and shift parameters.
If specified:
- on forward propagation use scale and shift (aka scale and bias) for the batch normalization results
- on backward propagation (for prop_kind == mkldnn::prop_kind::backward) compute diff wrt to scale and shift (hence one extra output used)
If not specified:
|
fuse_norm_relu | Fuse with ReLU.
If specified:
- on inference this option behaves the same as if the primitive were fused with ReLU via post ops API
- on training primitive requires workspace (required to be able to perform backward pass)
|
◆ query
Primitive descriptor query specification.
In general should be used from C++ API since required queries are directly implemented as class members (for instance, a query for source memory descriptor).
For more information see mkldnn_query_t.
Enumerator |
---|
undef | no query
|
engine | execution engine
|
primitive_kind | primitive kind
|
num_of_inputs_s32 | number of inputs expected
|
num_of_outputs_s32 | number of outputs expected
|
time_estimate_f64 | runtime estimation (seconds), unimplemented
|
memory_consumption_s64 | memory consumption (bytes)
extra (scratch) memory, additional to all inputs and outputs memory
- See also
- Primitive Attributes: Scratchpad
|
scratchpad_engine | scratchpad engine
engine to be used for creating scratchpad memory
|
impl_info_str | implementation name
|
op_d | op descriptor
|
convolution_d | convolution descriptor
|
deconvolution_d | deconvolution descriptor
|
shuffle_d | shuffle descriptor
|
eltwise_d | eltwise descriptor
|
softmax_d | softmax descriptor
|
pooling_d | pooling descriptor
|
lrn_d | lrn descriptor
|
batch_normalization_d | batch normalization descriptor
|
inner_product_d | inner product descriptor
|
rnn_d | rnn descriptor
|
src_md | source memory desc
|
diff_src_md | source gradient memory desc
|
weights_md | weights memory descriptor desc
|
diff_weights_md | weights grad. memory desc
|
dst_md | destination memory desc
|
diff_dst_md | destination grad. memory desc
|
workspace_md | workspace memory desc
|
scratchpad_md | scratchpad memory desc
|