2020-09-10 01:35:26 +03:00
|
|
|
trigger:
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- docs
|
|
|
|
- azure
|
2020-02-03 21:25:45 +03:00
|
|
|
jobs:
|
2020-09-02 04:06:15 +03:00
|
|
|
- job: DeepSpeed_Tests
|
2020-02-03 21:25:45 +03:00
|
|
|
timeoutInMinutes: 360
|
|
|
|
pool:
|
2020-09-02 04:06:15 +03:00
|
|
|
name: 'DS_testing'
|
2020-02-03 21:25:45 +03:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-09-02 04:06:15 +03:00
|
|
|
PyTorch12-CUDA100:
|
2020-02-03 21:25:45 +03:00
|
|
|
python.version: '3.6'
|
2020-09-02 04:06:15 +03:00
|
|
|
cuda.version: '10.0'
|
|
|
|
pytorch.version: '1.2'
|
|
|
|
torchvision.version: '0.4.0'
|
2020-09-10 00:37:37 +03:00
|
|
|
runmodeltests: false
|
2020-09-02 04:06:15 +03:00
|
|
|
#PyTorch15-CUDA101:
|
2020-05-15 08:02:08 +03:00
|
|
|
# python.version: '3.7'
|
2020-09-02 04:06:15 +03:00
|
|
|
# cuda.version: '10.1'
|
|
|
|
# pytorch.version: '1.5.0+cu101'
|
|
|
|
# torchvision.version: '0.6.0+cu101'
|
|
|
|
# runmodeltests: true
|
|
|
|
##PyTorch15-CUDA102:
|
|
|
|
# python.version: '3.7'
|
|
|
|
# cuda.version: '10.2'
|
|
|
|
# pytorch.version: '1.5'
|
|
|
|
# torchvision.version: '0.6.1'
|
|
|
|
# runmodeltests: true
|
2020-02-03 21:25:45 +03:00
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
variables:
|
|
|
|
conda_env: 'ds_test_py$(python.version)_cuda$(cuda.version)_pytorch$(pytorch.version)'
|
2020-02-03 21:25:45 +03:00
|
|
|
|
|
|
|
steps:
|
2020-09-02 04:06:15 +03:00
|
|
|
# Unfortunately nvidia's nvcc_linux-64=<version> seems to install 10.1 regardless?
|
|
|
|
# Most of this complexity is a workaround to get the compiler toolchain to match the
|
|
|
|
# cudatoolkit runtime
|
|
|
|
- script: |
|
|
|
|
conda create --force --yes -n $(conda_env) python=$(python.version) cudatoolkit=$(cuda.version)
|
|
|
|
source activate $(conda_env)
|
|
|
|
conda install -q --yes conda
|
|
|
|
conda install -q --yes pip
|
|
|
|
conda install -q --yes gxx_linux-64
|
|
|
|
if [[ $(cuda.version) != "10.2" ]]; then conda install --yes -c conda-forge cudatoolkit-dev=$(cuda.version) ; fi
|
2020-09-10 00:37:37 +03:00
|
|
|
echo "PATH=$PATH, LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
2020-09-02 04:06:15 +03:00
|
|
|
displayName: 'Setup environment python=$(python.version) pytorch=$(pytorch.version) cuda=$(cuda.version)'
|
2020-05-15 08:02:08 +03:00
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
# Manually install torch/torchvision first to enforce versioning.
|
2020-02-03 21:25:45 +03:00
|
|
|
- script: |
|
2020-09-02 04:06:15 +03:00
|
|
|
source activate $(conda_env)
|
|
|
|
pip install --progress-bar=off torch==$(pytorch.version) torchvision==$(torchvision.version)
|
|
|
|
#-f https://download.pytorch.org/whl/torch_stable.html
|
|
|
|
./install.sh --local_only
|
|
|
|
#python -I basic_install_test.py
|
|
|
|
displayName: 'Install DeepSpeed'
|
2020-02-03 21:25:45 +03:00
|
|
|
|
|
|
|
- script: |
|
2020-09-02 04:06:15 +03:00
|
|
|
source activate $(conda_env)
|
|
|
|
which python
|
|
|
|
python --version
|
|
|
|
which nvcc
|
|
|
|
nvcc --version
|
|
|
|
which deepspeed
|
|
|
|
python -c "import torch; print('torch:', torch.__version__, torch)"
|
|
|
|
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
|
|
|
|
python -c "import deepspeed; print('deepspeed:', deepspeed.__version__)"
|
|
|
|
displayName: 'Show environment'
|
|
|
|
|
2020-02-03 21:25:45 +03:00
|
|
|
|
|
|
|
- script: |
|
2020-09-02 04:06:15 +03:00
|
|
|
source activate $(conda_env)
|
|
|
|
pytest --durations=0 --forked --verbose -x tests/unit/
|
2020-02-03 21:25:45 +03:00
|
|
|
displayName: 'Unit tests'
|
|
|
|
|
2020-09-10 00:05:31 +03:00
|
|
|
# - script: |
|
|
|
|
# source activate $(conda_env)
|
|
|
|
# ln -s /data/Megatron-LM/data DeepSpeedExamples/Megatron-LM/
|
|
|
|
# pip install --progress-bar=off -r DeepSpeedExamples/Megatron-LM/requirements.txt
|
|
|
|
# cd tests/model/
|
|
|
|
# rm -rf BingBertSquad/baseline
|
|
|
|
# rm -rf Megatron_GPT2/baseline
|
|
|
|
# pytest --durations=0 -s run_sanity_check.py
|
|
|
|
# condition: and(succeeded(), eq(variables['runmodeltests'], true))
|
|
|
|
# displayName: 'Model tests'
|
|
|
|
|
|
|
|
# #BingBertSquad logs
|
|
|
|
# - task: PublishPipelineArtifact@1
|
|
|
|
# inputs:
|
|
|
|
# targetPath: '$(Build.SourcesDirectory)/tests/model/BingBertSquad/test/'
|
|
|
|
# artifactName: BingBertSquad_logs
|
|
|
|
# displayName: 'BingBertSquad log uploads'
|
|
|
|
# condition: eq(variables['runmodeltests'], true)
|
2020-02-15 02:45:28 +03:00
|
|
|
|
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
- job: Code_Quality_Checks
|
|
|
|
pool:
|
2020-09-06 01:06:12 +03:00
|
|
|
vmImage: 'ubuntu-latest'
|
2020-09-02 04:06:15 +03:00
|
|
|
variables:
|
|
|
|
conda_env: 'ds_codetest'
|
2020-02-03 21:25:45 +03:00
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
steps:
|
2020-09-06 01:06:12 +03:00
|
|
|
- bash: echo "##vso[task.prependpath]$CONDA/bin"
|
|
|
|
displayName: Add conda to PATH
|
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
- script: |
|
|
|
|
conda create --force --yes -n $(conda_env) python=3.7
|
|
|
|
source activate $(conda_env)
|
|
|
|
displayName: 'Create code test environment'
|
2020-02-15 02:45:28 +03:00
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
- script: |
|
|
|
|
source activate $(conda_env)
|
|
|
|
pip install pre-commit
|
|
|
|
pre-commit run --all-files
|
|
|
|
displayName: 'Formatting checks'
|
2020-02-03 21:25:45 +03:00
|
|
|
|
2020-09-02 04:06:15 +03:00
|
|
|
- script: |
|
|
|
|
source activate $(conda_env)
|
|
|
|
pip install pylint
|
|
|
|
pylint --exit-zero deepspeed/
|
|
|
|
displayName: 'Code linter'
|