diff --git a/paddle/fluid/operators/math/selected_rows_functor.cc b/paddle/fluid/operators/math/selected_rows_functor.cc index 1c0e88f0752a9bfe5ced7a012724fc546088d068..2679f501dac040d01c1dd728bc27b9676fe126c4 100644 --- a/paddle/fluid/operators/math/selected_rows_functor.cc +++ b/paddle/fluid/operators/math/selected_rows_functor.cc @@ -233,8 +233,8 @@ template typename std::enable_if< std::is_floating_point::value && std::is_same::value>::type -elementwise_add(const DeviceContext& ctx, BlasT* blas, - size_t data_len, const T* in, T* out) { +elementwise_add_to(const DeviceContext& ctx, BlasT* blas, + size_t data_len, const T* in, T* out) { blas->AXPY(data_len, 1., in, out); } @@ -242,8 +242,8 @@ template typename std::enable_if< !std::is_floating_point::value && std::is_same::value>::type -elementwise_add(const DeviceContext& ctx, BlasT* blas, - size_t data_len, const T* in, T* out) { +elementwise_add_to(const DeviceContext& ctx, BlasT* blas, + size_t data_len, const T* in, T* out) { for (int64_t i = 0; i < data_len; i++) { out[i] += in[i]; } @@ -308,7 +308,7 @@ struct MergeAdd { for (size_t i = 0; i < input_rows.size(); i++) { size_t out_i = rows_to_id[input_rows[i]]; - elementwise_add( + elementwise_add_to( context, &blas, static_cast(input_width), &input_data[i * input_width], &out_data[out_i * input_width]); }