未验证 提交 01cf8e89 编写于 作者: K Kaipeng Deng 提交者: GitHub

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

* fix test_multiprocess_dataloader_exception failed on CPU only version. test=develop
上级 1e897f66
...@@ -23,6 +23,7 @@ import multiprocessing ...@@ -23,6 +23,7 @@ import multiprocessing
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.io import Dataset, BatchSampler, DataLoader from paddle.io import Dataset, BatchSampler, DataLoader
from paddle.fluid.dygraph.nn import Linear from paddle.fluid.dygraph.nn import Linear
from paddle.fluid.dygraph.base import to_variable from paddle.fluid.dygraph.base import to_variable
...@@ -109,6 +110,8 @@ class TestDataLoaderAssert(unittest.TestCase): ...@@ -109,6 +110,8 @@ class TestDataLoaderAssert(unittest.TestCase):
# CI Converage cannot record stub in subprocess, # CI Converage cannot record stub in subprocess,
# HACK a _worker_loop in main process call here # 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): class TestDataLoaderWorkerLoop(unittest.TestCase):
def run_without_worker_done(self, use_shared_memory=True): def run_without_worker_done(self, use_shared_memory=True):
try: try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册