TensorEqual
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
-
API function: computes whether two tensors have the same size and elements, and returns a value of the Bool type.
-
Computation expression:
out=(self==other)?True:Falseout = (self == other) ? True : False
Parameter Description
| Parameter Name | Input/Output | Description | Usage Instructions | Data Type | Data Format | Dimension (shape) | Non-contiguous Tensor |
|---|---|---|---|---|---|---|---|
| self | Input | The first input. | The data types of self and other satisfy the data type deduction rule (see Deduction Relationship). | FLOAT16, FLOAT, INT32, INT8, UINT8, BOOL, DOUBLE, INT64, INT16, UINT16, UINT32, UINT64, BFLOAT16 | ND | - | √ |
| other | Input | The second input. | The data types of other and self satisfy the data type deduction rule (see Deduction Relationship). | FLOAT16, FLOAT, INT32, INT8, UINT8, BOOL, DOUBLE, INT64, INT16, UINT16, UINT32, UINT64, BFLOAT16 | ND | - | √ |
| out | Output | The output. The output is a one-dimensional tensor of the BOOL type that contains one element. | - | - | - | - | - |
- Atlas inference products and Atlas training products: The supported data types are FLOAT16, FLOAT, and DOUBLE.
Constraint Description
None
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| aclnn invocation | test_aclnn_equal.cpp | Invokes the TensorEqual operator through the aclnnEqual API. |