oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0

A primitive to compute reduction operation on data tensor using min, max, mul, sum, mean and norm_lp operations. More...

Classes

struct  dnnl::reduction
 Reduction. More...
 
struct  dnnl_reduction_desc_t
 A descriptor of reduction operation. More...
 

Functions

dnnl_status_t DNNL_API dnnl_reduction_desc_init (dnnl_reduction_desc_t *desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, float p, float eps)
 Initializes a descriptor for a reduction primitive. More...
 

Detailed Description

A primitive to compute reduction operation on data tensor using min, max, mul, sum, mean and norm_lp operations.

See also
Reduction in developer guide

Function Documentation

◆ dnnl_reduction_desc_init()

dnnl_status_t DNNL_API dnnl_reduction_desc_init ( dnnl_reduction_desc_t desc,
dnnl_alg_kind_t  alg_kind,
const dnnl_memory_desc_t src_desc,
const dnnl_memory_desc_t dst_desc,
float  p,
float  eps 
)

Initializes a descriptor for a reduction primitive.

Note
Destination memory descriptor is allowed to be initialized with dnnl_format_tag_any or with format_kind set to dnnl_format_kind_any.
Parameters
descOutput descriptor for a reduction primitive.
alg_kindreduction algorithm kind. Possible values: dnnl_reduction_max, dnnl_reduction_min, dnnl_reduction_sum, dnnl_reduction_mul, dnnl_reduction_mean, dnnl_reduction_norm_lp_max, dnnl_reduction_norm_lp_sum, dnnl_reduction_norm_lp_power_p_max, dnnl_reduction_norm_lp_power_p_sum.
pAlgorithm specific parameter.
epsAlgorithm specific parameter.
src_descSource memory descriptor.
dst_descDestination memory descriptor.
Returns
dnnl_success on success and a status describing the error otherwise.