- Description: Returns a new tensor with Boolean elements and determines whether the given values of
[object Object]and[object Object]are close to each other, and returns[object Object]if the values are close to each other and returns[object Object]otherwise. - Formula:
Returns a new tensor
[object Object]of type[object Object], indicating whether each element of the input[object Object]is close to the corresponding element of the input[object Object]. Closeness is defined as: When both[object Object]and[object Object]are finite values, the foregoing formula is true. When both[object Object]and[object Object]are non-finite, the result is[object Object]only if they are equal. When[object Object]is[object Object],[object Object]is considered to be closed. When[object Object]is[object Object],[object Object]is considered not to be closed.
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
[object Object][object Object]
Parameters:
[object Object](aclTensor*, compute input): aclTensor on the device of[object Object]in the formula. are supported. The dtype must be the same as that of[object Object]. The[object Object]and[object Object]must meet the broadcast relationship. The can be ND, and the data is less than or equal to 8D.- [object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]: The data type can be FLOAT, FLOAT16, INT32, INT64, INT16, INT8, UINT8, BOOL, or DOUBLE.
- [object Object]Atlas A3 training products/Atlas A3 inference products[object Object] and [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: The data type can be FLOAT, FLOAT16, INT32, INT64, INT16, INT8, UINT8, BOOL, DOUBLE, or BFLOAT16.
[object Object](aclTensor*, compute input): aclTensor on the device. The data type can be FLOAT, FLOAT16, INT32, or BFLOAT16. [non-contiguous tensors] (../common/non_contiguous_tensor.md) are supported, the dtype must be the same as that of[object Object]. The[object Object]and[object Object]must meet the broadcast relationship. The can be ND, and the data is less than or equal to 8D.[object Object](double, compute input):[object Object]in the formula, indicating the relative tolerance. The data type can be DOUBLE.[object Object](double, compute input):[object Object]in the formula, indicating the absolute difference. The data type can be DOUBLE.[object Object](bool, compute input):[object Object]in the formula, indicating the comparison of two NaN values. If the value is[object Object], two[object Object]values are considered equal. If the value is[object Object], two[object Object]values are considered unequal. The data type can be BOOL.[object Object](aclTensor*, computation output):[object Object]in the formula, the calculation result, which indicates whether the elements in the two inputs are close.[object Object]on the device. The data type is BOOL. are supported. Its[object Object]should be the same as that of[object Object]. The can be ND. The shape is the same as that of[object Object], and the data is not greater than 8D.[object Object](uint64_t*, compute output): size of the workspace to be allocated on the device.[object Object](aclOpExecutor**, compute output): operator executor, containing the operator computation process.
Returns:
[object Object]
Parameters:
[object Object](void*, input): address of the workspace to be allocated on the device.[object Object](uint64_t, input): size of the workspace to be allocated on the device, which is obtained by the first-phase API[object Object].[object Object](aclOpExecutor*, input): operator executor, containing the operator computation process.[object Object](aclrtStream, input): stream for executing the task.
Returns
- Deterministic computation:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]