未验证 提交 d3d174f7 编写于 作者: Q Qi Li 提交者: GitHub

[NPU] fix logcial op on NPU, test=develop (#34371)

上级 6b20cb4e
......@@ -79,29 +79,11 @@ class LogicalAndPUKernel : public framework::OpKernel<T> {
namespace ops = paddle::operators;
namespace plat = paddle::platform;
REGISTER_OP_NPU_KERNEL(
logical_not, ops::LogicalNotNPUKernel<plat::NPUDeviceContext, bool>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, int8_t>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, int16_t>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, int>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, int64_t>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, float>,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, double>);
REGISTER_OP_NPU_KERNEL(logical_not,
ops::LogicalNotNPUKernel<plat::NPUDeviceContext, bool>);
REGISTER_OP_NPU_KERNEL(logical_or,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, bool>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, int8_t>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, int16_t>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, int>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, int64_t>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, float>,
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, double>);
ops::LogicalOrNPUKernel<plat::NPUDeviceContext, bool>);
REGISTER_OP_NPU_KERNEL(logical_and,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, bool>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, int8_t>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, int16_t>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, int>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, int64_t>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, float>,
ops::LogicalAndPUKernel<plat::NPUDeviceContext, double>);
ops::LogicalAndPUKernel<plat::NPUDeviceContext, bool>);
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册