未验证 提交 0954e907 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix test_multiprocess_dataloader_exception SIGABRT. test=develop (#25381)

上级 e917352b
...@@ -151,7 +151,7 @@ class TestDataLoaderWorkerLoop(unittest.TestCase): ...@@ -151,7 +151,7 @@ class TestDataLoaderWorkerLoop(unittest.TestCase):
def run_with_worker_done(self, use_shared_memory=True): def run_with_worker_done(self, use_shared_memory=True):
try: try:
place = fluid.cpu_places()[0] place = fluid.CUDAPlace(0)
with fluid.dygraph.guard(place): with fluid.dygraph.guard(place):
dataset = RandomDataset(800) dataset = RandomDataset(800)
...@@ -190,7 +190,8 @@ class TestDataLoaderWorkerLoop(unittest.TestCase): ...@@ -190,7 +190,8 @@ class TestDataLoaderWorkerLoop(unittest.TestCase):
self.assertTrue(False) self.assertTrue(False)
def test_main(self): def test_main(self):
for use_shared_memory in [True, False]: # only HACK a subprocess call here, do not need to use_shared_memory
for use_shared_memory in [False]:
self.run_without_worker_done(use_shared_memory) self.run_without_worker_done(use_shared_memory)
self.run_with_worker_done(use_shared_memory) self.run_with_worker_done(use_shared_memory)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册