Skip to content

Commit 3f6ec90

Browse files
committed
Polish code
test=develop
1 parent 8ec748c commit 3f6ec90

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

paddle/fluid/operators/math/selected_rows_functor.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ struct SelectedRowsSumTo<platform::CPUDeviceContext, T> {
172172
}
173173
input2->set_rows(in2_rows);
174174

175-
// start = std::chrono::system_clock::now();
176175
auto* in2_value = input2->mutable_value();
177176
auto* in2_data = in2_value->data<T>();
178177
auto blas = math::GetBlas<platform::CPUDeviceContext, T>(context);
@@ -275,7 +274,7 @@ struct MergeAdd<platform::CPUDeviceContext, T> {
275274
auto* input_data = input.value().data<T>();
276275

277276
for (size_t i = 0; i < input_rows.size(); i++) {
278-
size_t out_i = FindPos(merge_rows, input_rows[i]);
277+
size_t out_i = rows_pos_map[input_rows[i]];
279278
for (int64_t j = 0; j < input_width; j++) {
280279
out_data[out_i * input_width + j] += input_data[i * input_width + j];
281280
}

0 commit comments

Comments
 (0)