azure-pipelines.yml 3.3 KB
Newer Older
1
2

jobs:
Shaden Smith's avatar
Shaden Smith committed
3
- job: DeepSpeed_Tests
4
5
  timeoutInMinutes: 360
  pool:
Shaden Smith's avatar
Shaden Smith committed
6
    name: 'DS_testing'
7
8
9

  strategy:
    matrix:
Shaden Smith's avatar
Shaden Smith committed
10
      PyTorch12:
11
        python.version: '3.6'
Shaden Smith's avatar
Shaden Smith committed
12
13
14
15
16
17
18
19
        cuda.version: '10.0'
        pytorch.version: '1.2'
        runmodeltests: false
      PyTorch15:
        python.version: '3.7'
        cuda.version: '10.1'
        pytorch.version: '1.5'
        runmodeltests: true
20

Shaden Smith's avatar
Shaden Smith committed
21
22
23
24
  variables:
    conda_root: '/home/deepspeed/miniconda3'
    conda_env: 'ds_test_py$(python.version)_cuda$(cuda.version)_pytorch$(pytorch.version)'
    conda_env_path: '$(conda_root)/envs/$(conda_env)'
25
26

  steps:
Shaden Smith's avatar
Shaden Smith committed
27
28
29
    # 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
30
  - script: |
Shaden Smith's avatar
Shaden Smith committed
31
32
33
34
35
36
37
      conda create --force --yes -n $(conda_env) python=$(python.version) cudatoolkit=$(cuda.version)
      source $(conda_root)/bin/activate $(conda_env_path)
      conda install --yes -c pytorch pytorch=$(pytorch.version) cudatoolkit=$(cuda.version)
      conda install --yes conda
      conda install --yes gxx_linux-64
      conda install --yes -c conda-forge cudatoolkit-dev=$(cuda.version)
    displayName: 'Setup environment python=$(python.version) pytorch=$(pytorch.version) cuda=$(cuda.version)'
38
39

  - script: |
Shaden Smith's avatar
Shaden Smith committed
40
41
42
43
44
45
      source $(conda_root)/bin/activate $(conda_env_path)
      python --version
      which nvcc
      nvcc --version
      python -c "import torch; print('torch:', torch.__version__)"
    displayName: 'Show environment'
46
47

  - script: |
Shaden Smith's avatar
Shaden Smith committed
48
49
50
51
52
53
54
      source $(conda_root)/bin/activate $(conda_env_path)
      rm -rf third_party/apex/build/
      rm -rf third_party/apex/dist/
      rm -rf build/
      rm -rf dist/
      ./install.sh
    displayName: 'Install DeepSpeed'
55
56

  - script: |
Shaden Smith's avatar
Shaden Smith committed
57
      source $(conda_root)/bin/activate $(conda_env_path)
58
      pytest --forked --verbose tests/unit/
59
60
61
    displayName: 'Unit tests'

  - script: |
Shaden Smith's avatar
Shaden Smith committed
62
      source $(conda_root)/bin/activate $(conda_env_path)
63
      ln -s /data/Megatron-LM/data DeepSpeedExamples/Megatron-LM/
Shaden Smith's avatar
Shaden Smith committed
64
      pip install -r DeepSpeedExamples/Megatron-LM/requirements.txt
65
      cd tests/model/
Shaden Smith's avatar
Shaden Smith committed
66
67
      rm -rf BingBertSquad/baseline
      rm -rf Megatron_GPT2/baseline
68
      pytest -s run_sanity_check.py
Shaden Smith's avatar
Shaden Smith committed
69
    condition: eq(variables['runmodeltests'], true)
70
71
    displayName: 'Model tests'

72
73
74
75
76
77
   #BingBertSquad logs
  - task: PublishPipelineArtifact@1
    inputs:
      targetPath: '$(Build.SourcesDirectory)/tests/model/BingBertSquad/test/'
      artifactName: BingBertSquad_logs
    displayName: 'BingBertSquad log uploads'
Shaden Smith's avatar
Shaden Smith committed
78
    condition: eq(variables['runmodeltests'], true)
79
80


Shaden Smith's avatar
Shaden Smith committed
81
82
83
84
85
86
87
- job: Code_Quality_Checks
  pool:
    name: 'DS_testing'
  variables:
    conda_root: '/home/deepspeed/miniconda3'
    conda_env: 'ds_codetest'
    conda_env_path: '$(conda_root)/envs/$(conda_env)'
88

Shaden Smith's avatar
Shaden Smith committed
89
90
91
92
93
  steps:
  - script: |
      conda create --force --yes -n $(conda_env) python=3.7
      source $(conda_root)/bin/activate $(conda_env_path)
    displayName: 'Create code test environment'
94

Shaden Smith's avatar
Shaden Smith committed
95
96
97
98
99
  - script: |
      source $(conda_root)/bin/activate $(conda_env_path)
      pip install pre-commit
      pre-commit run --all-files
    displayName: 'Formatting checks'
100

Shaden Smith's avatar
Shaden Smith committed
101
102
103
104
105
  - script: |
      source $(conda_root)/bin/activate $(conda_env_path)
      pip install pylint
      pylint --exit-zero deepspeed/
    displayName: 'Code linter'