Deep Neural Network Library (DNNL)  1.3.0
Performance library for Deep Learning
Sum

API Reference

The sum primitive sums \(N\) tensors (the variable names follow the standard Naming Conventions):

\[ \dst(\overline{x}) = \sum\limits_{i = 1}^{N} scales(i) \cdot \src_i(\overline{x}) \]

The sum primitive doesn't have a notion of forward or backward propagations. The backward propagation for the sum operation is simply an identity operation.

Execution Arguments

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
\(\src\) DNNL_ARG_MULTIPLE_SRC
\(\dst\) DNNL_ARG_DST

Implementation Details

General Notes

Post-ops and Attributes

The sum primitive doesn't support any post-ops or attributes.

Data Types Support

The sum primitive supports arbitrary data types for source and destination tensors according to the Data Types page.

Data Representation

Sources, Destination

The sum primitive works with arbitrary data tensors. There is no special meaning associated with any logical dimensions.

Implementation Limitations

  1. No primitive specific limitations. Refer to Data Types for limitations related to data types support.

Performance Tips