FilesLast commitLast update
7 days ago
9 days ago
3 months ago
30 days ago
5 months ago
8 days ago
16 days ago
8 days ago
15 days ago
9 days ago
9 days ago
README

Xlogy

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

  • Operator function: computes x1 * log(x2) element-wise and supports broadcasting.

  • Computation formula:

outi={0if x1i=0x1i⋅ln⁡(x2i)otherwiseout_i = \begin{cases} 0 & \text{if } x1_i = 0 \\ x1_i \cdot \ln(x2_i) & \text{otherwise} \end{cases}

When x2 is NaN, the output propagates NaN.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x1 Input The first input of xlogy, which is x1_i in the formula. FLOAT, FLOAT16, BFLOAT16 ND
x2 Input The second input of xlogy, which is x2_i in the formula. FLOAT, FLOAT16, BFLOAT16 ND
y Output The output of xlogy, which is out_i in the formula. FLOAT, FLOAT16, BFLOAT16 ND

Constraint Description

  • The inputs x1 and x2 must have the same data type.
  • The maximum number of dimensions is 8.

Invocation Description

Invocation Method Sample Code Description
aclnn API test_aclnn_x_log_y_tensor Invokes the Xlogy operator through the aclnnXLogYTensor and aclnnInplaceXLogYTensor APIs.
aclnn API test_aclnn_x_log_y_scalar_self Invokes the Xlogy operator through the aclnnXLogYScalarSelf API.
aclnn API test_aclnn_x_log_y_scalar_other Invokes the Xlogy operator through the aclnnXLogYScalarOther and aclnnInplaceXLogYScalarOther APIs.
GE graph mode test_geir_xlogy Invokes the Xlogy operator by building a graph through the operator IR.