|
|
|
@ -84,7 +84,7 @@ TEST(OperatorBase, all) {
|
|
|
|
|
paddle::framework::Scope scope;
|
|
|
|
|
|
|
|
|
|
auto op = paddle::framework::OpRegistry::CreateOp(op_desc);
|
|
|
|
|
scope.NewVar("OUT1");
|
|
|
|
|
scope.Var("OUT1");
|
|
|
|
|
ASSERT_EQ(paddle::framework::op_run_num, 0);
|
|
|
|
|
op->Run(scope, device_context);
|
|
|
|
|
ASSERT_EQ(paddle::framework::op_run_num, 1);
|
|
|
|
@ -237,12 +237,12 @@ TEST(OpKernel, multi_inputs) {
|
|
|
|
|
|
|
|
|
|
paddle::platform::CPUDeviceContext cpu_device_context;
|
|
|
|
|
paddle::framework::Scope scope;
|
|
|
|
|
scope.NewVar("x0")->GetMutable<Tensor>();
|
|
|
|
|
scope.NewVar("x1")->GetMutable<Tensor>();
|
|
|
|
|
scope.NewVar("x2")->GetMutable<Tensor>();
|
|
|
|
|
scope.NewVar("k0")->GetMutable<Tensor>();
|
|
|
|
|
scope.NewVar("y0")->GetMutable<Tensor>();
|
|
|
|
|
scope.NewVar("y1")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("x0")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("x1")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("x2")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("k0")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("y0")->GetMutable<Tensor>();
|
|
|
|
|
scope.Var("y1")->GetMutable<Tensor>();
|
|
|
|
|
|
|
|
|
|
auto op = paddle::framework::OpRegistry::CreateOp(op_desc);
|
|
|
|
|
op->Run(scope, cpu_device_context);
|
|
|
|
|