Skip to content

Commit

Permalink
Handle Windows flaky test (PaddlePaddle#25070)
Browse files Browse the repository at this point in the history
As the title
  • Loading branch information
zhhsplendid authored Jun 16, 2020
1 parent 5822862 commit 2c500c3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/paddle/fluid/tests/unittests/test_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ def cond_func(i, img, label):
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 under old Windows machine"
)
continue

self.backward_value_helper(cond_func,
core.is_compiled_with_cuda(),
use_parallel_exe)
Expand All @@ -487,6 +493,12 @@ def cond_func_simple_net_at_false(i, img, label):
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 under old Windows machine"
)
continue

self.backward_value_helper(cond_func_simple_net_at_true,
core.is_compiled_with_cuda(),
use_parallel_exe)
Expand Down Expand Up @@ -514,6 +526,11 @@ def cond_func(i, img, label):
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 under old Windows machine"
)
continue
self.backward_value_helper(cond_func,
core.is_compiled_with_cuda(),
use_parallel_exe)
Expand Down

0 comments on commit 2c500c3

Please sign in to comment.