Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI unittests in parallel #3445

Merged
merged 15 commits into from
Mar 1, 2021
2 changes: 2 additions & 0 deletions .circleci/unittest/linux/scripts/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
dependencies:
- pytest
- pytest-cov
- pytest-xdist
- pytest-timeout
- codecov
- pip
- libpng
Expand Down
17 changes: 16 additions & 1 deletion .circleci/unittest/linux/scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=10 \
--cov=torchvision \
--junitxml=test-results/junit.xml \
--verbose \
--durations 20 \
--ignore=test/test_datasets_download.py \
test
1 change: 1 addition & 0 deletions .circleci/unittest/windows/scripts/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
- conda-forge
dependencies:
- pytest
- pytest-xdist
- pytest-cov
- codecov
- pip
Expand Down
16 changes: 15 additions & 1 deletion .circleci/unittest/windows/scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,19 @@ 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 \
--cov=torchvision \
--junitxml=test-results/junit.xml \
--verbose \
--durations 20 \
--ignore=test/test_datasets_download.py \
test