未验证 提交 ae0d806c 编写于 作者: J Jiabin Yang 提交者: GitHub

Merge pull request #13367 from JiabinYang/mac/unittest412

fix mac test_reader_reset
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from __future__ import print_function from __future__ import print_function
import os
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
import numpy as np import numpy as np
...@@ -41,6 +41,8 @@ class TestReaderReset(unittest.TestCase): ...@@ -41,6 +41,8 @@ class TestReaderReset(unittest.TestCase):
self.data_file_name, reader, feeder) self.data_file_name, reader, feeder)
def setUp(self): def setUp(self):
# set parallel threads to fit 20 batches in line 49
os.environ['CPU_NUM'] = str(20)
self.use_cuda = fluid.core.is_compiled_with_cuda() self.use_cuda = fluid.core.is_compiled_with_cuda()
self.data_file_name = './reader_reset_test.recordio' self.data_file_name = './reader_reset_test.recordio'
self.ins_shape = [3] self.ins_shape = [3]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册