@@ -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
2222namespace paddle {
2323namespace framework {
@@ -28,7 +28,6 @@ class Variable;
2828namespace framework = paddle::framework;
2929namespace platform = paddle::platform;
3030namespace operators = paddle::operators;
31- namespace math = paddle::operators::math;
3231namespace memory = paddle::memory;
3332namespace 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
0 commit comments