未验证 提交 1f2c38a0 编写于 作者: R Ruibiao Chen 提交者: GitHub

Reduce test cases for test_buffer_shared_memory_reuse_pass (#45662)

上级 3be7f495
...@@ -106,8 +106,8 @@ class InplaceTestBase(unittest.TestCase): ...@@ -106,8 +106,8 @@ class InplaceTestBase(unittest.TestCase):
repeated_var_names = all_vars_name repeated_var_names = all_vars_name
random.shuffle(repeated_var_names) # add some random random.shuffle(repeated_var_names) # add some random
for fetch_var in repeated_var_names: for fetch_var in repeated_var_names[:4]:
for _ in range(4): for _ in range(2):
with fluid.scope_guard(scope1): with fluid.scope_guard(scope1):
fetch_val1, = exe.run(prog1, fetch_val1, = exe.run(prog1,
feed=feed_dict, feed=feed_dict,
...@@ -158,8 +158,8 @@ class InplaceTestBase(unittest.TestCase): ...@@ -158,8 +158,8 @@ class InplaceTestBase(unittest.TestCase):
repeated_var_names = self.get_all_vars(prog1) repeated_var_names = self.get_all_vars(prog1)
random.shuffle(repeated_var_names) # add some random random.shuffle(repeated_var_names) # add some random
for fetch_var in repeated_var_names: for fetch_var in repeated_var_names[:4]:
for _ in range(4): for _ in range(2):
fetch_vals = [] fetch_vals = []
for scope, compiled_prog in zip(scopes, compiled_programs): for scope, compiled_prog in zip(scopes, compiled_programs):
with fluid.scope_guard(scope): with fluid.scope_guard(scope):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册