@@ -122,10 +122,10 @@ class CPUKernelTest : public OpKernel {
122122 public:
123123 void Compute (const ExecutionContext& ctx) const {
124124 std::cout << " this is cpu kernel" << std::endl;
125- std::cout << ctx.op_ .DebugString () << std::endl;
125+ std::cout << ctx.op () .DebugString () << std::endl;
126126 cpu_kernel_run_num++;
127- ASSERT_EQ (ctx.op_ .Input (" x" ), " IN1" );
128- ASSERT_EQ (ctx.op_ .Output (" y" ), " OUT1" );
127+ ASSERT_EQ (ctx.op () .Input (" x" ), " IN1" );
128+ ASSERT_EQ (ctx.op () .Output (" y" ), " OUT1" );
129129 }
130130};
131131
@@ -148,7 +148,7 @@ class OpKernelTestMultiInputsProtoAndCheckerMaker
148148class CPUKernalMultiInputsTest : public OpKernel {
149149 public:
150150 void Compute (const ExecutionContext& ctx) const {
151- auto xs = ctx.op_ .Inputs (" xs" );
151+ auto xs = ctx.op () .Inputs (" xs" );
152152 ASSERT_EQ (xs.size (), 3UL );
153153 ASSERT_EQ (xs[0 ], " x0" );
154154 ASSERT_EQ (xs[1 ], " x1" );
@@ -172,10 +172,10 @@ class CPUKernalMultiInputsTest : public OpKernel {
172172 auto outTensor0 = ctx.MultiOutput <Tensor>(" ys" );
173173 ASSERT_EQ (outTensor0.size (), 2U );
174174
175- auto k = ctx.op_ .Input (" k" );
175+ auto k = ctx.op () .Input (" k" );
176176 ASSERT_EQ (k, " k0" );
177177
178- auto ys = ctx.op_ .Outputs (" ys" );
178+ auto ys = ctx.op () .Outputs (" ys" );
179179 ASSERT_EQ (ys.size (), 2UL );
180180 ASSERT_EQ (ys[0 ], " y0" );
181181 ASSERT_EQ (ys[1 ], " y1" );
0 commit comments