未验证 提交 897f63b4 编写于 作者: L Leo Chen 提交者: GitHub

[new-exec] refine ut (#38798)

上级 5c73a6ea
......@@ -32,18 +32,16 @@ class LinearTestCase(unittest.TestCase):
self.place.set_place(place)
def build_program(self):
a = paddle.static.data(name="a", shape=[2, 2], dtype='float32')
b = paddle.ones([2, 2]) * 2
t = paddle.static.nn.fc(a, 2)
c = t + b
main_program = paddle.fluid.default_main_program()
startup_program = paddle.fluid.default_startup_program()
startup_program = paddle.static.Program()
main_program = paddle.static.Program()
with paddle.static.program_guard(main_program, startup_program):
a = paddle.static.data(name="a", shape=[2, 2], dtype='float32')
b = paddle.ones([2, 2]) * 2
t = paddle.static.nn.fc(a, 2)
c = t + b
return startup_program, main_program, c
return standaloneexecutor, c
def test_interp_base(self):
startup_program, main_program, c = self.build_program()
standaloneexecutor = StandaloneExecutor(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册