fix test_multiprocess_dataloader_exception failed on CPU-only version (#25406)

* fix test_multiprocess_dataloader_exception failed on CPU only version. test=develop
fix_copy_if_different
Kaipeng Deng 5 years ago committed by GitHub
parent 1e897f66ee
commit 01cf8e893f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

Loading…
Cancel
Save