未验证 提交 eaacf8bf 编写于 作者: Y YuanRisheng 提交者: GitHub

fix save_vars bugs (#40062)

上级 e7aea650
......@@ -38,7 +38,8 @@ class SaveCombineOp : public framework::OperatorWithKernel {
framework::OpKernelType GetKernelTypeForVar(
const std::string& var_name, const Tensor& tensor,
const framework::OpKernelType& expected_kernel_type) const override {
return expected_kernel_type;
return framework::OpKernelType(expected_kernel_type.data_type_,
tensor.place());
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册