Skip to content

Commit 37d12be

Browse files
author
Yang Yang
committed
fix compile
1 parent 34f4e72 commit 37d12be

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

paddle/operators/fill_constant_batch_size_like_op.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,5 @@ REGISTER_OP_WITHOUT_GRADIENT(fill_constant_batch_size_like,
7878
ops::FillConstantBatchSizeLikeOpMaker);
7979
REGISTER_OP_CPU_KERNEL(
8080
fill_constant_batch_size_like,
81-
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::CPUPlace, float>);
82-
REGISTER_OP_CPU_KERNEL(
83-
fill_constant_batch_size_like,
81+
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::CPUPlace, float>,
8482
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::CPUPlace, double>);

paddle/operators/fill_constant_batch_size_like_op.cu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@
1919
namespace ops = paddle::operators;
2020
REGISTER_OP_GPU_KERNEL(
2121
fill_constant_batch_size_like,
22-
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::GPUPlace, float>);
23-
REGISTER_OP_GPU_KERNEL(
24-
fill_constant_batch_size_like,
22+
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::GPUPlace, float>,
2523
ops::FillConstantBatchSizeLikeOpKernel<paddle::platform::GPUPlace, double>);

paddle/operators/fill_constant_batch_size_like_op.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FillConstantBatchSizeLikeOpKernel : public framework::OpKernel<T> {
2525
void Compute(const framework::ExecutionContext& ctx) const override {
2626
auto* out = ctx.Output<framework::Tensor>("Out");
2727
out->mutable_data<T>(ctx.GetPlace());
28-
auto value = ctx.Attr<T>("value");
28+
auto value = ctx.Attr<float>("value");
2929

3030
auto out_eigen = framework::EigenVector<T>::Flatten(*out);
3131
auto place = ctx.GetEigenDevice<Place>();

0 commit comments

Comments
 (0)