Skip to content

Commit

Permalink
fix linspace (#41404)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiu authored Apr 5, 2022
1 parent 870402f commit 84e8ae7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/fluid/operators/linspace_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class LinspaceOp : public framework::OperatorWithKernel {
framework::OpKernelType GetKernelTypeForVar(
const std::string &var_name, const framework::Tensor &tensor,
const framework::OpKernelType &expected_kernel_type) const override {
return expected_kernel_type;
return framework::OpKernelType(expected_kernel_type.data_type_,
tensor.place(), tensor.layout());
}
};

Expand Down

0 comments on commit 84e8ae7

Please sign in to comment.