Skip to content

Commit

Permalink
Make 'scale_op' supporting int and int64 (#5986)
Browse files Browse the repository at this point in the history
* Make 'scale_op' supporting int and int64

* refine .cu file
  • Loading branch information
JiayiFeng authored Nov 28, 2017
1 parent 6375c8c commit 23b3fef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion paddle/operators/scale_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,6 @@ REGISTER_OPERATOR(scale, ops::ScaleOp, ops::ScaleOpMaker<float>,
ops::ScaleGradMaker);
REGISTER_OP_CPU_KERNEL(scale,
ops::ScaleKernel<paddle::platform::CPUPlace, float>,
ops::ScaleKernel<paddle::platform::CPUPlace, double>);
ops::ScaleKernel<paddle::platform::CPUPlace, double>,
ops::ScaleKernel<paddle::platform::CPUPlace, int>,
ops::ScaleKernel<paddle::platform::CPUPlace, int64_t>);
4 changes: 3 additions & 1 deletion paddle/operators/scale_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@

REGISTER_OP_GPU_KERNEL(
scale, paddle::operators::ScaleKernel<paddle::platform::GPUPlace, float>,
paddle::operators::ScaleKernel<paddle::platform::GPUPlace, double>);
paddle::operators::ScaleKernel<paddle::platform::GPUPlace, double>,
paddle::operators::ScaleKernel<paddle::platform::GPUPlace, int>,
paddle::operators::ScaleKernel<paddle::platform::GPUPlace, int64_t>);

0 comments on commit 23b3fef

Please sign in to comment.