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

TruncateMod

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: returns the remainder of self divided by other.

  • Computation formula:

    After the tensor self and the scalar or tensor other are broadcast into tensors of the same shape, TruncateMod can be expressed by the following mathematical formula:

    outi=selfi−trunc(selfiotheri)∗otheriout_{i} = self_{i} - trunc \left(\frac{self_{i}}{other_{i}}\right) * other_{i}

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
self Input Input parameter for the TruncateMod computation, which is self_i in the formula. DOUBLE, BFLOAT16, FLOAT16, FLOAT32, INT32, INT64, INT8, UINT8 ND
other Input Input parameter for the TruncateMod computation, which is other_i in the formula. DOUBLE, BFLOAT16, FLOAT16, FLOAT32, INT32, INT64, INT8, UINT8 ND
out Output Output parameter for the TruncateMod computation, which is out_i in the formula. DOUBLE, BFLOAT16, FLOAT16, FLOAT32, INT32, INT64, INT8, UINT8 ND

Constraint Description

  • The data types must satisfy the data type deduction rule, and the deduced data type must be within the supported data type range.
  • The shapes of self and other must satisfy the broadcast rules.
  • More than 8 dimensions are not supported.

Invocation Description

Invocation Method Sample Code Description
geir API test_geir_truncate_mod Invokes the TruncateMod operator through the geir API.