[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: For the ith element of tensor repeats, repeats i for repeats[i] times.

  • Example: Assume that repeats is ([1, 3]). In this case, the generated tensor is ([0, 1, 1, 1]). The 0th element 1 of repeats indicates that 0 is repeated once. The first element 3 of repeats indicates that 1 is repeated three times.

[object Object]

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

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

    • repeats (aclTensor*, compute input): number of repeats. aclTensor on the device. The data type can be INT32 or INT64. repeats is a one-dimensional tensor (including the scenario with shape=[0,]). An empty tensor is supported. are supported. The can be ND.

    • outputSize (int64_t, compute input): final size of the tensor after repeats. int64_t type on the host. The value of outputSize must be equal to the sum of the values of repeats.

    • out (aclTensor*, compute output): aclTensor on the device. The data type must be the same as that of repeats. The shape must be the same as that of repeats. The number of elements is equal to the sum of the values of repeats.

    • 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 aclnnRepeatInterleaveTensorGetWorkspaceSize.

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

The following conditions must be met during computation:

  • repeats can only be a one-dimensional tensor (including the scenario with shape=[0,]). The value in the repeats tensor must be a natural number.
  • The value of outputSize must be equal to the sum of the values of repeats.
  • The value of outputSize cannot exceed 2^22.
[object Object]

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

[object Object]