diff --git a/paddle/fluid/operators/controlflow/logical_op_npu.cc b/paddle/fluid/operators/controlflow/logical_op_npu.cc index babdb2257ee3ca59aab7a378da5ef07b3023ca9f..9094aed449270fdab76afe4752bf5228217f8431 100644 --- a/paddle/fluid/operators/controlflow/logical_op_npu.cc +++ b/paddle/fluid/operators/controlflow/logical_op_npu.cc @@ -79,29 +79,11 @@ class LogicalAndPUKernel : public framework::OpKernel { namespace ops = paddle::operators; namespace plat = paddle::platform; -REGISTER_OP_NPU_KERNEL( - logical_not, ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel, - ops::LogicalNotNPUKernel); +REGISTER_OP_NPU_KERNEL(logical_not, + ops::LogicalNotNPUKernel); REGISTER_OP_NPU_KERNEL(logical_or, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel, - ops::LogicalOrNPUKernel); + ops::LogicalOrNPUKernel); REGISTER_OP_NPU_KERNEL(logical_and, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel, - ops::LogicalAndPUKernel); + ops::LogicalAndPUKernel); diff --git a/python/paddle/fluid/tests/unittests/npu/test_logical_op_npu.py b/python/paddle/fluid/tests/unittests/npu/test_logical_op_npu.py index f5f0a23d81a5034ee0c72435eae052c56c5538ed..a9f9d73a0396c70c28d12ef249b103294e420e7e 100644 --- a/python/paddle/fluid/tests/unittests/npu/test_logical_op_npu.py +++ b/python/paddle/fluid/tests/unittests/npu/test_logical_op_npu.py @@ -23,9 +23,7 @@ import paddle import paddle.fluid as fluid from paddle.static import Program, program_guard -SUPPORTED_DTYPES = [ - bool, np.int8, np.int16, np.int32, np.int64, np.float32, np.float64 -] +SUPPORTED_DTYPES = [bool] TEST_META_OP_DATA = [{ 'op_str': 'logical_and',