The concat primitive concatenates \(N\) tensors over concat_dimension
(here designated \(C\)) and is defined as (the variable names follow the standard Naming Conventions):
\[ \dst(\overline{ou}, c, \overline{in}) = \src_i(\overline{ou}, c', \overline{in}), \]
where \(c = C_1 + .. + C_{i-1} {}_{} + c'\).
The concat primitive does not have a notion of forward or backward propagation. The backward propagation for the concatenation 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 |
---|---|
\(\src\) | DNNL_ARG_MULTIPLE_SRC |
\(\dst\) | DNNL_ARG_DST |
concat_dimension
. The destination dimension for the concat_dimension
must be equal to the sum of the concat_dimension
dimensions of the sources (i.e. \(C = \sum_i C_i\)). Implicit broadcasting is not supported.The concat primitive supports arbitrary data types for source and destination tensors according to the Data Types page. However, it is required that all source tensors are of the same data type (but not necessarily matching the data type of the destination tensor).
The concat primitive works with arbitrary data tensors. There is no special meaning associated with any logical dimensions.
The concat primitive does not support any post-ops or attributes.
s8s8
convolutions (see Nuances of int8 Computations).Engine | Name | Com |
---|---|---|
CPU/GPU | Concat Primitive Example | This C++ API example demonstrates how to create and execute a Concat primitive. Key optimizations included in this example:
|