Skip to content

Commit f2660ac

Browse files
authored
add sanity check on nb available GPUs (#6092)
1 parent 4b7c0fa commit f2660ac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ jobs:
6666
pip list
6767
displayName: 'Install dependencies'
6868
69-
- script: |
69+
- bash: |
7070
python tests/collect_env_details.py
71+
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'"
7172
displayName: 'Env details'
7273
7374
- bash: |
@@ -76,7 +77,7 @@ jobs:
7677
ls -l legacy/checkpoints/
7778
displayName: 'Get legacy checkpoints'
7879
79-
- script: |
80+
- bash: |
8081
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50
8182
displayName: 'Testing: standard'
8283
@@ -90,11 +91,11 @@ jobs:
9091
codecov --token=$(CODECOV_TOKEN) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
9192
displayName: 'Statistics'
9293
93-
- script: |
94+
- bash: |
9495
python -m pytest benchmarks pl_examples -v --maxfail=2 --durations=0
9596
displayName: 'Testing: extended'
9697
97-
- script: |
98+
- bash: |
9899
python setup.py install --user --quiet
99100
bash pl_examples/run_ddp-example.sh
100101
pip uninstall -y pytorch-lightning

0 commit comments

Comments
 (0)