This API is used to pad the input tensor self based on the pad parameter. The padding value is value.
Formulas:
Shape deduction of the
[object Object]tensor:Example 1: (The length of the
[object Object]array is twice the number of dimensions of[object Object].)Example 2: (The length of the
[object Object]array is less than twice the number of dimensions of[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.
Parameters
[object Object]- For [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]: The data type cannot be BFLOAT16, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN or FLOAT8_E8M0.
- For [object Object]Atlas A3 training products/Atlas A3 inference products[object Object] and [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: The data type cannot be HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN or FLOAT8_E8M0.
- The data types of
[object Object]and[object Object]must meet the data type deduction rules (see ). - If the data type of self is HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN or FLOAT8_E8M0, only the bit values of value can be all 0s.
Return Value
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned:
[object Object]
- Deterministic computation:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .