Each operator has calls. First, aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnUpsampleNearestExact3dBackward is called to perform computation.
Parameters:
[object Object]Returns:
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- The shape constraints of
[object Object]and[object Object]are as follows:The value of each dimension is less than or equal to 2^20.
The N and C axes of
[object Object]must be the same as those of[object Object].The memory usage must be less than 60 GB. The memory size can be calculated according to the following formula:
Where,
- 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 upscaling factor for input data must be less than or equal to 50. That is, , , and must be less than or equal to 50.
- Either outputSize or scalesD/scalesH/scalesW must be used.
- If the value of scalesD, scalesH, or scalesW is less than or equal to 0, the value of outputSize is used.
- If the values of scalesD, scalesH, and scalesW are greater than 0, the values of scalesD, scalesH, and scalesW are used, and .
- Deterministic computing:
- aclnnUpsampleNearestExact3dBackward defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computing.
The following example is for reference only. For details, see .