Axpy
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: multiplies each element in the source operand by a scalar, and then adds the product to the corresponding element in the destination operand.
-
Computation formula:
outi=selfi+alpha×otheriout_i=self_i + alpha × other_i
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x1 | Input | Input tensor self_i in the formula | INT32, FLOAT16, BFLOAT16, FLOAT | ND |
| x2 | Input | Input tensor other_i in the formula | INT32, FLOAT16, BFLOAT16, FLOAT | ND |
| alpha | Attribute | Input scalar alpha in the formula | FLOAT | ND |
| y | Output | Output tensor out_i in the formula | INT32, FLOAT16, BFLOAT16, FLOAT | ND |
Constraint Description
None
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| Graph-mode invocation | test_geir_axpy | Invokes the Axpy operator by building a graph through the operator IR |