FilesLast commitLast update
5 days ago
2 months ago
5 days ago
13 days ago
24 days ago
18 days ago
25 days ago
1 month ago
5 days ago
README

Concat

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products ×
Atlas A2 products ×
Atlas 200I/500 A2 inference products ×
Atlas inference products ×
Atlas training products ×

Function Description

  • Operator function: concatenates multiple input tensors along the specified dimension, and outputs a tensor containing all input data concatenated in order.
  • Computation process:
    • Input:

      • Concatenation dimension concat_dim
      • Tensor list x[0], x[1],..., x[N-1]
    • Process:

      1. Check that all input tensors have the same data type;
      2. Check that all dimensions except concat_dim are identical;
      3. Concatenate along the concat_dim dimension in sequence: y = Concat(x[0], x[1], ..., x[N-1], axis = concat_dim)
    • Output: concatenated tensor y

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
concat_dim Input Specifies the concatenation dimension, which is concat_dim in the computation process. INT32, INT64 ND
x Input Dynamic input list, which is the input x[i] in the process diagram. BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, UINT8, INT16, INT8, COMPLEX64, INT64, QINT8, QUINT8, QINT32, UINT16, COMPLEX128, UINT32, UINT64, QINT16, QUINT16, BOOL, STRING ND
N Optional attribute Number of input x tensors. The default value is 1. INT -
y Output Output y in the computation process. BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, UINT8, INT16, INT8, COMPLEX64, INT64, QINT8, QUINT8, QINT32, UINT16, COMPLEX128, UINT32, UINT64, QINT16, QUINT16, BOOL, STRING ND

Constraint Description

  • All input tensors must have the same shape except for the concatenation dimension.
  • The input list "x" contains at least two tensors.
  • The concatenation dimension concat_dim must be within the valid dimension range of the input tensors.
  • All tensors in x must have the same data type.
  • The attribute N specifies the number of inputs and is only used for description. It does not affect the dynamic input list at runtime.

Invocation Description

Invocation Method Invocation Sample Description
Graph-mode invocation test_geir_concat Invokes the Concat operator by building a graph through the operator IR.