未验证 提交 7a4f09f1 编写于 作者: D duanyanhui 提交者: GitHub

fix save_combine_op (#49695)

上级 1bdb7960
...@@ -211,8 +211,8 @@ class SaveCombineOpKernel : public framework::OpKernel<T> { ...@@ -211,8 +211,8 @@ class SaveCombineOpKernel : public framework::OpKernel<T> {
if (inp_vars.size() > 0 && inp_vars[0]->IsType<phi::DenseTensor>()) { if (inp_vars.size() > 0 && inp_vars[0]->IsType<phi::DenseTensor>()) {
std::vector<const phi::DenseTensor*> x(inp_vars.size()); std::vector<const phi::DenseTensor*> x(inp_vars.size());
for (auto inp_var : inp_vars) { for (size_t i = 0; i < inp_vars.size(); i++) {
x.push_back(&(inp_var->Get<phi::DenseTensor>())); x[i] = (&(inp_vars[i]->Get<phi::DenseTensor>()));
} }
SaveCombineTensorKernel<T>(dev_ctx, SaveCombineTensorKernel<T>(dev_ctx,
x, x,
...@@ -223,8 +223,8 @@ class SaveCombineOpKernel : public framework::OpKernel<T> { ...@@ -223,8 +223,8 @@ class SaveCombineOpKernel : public framework::OpKernel<T> {
output); output);
} else { } else {
std::vector<const phi::ExtendedTensor*> x(inp_vars.size()); std::vector<const phi::ExtendedTensor*> x(inp_vars.size());
for (auto inp_var : inp_vars) { for (size_t i = 0; i < inp_vars.size(); i++) {
x.push_back(&(inp_var->Get<framework::Vocab>())); x[i] = (&(inp_vars[i]->Get<framework::Vocab>()));
} }
SaveCombineVocabKernel<T>(dev_ctx, SaveCombineVocabKernel<T>(dev_ctx,
x, x,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册