未验证 提交 00c8ee18 编写于 作者: H Huihuang Zheng 提交者: GitHub

Fix test_cond flaky test under Windows (#24633)

In the past, the test_cond will fail with 2% probability and easy to re-produce.

Now I re-run 300 times and no failure occurs. The probability of still has the failure is (1 - 2%) ^ 300 ~= 0.00004. We can say the random failure disappears. Maybe someone fixed some bugs in PE.
  
上级 2e7e69d0
......@@ -466,12 +466,6 @@ class TestCondBackward(unittest.TestCase):
lambda: batchnorm_fc_with_inputs(img, label, class_num=10))
for use_parallel_exe in [False, True]:
if use_parallel_exe and os.name == "nt":
print(
"Skip use_parallel_exe=True in Windows because of flaky test when using PE and control flow under Windows"
)
continue
self.backward_value_helper(cond_func,
core.is_compiled_with_cuda(),
use_parallel_exe)
......@@ -493,12 +487,6 @@ class TestCondBackward(unittest.TestCase):
lambda: branch(i, img, label))
for use_parallel_exe in [False, True]:
if use_parallel_exe and os.name == "nt":
print(
"Skip use_parallel_exe=True in Windows because of flaky test when using PE and control flow under Windows"
)
continue
self.backward_value_helper(cond_func_simple_net_at_true,
core.is_compiled_with_cuda(),
use_parallel_exe)
......@@ -526,11 +514,6 @@ class TestCondBackward(unittest.TestCase):
lambda: branch(i, img, label, False))
for use_parallel_exe in [False, True]:
if use_parallel_exe and os.name == "nt":
print(
"Skip use_parallel_exe=True in Windows because of flaky test when using PE and control flow under Windows"
)
continue
self.backward_value_helper(cond_func,
core.is_compiled_with_cuda(),
use_parallel_exe)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册