Description: Repeats each element for the number of times specified by repeats after the tensor self is flattened.
Example: Assume that the input tensor is ([[a, b], [c, d], [e, f]]), and the value of repeats is 2. In this case, the generated tensor is ([a, a, b, b, c, c, d, d, e, e, f, f]). After the tensor is flattened, the input is converted into ([a, b, c, d, e, f]). Each element in the tensor is repeated based on the number of times specified by repeats, that is, each element is repeated twice.
Each operator has calls. First, aclnnRepeatInterleaveIntGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnRepeatInterleaveInt is called to perform computation.
[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 zero 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.
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 number of elements of self multiplied by the value of repeats.
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. The shape is a one-dimensional tensor, and must have the same size as outputSize.
- [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:
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 aclnnRepeatInterleaveIntGetWorkspaceSize.
executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
stream (aclrtStream, input): stream for executing the task.
Returns:
- Deterministic compute:
- aclnnRepeatInterleaveInt defaults to a deterministic implementation.
The following condition must be met during computation: outputSize = Value of repeats × Number of elements.
The following example is for reference only. For details, see .