Skip to content

Commit bd226d1

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into bilinear_bw
2 parents 6a74f0d + 52bbaae commit bd226d1

File tree

322 files changed

+3463
-1523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+3463
-1523
lines changed

paddle/fluid/distributed/ps/service/communicator/communicator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ limitations under the License. */
3535
#include "paddle/fluid/framework/variable.h"
3636
#include "paddle/fluid/framework/variable_helper.h"
3737
#include "paddle/fluid/operators/math/blas.h"
38-
#include "paddle/fluid/operators/math/math_function.h"
3938
#include "paddle/fluid/operators/math/selected_rows_functor.h"
4039
#include "paddle/fluid/platform/device_context.h"
4140
#include "paddle/fluid/platform/enforce.h"
4241
#include "paddle/fluid/platform/place.h"
4342
#include "paddle/fluid/string/split.h"
43+
#include "paddle/pten/kernels/funcs/math_function.h"
4444

4545
#include "paddle/fluid/distributed/ps/service/ps_client.h"
4646

@@ -180,7 +180,7 @@ inline void MergeVars(const std::string &var_name,
180180

181181
// set output tensor to 0.
182182
paddle::platform::CPUDeviceContext cpu_ctx;
183-
paddle::operators::math::SetConstant<paddle::platform::CPUDeviceContext, T>
183+
pten::funcs::SetConstant<paddle::platform::CPUDeviceContext, T>
184184
constant_functor;
185185
constant_functor(cpu_ctx, out_t, static_cast<T>(0));
186186
// sum all vars to out

paddle/fluid/distributed/ps/service/ps_service/graph_py_service.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
#include "paddle/fluid/distributed/ps/service/ps_service/service.h"
3939
#include "paddle/fluid/distributed/ps/service/sendrecv.pb.h"
4040
#include "paddle/fluid/framework/program_desc.h"
41-
#include "paddle/fluid/operators/math/math_function.h"
4241
#include "paddle/fluid/platform/place.h"
4342
#include "paddle/fluid/string/printf.h"
43+
#include "paddle/pten/kernels/funcs/math_function.h"
44+
4445
namespace paddle {
4546
namespace distributed {
4647
class GraphPyService {

paddle/fluid/distributed/test/brpc_service_dense_sgd_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ limitations under the License. */
2121
#include "paddle/fluid/distributed/ps/service/brpc_ps_server.h"
2222
#include "paddle/fluid/framework/program_desc.h"
2323
#include "paddle/fluid/framework/scope.h"
24-
#include "paddle/fluid/operators/math/math_function.h"
2524
#include "paddle/fluid/platform/place.h"
25+
#include "paddle/pten/kernels/funcs/math_function.h"
2626

2727
namespace paddle {
2828
namespace distributed {
@@ -42,7 +42,6 @@ class DenseTensor;
4242
namespace framework = paddle::framework;
4343
namespace platform = paddle::platform;
4444
namespace operators = paddle::operators;
45-
namespace math = paddle::operators::math;
4645
namespace memory = paddle::memory;
4746
namespace distributed = paddle::distributed;
4847

paddle/fluid/distributed/test/brpc_service_sparse_sgd_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ limitations under the License. */
2222
#include "paddle/fluid/distributed/ps/service/brpc_ps_server.h"
2323
#include "paddle/fluid/distributed/ps/service/env.h"
2424
#include "paddle/fluid/framework/program_desc.h"
25-
#include "paddle/fluid/operators/math/math_function.h"
2625
#include "paddle/fluid/platform/place.h"
26+
#include "paddle/pten/kernels/funcs/math_function.h"
2727

2828
namespace paddle {
2929
namespace distributed {
@@ -43,7 +43,6 @@ class DenseTensor;
4343
namespace framework = paddle::framework;
4444
namespace platform = paddle::platform;
4545
namespace operators = paddle::operators;
46-
namespace math = paddle::operators::math;
4746
namespace memory = paddle::memory;
4847
namespace distributed = paddle::distributed;
4948

paddle/fluid/distributed/test/brpc_utils_test.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License. */
1717
#include "gtest/gtest.h"
1818

1919
#include "paddle/fluid/distributed/ps/service/brpc_utils.h"
20-
#include "paddle/fluid/operators/math/math_function.h"
20+
#include "paddle/pten/kernels/funcs/math_function.h"
2121

2222
namespace paddle {
2323
namespace framework {
@@ -28,7 +28,6 @@ class Variable;
2828
namespace framework = paddle::framework;
2929
namespace platform = paddle::platform;
3030
namespace operators = paddle::operators;
31-
namespace math = paddle::operators::math;
3231
namespace memory = paddle::memory;
3332
namespace distributed = paddle::distributed;
3433

@@ -42,7 +41,7 @@ void CreateVarsOnScope(framework::Scope* scope, platform::Place* place,
4241
lod1.push_back(framework::Vector<size_t>({1, 3, 8}));
4342
tensor1->set_lod(lod1);
4443
tensor1->mutable_data<float>(*place);
45-
math::set_constant(ctx, tensor1, 31.9);
44+
pten::funcs::set_constant(ctx, tensor1, 31.9);
4645

4746
// var 2
4847
framework::Variable* var2 = scope->Var("x2");
@@ -52,7 +51,7 @@ void CreateVarsOnScope(framework::Scope* scope, platform::Place* place,
5251
lod2.push_back(framework::Vector<size_t>({1, 1}));
5352
tensor2->set_lod(lod2);
5453
tensor2->mutable_data<int>(*place);
55-
math::set_constant(ctx, tensor2, 100);
54+
pten::funcs::set_constant(ctx, tensor2, 100);
5655

5756
// var 3
5857
framework::Variable* var3 = scope->Var("x3");
@@ -62,7 +61,7 @@ void CreateVarsOnScope(framework::Scope* scope, platform::Place* place,
6261
auto* rows = slr->mutable_rows();
6362
tensor3->Resize(framework::make_ddim({564, 128}));
6463
tensor3->mutable_data<float>(*place);
65-
math::set_constant(ctx, tensor3, 32.7);
64+
pten::funcs::set_constant(ctx, tensor3, 32.7);
6665
for (int i = 0; i < 564; ++i) rows->push_back(i);
6766
}
6867

paddle/fluid/distributed/test/graph_node_split_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ limitations under the License. */
3636
#include "paddle/fluid/framework/scope.h"
3737
#include "paddle/fluid/framework/tensor_util.h"
3838
#include "paddle/fluid/framework/variable.h"
39-
#include "paddle/fluid/operators/math/math_function.h"
4039
#include "paddle/fluid/platform/place.h"
4140
#include "paddle/fluid/string/printf.h"
41+
#include "paddle/pten/kernels/funcs/math_function.h"
4242

4343
namespace framework = paddle::framework;
4444
namespace platform = paddle::platform;
4545
namespace operators = paddle::operators;
46-
namespace math = paddle::operators::math;
4746
namespace memory = paddle::memory;
4847
namespace distributed = paddle::distributed;
4948

paddle/fluid/distributed/test/graph_node_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ limitations under the License. */
3636
#include "paddle/fluid/framework/scope.h"
3737
#include "paddle/fluid/framework/tensor_util.h"
3838
#include "paddle/fluid/framework/variable.h"
39-
#include "paddle/fluid/operators/math/math_function.h"
4039
#include "paddle/fluid/platform/place.h"
4140
#include "paddle/fluid/string/printf.h"
41+
#include "paddle/pten/kernels/funcs/math_function.h"
4242

4343
namespace framework = paddle::framework;
4444
namespace platform = paddle::platform;
4545
namespace operators = paddle::operators;
46-
namespace math = paddle::operators::math;
4746
namespace memory = paddle::memory;
4847
namespace distributed = paddle::distributed;
4948

paddle/fluid/eager/grad_tensor_holder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "paddle/fluid/imperative/gradient_accumulator.h"
1717

1818
#include "paddle/fluid/framework/var_type.h"
19-
#include "paddle/fluid/operators/math/math_function.h"
19+
#include "paddle/pten/kernels/funcs/math_function.h"
2020

2121
namespace egr {
2222

paddle/fluid/framework/data_device_transform_test.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ limitations under the License. */
1919
#include "paddle/fluid/framework/op_registry.h"
2020
#include "paddle/fluid/framework/scope.h"
2121
#include "paddle/fluid/operators/elementwise/elementwise_op_function.h"
22-
#include "paddle/fluid/operators/math/math_function.h"
2322
#include "paddle/fluid/platform/device_context.h"
2423
#include "paddle/fluid/platform/init.h"
24+
#include "paddle/pten/kernels/funcs/math_function.h"
2525

2626
#include "paddle/fluid/framework/pten_utils.h"
2727

paddle/fluid/framework/data_layout_transform.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "paddle/fluid/framework/data_layout_transform.h"
1616

17-
#include "paddle/fluid/operators/math/math_function.h"
17+
#include "paddle/pten/kernels/funcs/math_function.h"
1818
#ifdef PADDLE_WITH_MKLDNN
1919
#include "paddle/fluid/platform/mkldnn_reuse.h"
2020
#endif
@@ -42,7 +42,7 @@ void CastDataLayout::apply() {
4242
auto place = ctx_->GetPlace();
4343

4444
if (platform::is_cpu_place(place)) {
45-
operators::math::Transpose<platform::CPUDeviceContext, T, 4> trans4;
45+
pten::funcs::Transpose<platform::CPUDeviceContext, T, 4> trans4;
4646
auto* context = static_cast<const platform::CPUDeviceContext*>(ctx_);
4747
trans4(*context, in_, out_, axis_);
4848
} else {

0 commit comments

Comments
 (0)