FilesLast commitLast update
12 days ago
2 months ago
3 months ago
9 days ago
25 days ago
13 days ago
14 days ago
21 days ago
14 days ago
13 days ago
1 month ago
13 days ago
README

Pow

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

  • API function: completes the computation by using each element of exponent as the power of the corresponding element of input.

  • Computation formula:

outi=inputiexponentiout_i = input_i^{exponent_i}

Parameter Description

Parameter Name Input/Output Description Data Type Data Format
input Input Indicates the base. The data types of input and exponent satisfy the TensorScalar mutual deduction relationship. FLOAT, FLOAT16, DOUBLE, INT16, INT32, INT64, INT8, UINT8, COMPLEX64, COMPLEX128, BFLOAT16 ND
exponent Input Indicates the exponent. The data types of exponent and input satisfy the TensorScalar mutual deduction relationship. FLOAT, FLOAT16, DOUBLE, INT16, INT32, INT64, INT8, UINT8, COMPLEX64, COMPLEX128, BFLOAT16 ND
out Output Indicates input raised to the power of exponent. The data type must be a data type to which the inferred data types of input and exponent can be converted (for details, see the mutual conversion relationship). FLOAT, FLOAT16, DOUBLE, INT16, INT32, INT64, INT8, UINT8, COMPLEX64, COMPLEX128, BFLOAT16 ND

Constraint Description

Operator constraint: for INT32 integer computation, a timeout occurs in scenarios beyond the following ranges.

shape exponent_value
<=100000 (100 thousand) -200000000~200000000 (200 million)
<=1000000 (1 million) -20000000~20000000 (20 million)
<=10000000 (10 million) -2000000~2000000 (2 million)
<=100000000 (100 million) -200000~200000 (200 thousand)
<=1000000000 (1 billion) -20000~20000 (20 thousand)

Invocation Description

Invocation Method Sample Code Description
aclnn invocation test_aclnn_exp2 Invokes the Pow operator through the aclnnExp2 API.
aclnn invocation test_aclnn_pow_tensor_tensor Invokes the Pow operator through the aclnnPowTensorTensor API.
Graph-mode invocation test_geir_pow Invokes the Pow operator by building a graph through the operator IR.