FilesLast commitLast update
2 months ago
3 months ago
4 months ago
17 days ago
1 month ago
2 months ago
9 days ago
1 month ago
1 month ago
9 days ago
README

TruncateDiv

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: performs the truncation division computation, and the result is rounded toward zero

  • Computation formula:

    outi=trunc(x1ix2i)out_i = trunc(\frac{x1_i}{x2_i})

    where trunc indicates rounding toward zero (truncation).

  • Exception: None

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x1 Input The dividend in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, INT64, INT16 ND
x2 Input The divisor in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, INT64, INT16 ND
y Output out in the formula, which is the truncation division result. BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, INT64, INT16 ND

Constraint Description

  • The inputs x1 and x2 must satisfy the broadcast relationship.
  • When the divisor is 0, the result is undefined behavior.

Invocation Description

Invocation Method Sample Code Description
Graph-mode invocation test_geir_truncate_div Invokes the TruncateDiv operator by building a graph through the operator IR.