Reverses the order of elements along specified dimensions of an n-dimensional input tensor. For each axis specified in dims, the output tensor element is computed as:
Where is the number of dimensions of the input tensor, = -1 - , and represents the length of the -th axis.
Each operator has calls. First, aclnnFlipGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnFlip is called to perform computation.
[object Object][object Object]
Parameters
- self (aclTensor*, input): device-side aclTensor. are supported. The can be ND. The supported dimensions are 1D to 8D.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT16, FLOAT, INT32, INT16, INT64, BOOL, INT8, UINT8, FLOAT64, COMPLEX64, COMPLEX128, or BFLOAT16.
- [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be FLOAT16, FLOAT, INT32, INT16, INT64, BOOL, INT8, UINT8, FLOAT64, COMPLEX64, or COMPLEX128.
- dims (aclIntArray*, input): axes to be reversed. This parameter is of the aclIntArray type with INT64 elements. The value range is [–self.dim(), self.dim()).
- out (aclTensor*, output): reversed output tensor, which is a device-side aclTensor. The dimension, shape, and data type must be the same as those of the input.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT16, FLOAT, INT32, INT16, INT64, BOOL, INT8, UINT8, FLOAT64, COMPLEX64, COMPLEX128, or BFLOAT16.
- [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be FLOAT16, FLOAT, INT32, INT16, INT64, BOOL, INT8, UINT8, FLOAT64, COMPLEX64, or COMPLEX128.
- workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
- executor (aclOpExecutor**, output): operator executor, containing the operator computation flow.
- self (aclTensor*, input): device-side aclTensor. are supported. The can be ND. The supported dimensions are 1D to 8D.
Returns
[object Object]
Parameters
- workspace (void*, input): address of the workspace to be allocated on the device.
- workspaceSize (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API aclnnFlipGetWorkspaceSize.
- stream (aclrtStream, input): stream for executing the task.
- executor (OpExecutor*, input): operator executor, containing the operator computation flow.
Returns
- Deterministic computation:
- aclnnFlip defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]