Cross
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: performs the linear_cross operation on the input tensors.
-
Computation formula:
out=self×other=∣ijkx1y1z1x2y2z2∣=(y1z2−y2z1)i−(x1z2−x2z1)j+(x1y2−x2y1)kout = self\times other = \begin{vmatrix}i&j&k\\x_1&y_1&z_1\\x_2&y_2&z_2\end{vmatrix} = (y_1z_2-y_2z_1)i-(x_1z_2-x_2z_1)j+(x_1y_2-x_2y_1)k
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| self | Input | Input self in the computation formula. | FLOAT16, FLOAT, INT32, INT8, UINT8, INT16, DOUBLE, INT64, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128 | ND |
| other | Input | Input other in the computation formula. | FLOAT16, FLOAT, INT32, INT8, UINT8, INT16, DOUBLE, INT64, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128 | ND |
| out | Output | Output out in the computation formula. | FLOAT16, FLOAT, INT32, INT8, UINT8, INT16, DOUBLE, INT64, UINT16, UINT32, UINT64, COMPLEX64, COMPLEX128 | ND |
- Atlas training products: the supported data types are INT8, INT16, INT32, INT64, UINT8, FLOAT16, FLOAT, FLOAT64, COMPLEX64, and COMPLEX128.
- Atlas A2 products and Atlas A3 products: the supported data types are INT8, INT16, INT32, INT64, UINT8, FLOAT16, BFLOAT16, FLOAT, FLOAT64, COMPLEX64, and COMPLEX128.
Constraint Description
None.
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| aclnn invocation | test_aclnn_linalg_cross.cpp | Invokes the Cross operator through the aclnnLinalgCross API. |
| Graph-mode invocation | test_geir_linalg_cross.cpp | Invokes the Cross operator by building a graph through the operator IR. |