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

A primitive to sum multiple tensors. More...

Classes

struct  dnnl::sum
 Out-of-place summation (sum) primitive. More...
 

Functions

dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create (dnnl_primitive_desc_t *sum_primitive_desc, const dnnl_memory_desc_t *dst_desc, int n, const float *scales, const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
 Creates a primitive descriptor for an (out-of-place) sum primitive. More...
 

Detailed Description

A primitive to sum multiple tensors.

See also
Sum in developer guide

Function Documentation

◆ dnnl_sum_primitive_desc_create()

dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create ( dnnl_primitive_desc_t sum_primitive_desc,
const dnnl_memory_desc_t dst_desc,
int  n,
const float *  scales,
const dnnl_memory_desc_t src_descs,
const_dnnl_primitive_attr_t  attr,
dnnl_engine_t  engine 
)

Creates a primitive descriptor for an (out-of-place) sum primitive.

Parameters
sum_primitive_descOutput primitive descriptor.
dst_descDestination memory descriptor.
nNumber of source parameters.
scalesVector of scales to multiply data in each source memory by.
src_descsArray of source memory descriptors having n elements.
attrPrimitive attributes to use (can be NULL).
engineEngine to use.
Returns
dnnl_success on success and a status describing the error otherwise.