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]
Parameters
[object Object](aclTensor*, computation input): gradient data input during backward propagation,[object Object]on the device. The data type can be FLOAT16, BFLOAT16, or FLOAT32 and must be the same as that of[object Object]. The can be ND. The shape must be 3D or 4D and must be identical to that of the output of[object Object]. The number of dimensions must be the same as those of[object Object]and[object Object].[object Object](aclTensor*, computation input): original input data to be padded during forward propagation,[object Object]on the device. The data type can be FLOAT16, BFLOAT16, or FLOAT32. The can be ND. The shape must be 3D or 4D and must be identical to that of[object Object]. The number of dimensions must be the same as those of[object Object]and[object Object].[object Object](aclIntArray*, computation input): padding dimension in forward propagation,[object Object]on the device. The shape is 1D, the data type is INT64, the can be ND, and the length is 4. The values represent the padding values on the left, right, top, and bottom, respectively. The first two values of[object Object]must be less than the size of the last dimension of[object Object], and the last two values must be less than the size of the second-to-last dimension of[object Object].[object Object](aclTensor*, computation output): gradient data output during backward propagation,[object Object]on the device. The data type can be FLOAT16, BFLOAT16, or FLOAT32 and must be the same as that of[object Object]. The can be ND. The shape must be 3D or 4D and must be identical to that of[object Object]. The number of dimensions must be the same as those of[object Object]and[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]
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 the first-phase API[object Object].[object Object](aclOpExecutor*, input): operator executor, containing the operator computation process.[object Object](aclrtStream, input): stream for executing the task.
Returns
Deterministic computation:
[object Object]defaults to a deterministic implementation.
The size of the last dimension of
[object Object]must meet the following requirements:- FLOAT16/BFLOAT16: (0, 16362)
- FLOAT32: (0, 24544)
The following example is for reference only. For details, see .
[object Object]