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 6b1300cf93d88308aa93616c259c4e596a0b7cf5..617527242f5b2345b13342c5e20f62d3a546c6df 100644 --- a/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py +++ b/python/paddle/fluid/tests/unittests/test_multiprocess_dataloader_exception.py @@ -23,6 +23,7 @@ import multiprocessing import numpy as np import paddle.fluid as fluid +import paddle.fluid.core as core from paddle.io import Dataset, BatchSampler, DataLoader from paddle.fluid.dygraph.nn import Linear from paddle.fluid.dygraph.base import to_variable @@ -109,6 +110,8 @@ class TestDataLoaderAssert(unittest.TestCase): # CI Converage cannot record stub in subprocess, # HACK a _worker_loop in main process call here +@unittest.skipIf(not core.is_compiled_with_cuda(), + "core is not compiled with CUDA") class TestDataLoaderWorkerLoop(unittest.TestCase): def run_without_worker_done(self, use_shared_memory=True): try: