Div
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
-
Interface function: performs the division computation
-
Computation formula:
outi=inputiotheriout_i = \frac{input_i}{other_i}
-
Exception: when a Complex computation is involved and the modulus of the denominator is 0, the general complex number computation formula is still used without special handling. This behavior differs from that of CPU/GPU.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x1 | Input | input in the formula. | BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, COMPLEX32, COMPLEX64 | ND |
| x2 | Input | other in the formula. | BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, COMPLEX32, COMPLEX64 | - |
| y | Output | out in the formula. | BFLOAT16, FLOAT16, FLOAT, INT32, UINT8, INT8, COMPLEX32, COMPLEX64 | ND |
Constraint Description
None
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| aclnn API | test_aclnn_div | Invokes the Div operator through the AclnnDiv API. |
| Graph-mode invocation | test_geir_div | Invokes the Div operator by building a graph through the operator IR. |