[object Object]

[object Object][object Object]undefined
[object Object]

Description: Eliminates all but the first element from every consecutive group of equivalent elements. When dim is not empty, tensors except the first tensor from every consecutive group of equivalent elements are eliminated along the corresponding dimension.

[object Object]

Each operator has calls. First, aclnnUniqueConsecutiveGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnUniqueConsecutive is called to perform computation.

  • [object Object]
  • [object Object]
[object Object]
  • Parameters:
    • self (aclTensor*, compute input): aclTensor on the device. The number of dimensions cannot exceed eight. The can be ND.
      • [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128 or BOOL.
      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128, BOOL or BFLOAT16.
    • returnInverse (bool, compute input): whether to return the position subscripts of elements in valueOut corresponding to elements of self. True indicates that the subscripts are returned, and False indicates that the subscripts are not returned.
    • returnCounts (bool, compute input): whether to return the number of consecutive occurrences for where elements in the input self map to in valueOut. True indicates that the number is returned, and False indicates that the number is not returned.
    • dim (int64_t, compute input): dimension to apply unique.
    • valueOut (aclTensor*, compute output): first output tensor, which returns the result after consecutive duplicate elements are eliminated. The can be ND.
      • [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128 or BOOL.
      • [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 FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128, BOOL or BFLOAT16.
    • inverseOut (aclTensor*, compute output): second output tensor. This parameter is valid when returnInverse is True. It returns the position subscripts of elements in valueOut corresponding to elements of self. The data type can be INT64. The can be ND.
    • countsOut (aclTensor*, compute output): third output tensor. This parameter is valid when returnCounts is True. It returns the number of consecutive occurrences for where elements in the input self map to in valueOut. The data type can be INT64. The can be ND.
    • workspaceSize (uint64_t*, output): size of the workspace required to be allocated on the device.
    • executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
  • Returns: aclnnStatus: status code. For details, see .
[object Object]
[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 the first-phase API aclnnUniqueConsecutiveGetWorkspaceSize.
    • executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
    • stream (aclrtStream, input): stream for executing the task.
  • Returns:

    aclnnStatus: status code. For details, see .

[object Object]
  • Deterministic compute:
    • aclnnUniqueConsecutive defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]