* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#ifndef APPROXIMATE_EQUAL_PROTO_H_
#define APPROXIMATE_EQUAL_PROTO_H_
#include "graph/operator_reg.h"
#include "graph/types.h"
namespace ge {
*@brief Returns the truth value of abs(x1-x2) < tolerance element-wise.
*@par Inputs:
* @li x1: A tensor. Must be one of the following types: float32, float16, bfloat16. \n
* @li x2: A tensor. Must have the same type and shape as "x1". \n
*@par Outputs:
* y: A tensor of type bool.
*@par Attributes:
* tolerance: An optional float. Defaults to 1e-5.
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApproximateEqual.
*/
REG_OP(ApproximateEqual)
.INPUT(x1, TensorType::NumberType())
.INPUT(x2, TensorType::NumberType())
.OUTPUT(y, TensorType({DT_BOOL}))
.ATTR(tolerance, Float, 1e-5f)
.OP_END_FACTORY_REG(ApproximateEqual)
}
#endif