Function: Sorts elements in the input tensor in ascending or descending order along a specified dimension and returns the corresponding index value. The input tensor self is N-dimensional [0, N – 1] and is sorted based on the dimension specified by
[object Object].Formulas:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
Parameters:
[object Object]- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
- The data type of
[object Object]cannot be UINT16, UINT32, or UINT64. - When the data type of
[object Object]is BFLOAT16, the axis specified by the[object Object]parameter cannot be 1. - The data type of
[object Object]cannot be UINT16, UINT32, or UINT64.
- The data type of
- Ascend 950PR/Ascend 950DT: The data type of
[object Object]cannot be DOUBLE or BOOL.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
Deterministic compute:
[object Object]defaults to a deterministic implementation.
If the data type of
[object Object]is not FLOAT, FLOAT16, or BFLOAT16, the operator execution may time out due to an overlarge tensor size (an AI CPU error is reported, with reason=[aicpu timeout]). The maximum size for each data type (closely related to the remaining memory of the machine) is as follows:- INT64 type: 150000000
- UINT8, INT8, INT16, INT32 types: 725000000
The following example is for reference only. For details, see .