Unverified Commit 4fcaee0f authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

Run CI unittests in parallel (#3445)



* enable parallel tests

* disable parallelism for GPU tests

* [test] limit maximum processes on linux

* [debug] limit max processes even further

* [test] use subprocesses over threads

* [test] limit intra-op threads

* only limit intra op threads for CPU tests

* [poc] use low timeout for showcasing

* [poc] fix syntax

* set timeout to 5 minutes

* fix timeout on windows
Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
parent 349658c0
......@@ -5,6 +5,8 @@ channels:
- conda-forge
dependencies:
- pytest
- pytest-xdist
- pytest-timeout
- pytest-cov
- codecov
- pip
......
......@@ -6,5 +6,20 @@ eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env
export PYTORCH_TEST_WITH_SLOW='1'
if [ "${CU_VERSION:-}" == cpu ] ; then
NUMPROCESSES="auto"
export OMP_NUM_THREADS="1"
else
NUMPROCESSES="1"
fi
python -m torch.utils.collect_env
pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py
pytest \
--numprocesses=$NUMPROCESSES \
--timeout=300 \
--cov=torchvision \
--junitxml=test-results/junit.xml \
--verbose \
--durations 20 \
--ignore=test/test_datasets_download.py \
test
......@@ -5,6 +5,8 @@ channels:
- conda-forge
dependencies:
- pytest
- pytest-xdist
- pytest-timeout
- pytest-cov
- codecov
- pip
......
......@@ -6,5 +6,20 @@ eval "$(./conda/Scripts/conda.exe 'shell.bash' 'hook')"
conda activate ./env
export PYTORCH_TEST_WITH_SLOW='1'
if [ "${CU_VERSION:-}" == cpu ] ; then
NUMPROCESSES="auto"
export OMP_NUM_THREADS="1"
else
NUMPROCESSES="1"
fi
python -m torch.utils.collect_env
pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py
pytest \
--numprocesses=$NUMPROCESSES \
--timeout=300 \
--cov=torchvision \
--junitxml=test-results/junit.xml \
--verbose \
--durations 20 \
--ignore=test/test_datasets_download.py \
test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment