Skip to content

Commit

Permalink
fix datatype error
Browse files Browse the repository at this point in the history
add op to in xpu1_op_list

*test=kunlun
  • Loading branch information
runzhech committed Apr 25, 2022
1 parent dd90c72 commit f2c4337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddle/fluid/operators/elementwise/elementwise_mod_op_xpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace ops = paddle::operators;

REGISTER_OP_XPU_KERNEL(elementwise_mod, ops::ElementwiseModXPUKernel<float>,
ops::ElementwiseModXPUKernel<paddle::platform::float16>,
ops::ElementwiseModXPUKernel<int>,
ops::ElementwiseModXPUKernel<int64>);
ops::ElementwiseModXPUKernel<int32_t>,
ops::ElementwiseModXPUKernel<int64_t>);

#endif
2 changes: 2 additions & 0 deletions paddle/fluid/platform/device/xpu/xpu1_op_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ XPUOpMap& get_kl1_ops() {
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"elementwise_min_grad",
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"elementwise_mod",
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"elementwise_min",
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"elementwise_mul_grad",
Expand Down

0 comments on commit f2c4337

Please sign in to comment.