[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Repeats each element in the tensor based on the dim dimension for the corresponding number of times specified by repeats.

  • Example: Assume that the input tensor is ([[a, b], [c, d], [e, f]]). repeats is 2, and dim is 0. In this case, the generated tensor is [ [a, b], [a, b], [c, d], [c, d], [e, f], [e, f]]. In the dimension with dim = 0, a and b are repeated twice, c and d are repeated twice, and e and f are repeated twice.

  • The following condition must be met during computation: outputSize = Size of the dim dimension of self × Value of repeats

[object Object]

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

  • [object Object]
  • [object Object]
[object Object]
  • Parameters:

    • self (aclTensor*, compute input): aclTensor on the device, indicating the input tensor to be copied. Empty tensors and are supported. The can be ND, and the shape supports one to eight dimensions.

      • [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be UINT8, INT8, INT16, INT32, INT64, BOOL, FLOAT16, or FLOAT.
      • [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 UINT8, INT8, INT16, INT32, INT64, BOOL, FLOAT16, BFLOAT16, or FLOAT.
    • repeats (int64_t, compute input): number of repeats. int64_t type on the host. The value of repeats must be a non-negative number.

    • dim (int64_t, compute input): dimension for repeats, int64_t type on the host. The value range is [–self.dim(), self.dim() – 1].

    • outputSize (int64_t, compute input): final size of the tensor along the dim dimension after repeats. int64_t type on the host. outputSize must be equal to repeats multiplied by the size of the dim dimension of self.

    • out (aclTensor*, compute output): aclTensor on the device, output tensor after data copy is complete. The data type must be the same as that of self. The can be ND, and the shape has the same number of dimensions as that of self. The size of the dim dimension of out is equal to repeats multiplied by the size of the dim dimension of self.

      • [object Object]Atlas inference series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be UINT8, INT8, INT16, INT32, INT64, BOOL, FLOAT16, or FLOAT.
      • [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 UINT8, INT8, INT16, INT32, INT64, BOOL, FLOAT16, BFLOAT16, or FLOAT.
    • workspaceSize (uint64_t*, output): size of the workspace 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 aclnnRepeatInterleaveIntWithDimGetWorkspaceSize.

    • 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:
    • aclnnRepeatInterleaveIntWithDim defaults to a deterministic implementation.

The following condition must be met during computation: outputSize = Size of the dim dimension of self × Value of repeats.

[object Object]

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

[object Object]