FilesLast commitLast update
24 days ago
3 months ago
23 days ago
24 days ago
24 days ago
11 days ago
1 month ago
1 month ago
11 days ago
README

DivNoNan

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: performs the safe division computation and avoids the NaN value problem caused by a denominator of 0 during division. When the denominator is 0, 0 is returned instead of NaN.
  • Computation formula:

    y={x1x2,if x2≠00,if x2=0y = \begin{cases} \frac{x1}{x2}, & \text{if } x2 \neq 0 \\ 0, & \text{if } x2 = 0 \end{cases}

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x1 Input The input x1 in the formula, which serves as the numerator. FLOAT, FLOAT16, BFLOAT16, INT32, UINT8, INT8 ND
x2 Input The input x2 in the formula, which serves as the denominator. FLOAT, FLOAT16, BFLOAT16, INT32, UINT8, INT8 ND
y Output The output y in the formula. FLOAT, FLOAT16, BFLOAT16, INT32, UINT8, INT8 ND
  • Atlas training products, Atlas inference products, and Atlas 200I/500 A2 inference products: BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Sample Code Description
Graph mode test_geir_div_no_nan Invokes the DivNoNan operator by building a graph through the operator IR.