FilesLast commitLast update
12 days ago
2 months ago
2 months ago
12 days ago
7 days ago
1 day ago
1 day ago
7 days ago
1 day ago
12 days ago
5 days ago
README

Transpose

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 √
Kirin X90 processor series products √
Kirin 9030 processor series products √

Function Description

  • Operator function: swaps arbitrary dimensions of a tensor. For example, if the input self is a tensor with shape [2, 3, 5] and dims is (2, 0, 1), the output is a tensor with shape [5, 2, 3].

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input tensor Input tensor for dimension permutation. See below ND
perm Input tensor Represents the permutation of the dimensions of x. The value must be in the range [0, number of dimensions of self - 1]. INT64, INT32 -
y Output Has no more than 8 dimensions. The shape is jointly determined by dims and the shape of the original self, and the dtype must be the same as that of self. Same as x ND
  • Data types supported by the GPU: The supported data types are DT_BF16, DT_FLOAT16, DT_FLOAT, DT_DOUBLE, DT_INT64, DT_INT32, DT_UINT8, DT_UINT16, DT_UINT32, DT_UINT64, DT_INT8, DT_INT16, DT_COMPLEX32, DT_COMPLEX64, DT_COMPLEX128, DT_QINT8, DT_QUINT8, DT_QINT16, DT_QUINT16, DT_QINT32, DT_BOOL, DT_HIFLOAT8, DT_FLOAT8_E5M2, and DT_FLOAT8_E4M3FN.
  • Data types supported by the CPU: The supported data types are the same as those of the GPU.

Constraint Description

None

Invocation Description

Invocation Method Sample Code Description
aclnn API test_aclnn_channel_shuffle Invokes the transpose operator through the aclnn_channel_shuffle API.
aclnn API test_aclnn_permute Invokes the transpose operator through the aclnn_permute API.