Complex
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: builds a complex tensor from the real part real and the imaginary part imag.
-
Computation formula:
out[i]=real[i]+imag[i]∗j\text{out}[i] = \text{real}[i] + \text{imag}[i] * \mathrm{j}
where j\mathrm{j} is the imaginary unit, and real and imag participate in the computation with the shapes after broadcasting.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| real | Input | Real part of the complex number, which is real in the formula. | FLOAT, FLOAT16, DOUBLE | ND |
| imag | Input | Imaginary part of the complex number, which is imag in the formula. | FLOAT, FLOAT16, DOUBLE | ND |
| out | Output | Complex tensor, which is out in the formula. | COMPLEX64, COMPLEX32, COMPLEX128 | ND |
Constraint Description
- The data types of real and imag must be the same, the dimensions of both cannot exceed 8, and the shapes must satisfy the broadcast relationship.
- The shape of out must be the shape of real and imag after broadcasting.
- On Atlas A3 products and Ascend 950PR&950DT products, when the input is FLOAT, FLOAT16, or DOUBLE, the output data type should be COMPLEX64, COMPLEX32, or COMPLEX128 respectively.
- real, imag, and out all support non-contiguous tensors.
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| aclnn invocation | test_aclnn_complex | Invokes the Complex operator through the aclnnComplex API. |