diff --git a/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py b/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py index e7e6999112e498c3311c7b5a037912db1000eaf8..6b1300cf93d88308aa93616c259c4e596a0b7cf5 100644 --- a/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py +++ b/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py @@ -151,7 +151,7 @@ class TestDataLoaderWorkerLoop(unittest.TestCase): def run_with_worker_done(self, use_shared_memory=True): try: - place = fluid.cpu_places()[0] + place = fluid.CUDAPlace(0) with fluid.dygraph.guard(place): dataset = RandomDataset(800) @@ -190,7 +190,8 @@ class TestDataLoaderWorkerLoop(unittest.TestCase): self.assertTrue(False) 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_with_worker_done(use_shared_memory)