Description: Returns the unique elements of the input tensor.
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]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:
- aclnnUnique defaults to a deterministic implementation.
- Ascend 950PR/Ascend 950DT:
- Due to differences in the implementation of the deduplication algorithm, the operator ignores the value of the sorted input parameter and always sorts the output results in ascending order when all of the following conditions are met:
- The self input is 1D.
- The data type of self is FLOAT, FLOAT16, UINT8, INT8, UINT16, INT16, INT32, UINT32, UINT64, INT64, or BFLOAT16.
- Due to differences in the implementation of the deduplication algorithm, the operator ignores the value of the sorted input parameter and always sorts the output results in ascending order when all of the following conditions are met:
For * [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]: If the input self contains 0, the output of the operator contains both positive zero and negative zero, instead of only one zero.
The following example is for reference only. For details, see .