Skip to content

Commit ae0d806

Browse files
authored
Merge pull request #13367 from JiabinYang/mac/unittest412
fix mac test_reader_reset
2 parents ae7fb2a + 5b5fa37 commit ae0d806

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/paddle/fluid/tests/unittests/test_reader_reset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from __future__ import print_function
16-
16+
import os
1717
import paddle.fluid as fluid
1818
import paddle
1919
import numpy as np
@@ -41,6 +41,8 @@ def fake_data_generator():
4141
self.data_file_name, reader, feeder)
4242

4343
def setUp(self):
44+
# set parallel threads to fit 20 batches in line 49
45+
os.environ['CPU_NUM'] = str(20)
4446
self.use_cuda = fluid.core.is_compiled_with_cuda()
4547
self.data_file_name = './reader_reset_test.recordio'
4648
self.ins_shape = [3]

0 commit comments

Comments
 (0)