未验证 提交 d4289125 编写于 作者: Z zhang wenhui 提交者: GitHub

fix select_rows mergeadd bug, test=develop (#20876)

上级 c51722c8
...@@ -332,7 +332,7 @@ struct MergeAdd<platform::CPUDeviceContext, T> { ...@@ -332,7 +332,7 @@ struct MergeAdd<platform::CPUDeviceContext, T> {
int64_t copied_numel = 0; int64_t copied_numel = 0;
for (auto* in : inputs) { for (auto* in : inputs) {
auto* in_data = in->value().data<T>(); auto* in_data = in->value().data<T>();
auto in_numel = in->value().numel(); auto in_numel = in->rows().size() * input_width;
memory::Copy(boost::get<platform::CPUPlace>(out_place), memory::Copy(boost::get<platform::CPUPlace>(out_place),
out_data + copied_numel, out_data + copied_numel,
boost::get<platform::CPUPlace>(in_place), in_data, boost::get<platform::CPUPlace>(in_place), in_data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册