Each operator has calls. First, aclnnUpsampleNearest3dBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnUpsampleNearest3dBackward is called to perform computation.
Parameters
[object Object]Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
The shape constraints of gradOut and gradInput are as follows:
The value of each dimension is less than or equal to 2^20.
The N and C axes of gradInput must be the same as those of gradOut.
The memory usage must be less than 60 GB. The memory size can be calculated according to the following formula:
The values are as follows:
- N indicates the N axis of the input and output.
- C indicates the C axis of the input and output.
N * C * gradOut_D * gradOut_H < 2^31
gradInput_W * gradInput_H < 2^31
If the data formats of gradOut and gradInput are not NCDHW or NDHWC, the input data is processed as NCDHW by default.
The inputSize, outputSize, scalesD, scalesH, and scalesW parameters must meet the following constraints:
Deterministic computation:
- The deterministic implementation of aclnnUpsampleNearest3dBackward is used by default.
The following example is for reference only. For details, see .