[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Pads the last dimension of the input tensor using replication of the input boundary.
  • Example:
[object Object]
[object Object]

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.

  • [object Object]

  • [object Object]

[object Object]
  • Parameters:

    • [object Object] (aclTensor*, compute input): original input data to be padded, aclTensor on the device. The shape supports 3 or 4 dimensions, and the data type can be BFLOAT16, FLOAT16, FLOAT32, DOUBLE, INT8, INT16, INT32, INT64, UINT8, COMPLEX64, or COMPLEX128. The supports ND. are supported.

    • [object Object] (aclIntArray*, compute input): aclIntArray on the device. The data type is INT64 and the length is 4. The values indicate respectively the values to be padded on the left, right, top, and bottom. The values of the first two dimensions of [object Object] must be less than the value of the last dimension of [object Object], and the values of the last two dimensions of [object Object] must be less than the value of the penultimate dimension of [object Object].

    • [object Object] (aclTensor*, compute output): output result after padding, aclTensor on the device. The shape supports 3 or 4 dimensions, and the data type can be BFLOAT16, FLOAT16, FLOAT32, DOUBLE, INT8, INT16, INT32, INT64, UINT8, COMPLEX64, or COMPLEX128. The supports ND. are supported. In the output shape, all dimensions except the last two dimensions to be padded must be the same. In the last two dimensions, the value of the second-to-last dimension of [object Object] is equal to the value of the second-to-last dimension of [object Object] plus the last two values of [object Object], and the value of the last dimension of [object Object] is equal to the value of the last dimension of [object Object] plus the first two values of [object Object].

    • [object Object] (uint64_t*, output): size of the workspace to be allocated on the device.

    • [object Object] (aclOpExecutor**, output): operator executor, containing the operator computation process.

  • Returns:

    [object Object]: status code. For details, see .

[object Object]
[object Object]
  • Parameters:

    • [object Object] (void*, input): address of the workspace to be allocated on the device.

    • [object Object] (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling aclnnReplicationPad2dGetWorkspaceSize.

    • [object Object] (aclOpExecutor*, input): operator executor, containing the operator computation process.

    • [object Object] (aclrtStream, input): stream for executing the task.

  • Returns:

    [object Object]: status code. For details, see .

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

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

[object Object]