cpp
The sum primitive sums N tensors. The variable names follow the standard conventions-label
.
The sum primitive does not have a notion of forward or backward propagations. The backward propagation for the sum operation is simply an identity operation.
When executed, the inputs and outputs should be mapped to an execution argument index as specified by the following table.
primitive input/output | execution argument index |
---|---|
- The
$\dst$ memory format can be either specified by a user or derived the most appropriate one by the primitive. The recommended way is to allow the primitive to choose the appropriate format. - The sum primitive requires all source and destination tensors to have the same shape. Implicit broadcasting is not supported.
The sum primitive does not support any post-ops or attributes.
The sum primitive supports arbitrary data types for source and destination tensors.
The sum primitive works with arbitrary data tensors. There is no special meaning associated with any logical dimensions.
dnnl::sum