Skip to content

Commit

Permalink
【NPU】Add int dtype kernel for reshape2 op (PaddlePaddle#31864)
Browse files Browse the repository at this point in the history
* fix

* fix
  • Loading branch information
frankwhzhang committed Apr 12, 2021
1 parent 5f0944d commit 661c4b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions paddle/fluid/operators/reshape_op_npu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,20 @@ namespace ops = paddle::operators;

REGISTER_OP_NPU_KERNEL(
reshape2, ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, float>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, int>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, int64_t>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, bool>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, double>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext, uint8_t>,
ops::Reshape2NPUKernel<paddle::platform::NPUDeviceContext,
paddle::platform::float16>);
REGISTER_OP_NPU_KERNEL(
reshape2_grad,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, float>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, int>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, int64_t>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, bool>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, double>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext, uint8_t>,
ops::Reshape2GradNPUKernel<paddle::platform::NPUDeviceContext,
paddle::platform::float16>);

0 comments on commit 661c4b2

Please sign in to comment.