"DeepSeek-OCR-master/DeepSeek-OCR-vllm/deepseek_ocr.py" did not exist on "6370e1258b71da29fd25f3e313cfae122893985c"
config.yml 18.4 KB
Newer Older
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
1
2
3
4
5
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
# Adopted from
6
# https://github.com/facebookresearch/detectron2/blob/main/.circleci/config.yml
7
8
#
# Pro tip: download circle ci cli to validate the config locally during development.
9
10
11
12
13
14
15
16
#
# To reset/clean the cache update the CACHE_VERSION variable in project settings
# in the fairscale project in CircleCI. The CACHE_VERSION follows the convention
# v$(FAIRSCALE_VERSION)-${CACHE_NUMBER}. E.g. v0.4.2-1. CACHE_NUMBER must start
# at 1 and increase in whole numbers. When changing the CACHE_VERSION manually
# always set the FAIRSCALE_VERSION value to the fairscale version being tested.
# To reset the cache when not updating the fairscale version, only update the
# CACHE_NUMBER value.
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
17

Min Xu's avatar
Min Xu committed
18
version: 2.1
19
20
orbs:
  codecov: codecov/codecov@1.0.2
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
21
22
23
# -------------------------------------------------------------------------------------
# Environments to run the jobs in
# -------------------------------------------------------------------------------------
24
cpu_py37: &cpu_py37
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
25
  docker:
26
    # python version 3.7.12
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
27
    - image: circleci/python:3.7
28
  resource_class: large
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
29

30
31
cpu_py38: &cpu_py38
  docker:
32
    # python version 3.8.12
33
    - image: circleci/python:3.8
34
  resource_class: large
35
36
37

cpu_py39: &cpu_py39
  docker:
38
    # python version 3.9.7
39
    - image: circleci/python:3.9
40
  resource_class: large
41

42
# Here is the list of GPU images:
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
43
# https://circleci.com/docs/2.0/configuration-reference/#available-linux-gpu-images
44
45
# We need to use multiple gpus for several jobs. The resource_class
# values are available here T101565170
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
46
47
48
49
# gpu.nvidia.small.multi = 2 gpus with 16 GB ram each
# gpu.nvidia.medium.multi = 4 gpus with 16 GB ram each

gpu_cu_11_2_small_multi: &gpu_cu_11_2_small_multi
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
50
  environment:
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
51
52
    CUDA_VERSION: "11.2"
    CUDA_HOME: /usr/local/cuda-11.2
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
53
  machine:
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
54
55
    image: ubuntu-2004-cuda-11.2:202103-01
  resource_class: gpu.nvidia.small.multi
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
56

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
57
gpu_cu_11_2_medium_multi: &gpu_cu_11_2_medium_multi
58
  environment:
59
60
    CUDA_VERSION: "11.2"
    CUDA_HOME: /usr/local/cuda-11.2
61
  machine:
62
    image: ubuntu-2004-cuda-11.2:202103-01
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
63
  resource_class: gpu.nvidia.medium.multi
64

Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
65
66
67
68
69
70
71
# -------------------------------------------------------------------------------------
# Re-usable commands
# -------------------------------------------------------------------------------------
setup_venv: &setup_venv
  - run:
      name: Setup Virtual Env
      working_directory: ~/
72
73
      # use bash -x for debug early commands executed in .bashrc.
      shell: /bin/bash
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
74
      command: |
75
76
        set -e
        set -o pipefail
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
77
78
79
80
81
82
83
84
        python -m venv ~/venv
        echo ". ~/venv/bin/activate" >> $BASH_ENV
        . ~/venv/bin/activate
        python --version
        which python
        which pip
        pip install --upgrade pip

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
85
# most recent LTS version
86
install_dep_1_8_2: &install_dep_1_8_2
87
  - run:
88
      name: Install Dependencies with torch 1.8.2 (LTS)
89
      command: |
90
        # check if we have restored venv cache (/home/circleci/venv) correctly, if so, just skip
Min Xu's avatar
Min Xu committed
91
        if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.8 && exit 0; fi
92
        # start installing
93
        pip install --progress-bar off torch==1.8.2+cu102 torchvision==0.9.2+cu102 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
94
        pip install --progress-bar off -r requirements-dev.txt
95
        pip install --progress-bar off -r requirements-benchmarks.txt
96
97
98
        python -c 'import torch; print("Torch version:", torch.__version__)'
        python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "8"], "wrong torch version"'
        python -m torch.utils.collect_env
Min Xu's avatar
Min Xu committed
99
        wget -O /home/circleci/venv/check_version.py https://raw.githubusercontent.com/min-xu-ai/check_verion/main/check_version.py
100

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
101
# most recent stable version
102
install_dep_1_10_2: &install_dep_1_10_2
103
  - run:
104
      name: Install Dependencies with torch 1.10.2
105
106
      command: |
        # check if we have restored venv cache (/home/circleci/venv) correctly, if so, just skip
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
107
        if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.10 && exit 0; fi
108
        # start installing
109
        pip install --progress-bar off torch==1.10.2+cu113 torchvision==0.11.3+cu113 -f https://download.pytorch.org/whl/torch_stable.html
110
        pip install --progress-bar off -r requirements-dev.txt
111
112
        pip install --progress-bar off -r requirements-benchmarks.txt
        python -c 'import torch; print("Torch version:", torch.__version__)'
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
113
        python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "10"], "wrong torch version"'
114
115
116
        python -m torch.utils.collect_env
        wget -O /home/circleci/venv/check_version.py https://raw.githubusercontent.com/min-xu-ai/check_verion/main/check_version.py

117
118
119
120
121
install_dep_pytorch_nightly: &install_dep_pytorch_nightly
  - run:
      name: Install Dependencies with a torch nightly preview build
      command: |
        # check if we have restored venv cache (/home/circleci/venv) correctly, if so, just skip
122
        if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.12 && exit 0; fi
123
        # start installing
Min Xu's avatar
Min Xu committed
124
        pip install --progress-bar off --pre torch==1.12.0.dev20220424+cu113 torchvision==0.13.0.dev20220424+cu113 -f https://download.pytorch.org/whl/nightly/cu113/torch_nightly.html
125
        pip install --progress-bar off -r requirements-dev.txt
126
127
        pip install --progress-bar off -r requirements-benchmarks.txt
        python -c 'import torch; print("Torch version:", torch.__version__)'
128
        python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "12"], "wrong torch version"'
129
130
131
        python -m torch.utils.collect_env
        wget -O /home/circleci/venv/check_version.py https://raw.githubusercontent.com/min-xu-ai/check_verion/main/check_version.py

132
install_repo: &install_repo
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
133
134
135
  - run:
      name: Install Repository
      command: |
136
137
138
        pip install .
        # Test import.
        python -c 'import sys; sys.path = sys.path[1:]; import fairscale'
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
139

140
141
142
143
144
145
check_test_list: &check_test_list
  - run:
      name: Verify that unit test list files are correct
      command: |
        bash ./tests/ci_test_list_check.sh

146
147
148
149
upload_coverage: &upload_coverage
  - codecov/upload:
      file: 'coverage.xml'
      token: $CODECOV_TOKEN
msbaines's avatar
msbaines committed
150

151
152
153
154
run_offload_benchmark: &run_offload_benchmark
  - run:
      name: Run Offload Benchmark
      command: |
155
        python benchmarks/experimental/offload.py --checkpoint_activation
156

157
158
159
160
161
162
run_fsdp_benchmark: &run_fsdp_benchmark
  - run:
      name: Run FSDP Benchmark
      command: |
        python benchmarks/fsdp.py --use_synthetic_data

Jun Ru Anderson's avatar
Jun Ru Anderson committed
163
run_pipe_benchmark: &run_pipe_benchmark
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
164
  - run:
Jun Ru Anderson's avatar
Jun Ru Anderson committed
165
      name: Run Pipe Benchmark
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
166
      command: |
Jun Ru Anderson's avatar
Jun Ru Anderson committed
167
        python benchmarks/pipe.py
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
168

169
170
171
172
run_oss_benchmark: &run_oss_benchmark
  - run:
      name: Run OSS Benchmark
      command: |
173
        python benchmarks/oss.py --world_size 4 --epochs 2
174
        python benchmarks/oss.py --check_regression --world_size 4 --optim_type oss_sharded_ddp --epochs 12
175
176

run_oss_gloo: &run_oss_gloo
177
178
179
180
181
182
  - run:
      name: Run OSS with Gloo
      command: |
        python benchmarks/oss.py --gloo --optim_type oss_ddp --epochs 2
        python benchmarks/oss.py --gloo --optim_type oss_sharded_ddp --epochs 2

183
run_oss_amp: &run_oss_amp
184
185
186
187
188
   - run:
       name: Run OSS with Torch AMP
       command: |
         python benchmarks/oss.py --amp --epochs 3 --optim_type oss_sharded_ddp

189
190
191
192
193
194
run_oss_for_each: &run_oss_for_each
   - run:
       name: Run OSS with Torch AMP and ForEach optmizer
       command: |
         python benchmarks/oss.py --amp --epochs 3 --optim_type oss_sharded_ddp --multi_tensor_optim

195
196
197
198
199
200
201
202
203
run_doc_build: &run_doc_build
   - run:
       name: Testing doc build
       command: |
         cd docs
         pip install --progress-bar off -r requirements.txt
         make help
         make singlehtml | tee make.out
         ! tail make.out | grep -q warning
204

205
206
207
208
209
210
# This is an alias to run all unit tests possible on a platform.
run_unittests: &run_unittests
   - run:
       name: Run all unit tests.
       # We run all and not stopping on failure on CPU since docker time is cheaper.
       command: |
211
         pytest --junitxml=test-results/junit.xml --verbose --timeout 60 --cov-report=xml --cov=./
212

Min Xu's avatar
Min Xu committed
213
commands:
214
215
216
217

   # This is a command (like a function) that run tests from a given test_list_file.
   # If test_list_file is not given, this results in an error.
   run_unittests_from_list:
Min Xu's avatar
Min Xu committed
218
     parameters:
219
       test_list_file:
Min Xu's avatar
Min Xu committed
220
         type: string
221
         default: "/dev/non_exist"  # Default to error out
Min Xu's avatar
Min Xu committed
222
223
224
225
     steps:
       - run:
           name: Run Unit Tests
           command: |
226
             if [ ! -f <<parameters.test_list_file>> ]; then exit 1; fi
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
227
             pytest --junitxml=test-results/junit.xml --verbose --timeout 70 --cov-report=xml --cov=./ `cat <<parameters.test_list_file>>`
Min Xu's avatar
Min Xu committed
228

229
230
231
232
233
234
235
   setup_pyenv:
     parameters:
       version:
         type: string
     steps:
       - run:
           name: Setup pyenv
236
237
238
239
240
           # We used to use the following commands to update pyenv.
           #   git clone https://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update
           #   pyenv update
           # However, it is not deterministic since pyenv is being updated.
           # It is now fixed to a version. (v2.3.0 is broken since it cause bash to fail when it try to do "eval $(pyenv init -)")
241
           command: |
242
243
244
             cd /opt/circleci/.pyenv/
             git remote update
             git checkout v2.2.0
245
246
247
             pyenv install -f <<parameters.version>>
             pyenv global <<parameters.version>>

Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
248
249
250
251
252
# -------------------------------------------------------------------------------------
# Jobs to run
# -------------------------------------------------------------------------------------

jobs:
253
254
  cpu_tests_py37:
    <<: *cpu_py37
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
255
256
257
258
259

    working_directory: ~/fairscale

    steps:
      - checkout
260
      - <<: *check_test_list
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
261
262
263
264
265
      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
266
            - cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
267

268
      - <<: *install_dep_1_10_2
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
269
270
271
272

      - save_cache:
          paths:
            - ~/venv
273
          key: cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
274

275
      - <<: *install_repo
276
      - <<: *run_unittests
277
278
279
280
      - <<: *run_doc_build

      - store_test_results:
          path: test-results
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
281

282
283
  cpu_tests_py38:
    <<: *cpu_py38
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
284

285
    working_directory: ~/fairscale
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
286

287
288
    steps:
      - checkout
289
      - <<: *check_test_list
290
      - <<: *setup_venv
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
291

292
293
294
      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
295
            - cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
296
      - <<: *install_dep_1_10_2
297
298
299
300

      - save_cache:
          paths:
            - ~/venv
301
          key: cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
302

303
      - <<: *install_repo
304
      - <<: *run_unittests
305
      - <<: *run_doc_build
306

Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
307
308
309
      - store_test_results:
          path: test-results

310
311
312
313
314
315
316
  cpu_tests_py39:
    <<: *cpu_py39

    working_directory: ~/fairscale

    steps:
      - checkout
317
      - <<: *check_test_list
318
319
320
321
322
      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
323
            - cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
324

325
      - <<: *install_dep_1_10_2
326
327
328
329

      - save_cache:
          paths:
            - ~/venv
330
          key: cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
331

332
      - <<: *install_repo
333
      - <<: *run_unittests
334
335
336
337
338
      - <<: *run_doc_build

      - store_test_results:
          path: test-results

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
339
  gpu_tests_1_8_1:
Min Xu's avatar
Min Xu committed
340
    parameters:
341
      test_list_file:
Min Xu's avatar
Min Xu committed
342
        type: string
343
        default: "/dev/non_exist"
Min Xu's avatar
Min Xu committed
344

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
345
    <<: *gpu_cu_11_2_small_multi
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
346
347
348
349
350
351
352
353

    working_directory: ~/fairscale

    steps:
      - checkout

      - run: nvidia-smi

354
      # Run this to make sure we use python3 from the system.
355
      - setup_pyenv:
356
          version: 3.9.7
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
357
358
359
360
361
362

      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
363
            - cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
364

365
      - <<: *install_dep_1_8_2
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
366
367
368
369

      - save_cache:
          paths:
            - ~/venv
370
          key: cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
371

372
      - <<: *install_repo
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
373

374
375
      - run_unittests_from_list:
          test_list_file: <<parameters.test_list_file>>
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
376
377
378

      - store_test_results:
          path: test-results
379

380
      - <<: *upload_coverage
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
381

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
382
  gpu_tests_1_10_0:
Min Xu's avatar
Min Xu committed
383
    parameters:
384
      test_list_file:
Min Xu's avatar
Min Xu committed
385
        type: string
386
        default: "/dev/non_exist"
Min Xu's avatar
Min Xu committed
387

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
388
    <<: *gpu_cu_11_2_small_multi
389
390
391
392
393
394
395
396

    working_directory: ~/fairscale

    steps:
      - checkout

      - run: nvidia-smi

397
      # Run this to make sure we use python3 from the system.
398
      - setup_pyenv:
399
          version: 3.9.7
400
401
402
403
404
405

      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
406
            - cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
407

408
      - <<: *install_dep_1_10_2
409
410
411
412

      - save_cache:
          paths:
            - ~/venv
413
          key: cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
414

415
      - <<: *install_repo
416

417
418
      - run_unittests_from_list:
          test_list_file: <<parameters.test_list_file>>
419
420
421

      - store_test_results:
          path: test-results
422

423
  gpu_tests_pytorch_nightly:
424
425
426
427
428
    parameters:
      test_list_file:
        type: string
        default: "/dev/non_exist"

Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
429
    <<: *gpu_cu_11_2_medium_multi
430
431
432
433
434
435
436
437
438

    working_directory: ~/fairscale

    steps:
      - checkout

      - run: nvidia-smi

      # Run this to make sure we use python3 from the system.
439
      - setup_pyenv:
440
          version: 3.9.7
441
442
443
444
445
446

      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
447
            - cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
448

449
      - <<: *install_dep_pytorch_nightly
450
451
452
453

      - save_cache:
          paths:
            - ~/venv
454
          key: cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
455
456
457
458
459
460
461
462
463

      - <<: *install_repo

      - run_unittests_from_list:
          test_list_file: <<parameters.test_list_file>>

      - store_test_results:
          path: test-results

464
  benchmarks_1:
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
465
    <<: *gpu_cu_11_2_small_multi
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
466
467
468
469
470
471
472
473

    working_directory: ~/fairscale

    steps:
      - checkout

      - run: nvidia-smi

474
      - setup_pyenv:
475
          version: 3.9.7
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
476
477
478
479
480
481

      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
482
            - cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
483

484
485
486
      # Cache the MNIST directory that contains benchmark data
      - restore_cache:
          keys:
487
            - cache-key-benchmark-MNIST-{{.Environment.CACHE_VERSION }}-{{checksum "benchmarks/datasets/mnist.py"}}
488

489
      - <<: *install_dep_1_10_2
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
490
491
492
493

      - save_cache:
          paths:
            - ~/venv
494
          key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
495

496
      - <<: *install_repo
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
497

Jun Ru Anderson's avatar
Jun Ru Anderson committed
498
      - <<: *run_pipe_benchmark
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
499

500
501
      - <<: *run_offload_benchmark

502
503
504
      - <<: *run_oss_amp

      - <<: *run_oss_for_each
505

506
507
      - <<: *run_oss_gloo

508
509
      - <<: *run_fsdp_benchmark

510
511
512
      - save_cache:
          paths:
            - /tmp/MNIST
513
          key: cache-key-benchmark-MNIST-{{.Environment.CACHE_VERSION }}-{{checksum "benchmarks/datasets/mnist.py"}}
514

515
  benchmarks_2:
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
516
    <<: *gpu_cu_11_2_medium_multi
517
518
519
520
521
522
523
524

    working_directory: ~/fairscale

    steps:
      - checkout

      - run: nvidia-smi

525
      - setup_pyenv:
526
          version: 3.9.7
527
528
529
530
531
532

      - <<: *setup_venv

      # Cache the venv directory that contains dependencies
      - restore_cache:
          keys:
533
            - cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
534

535
536
537
538

      # Cache the MNIST directory that contains benchmark data
      - restore_cache:
          keys:
539
            - cache-key-benchmark-MNIST-{{.Environment.CACHE_VERSION }}-{{checksum "benchmarks/datasets/mnist.py"}}
540

541
      - <<: *install_dep_1_10_2
542
543
544
545

      - save_cache:
          paths:
            - ~/venv
546
          key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
547

548
      - <<: *install_repo
549
550

      - <<: *run_oss_benchmark
551

552
553
554
      - save_cache:
          paths:
            - /tmp/MNIST
555
          key: cache-key-benchmark-MNIST-{{.Environment.CACHE_VERSION}}-{{checksum "benchmarks/datasets/mnist.py"}}
556

Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
557
558
559
560
561

workflows:
  version: 2
  build:
    jobs:
562
563
564
      - cpu_tests_py37
      - cpu_tests_py38
      - cpu_tests_py39
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
565
      - gpu_tests_1_8_1:
566
          test_list_file: tests/ci_test_list_1.txt
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
567
      - gpu_tests_1_10_0:
568
          test_list_file: tests/ci_test_list_1.txt
569
570
      - gpu_tests_pytorch_nightly:
          test_list_file: tests/ci_test_list_1.txt
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
571
      - gpu_tests_1_8_1:
572
          test_list_file: tests/ci_test_list_2.txt
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
573
      - gpu_tests_1_10_0:
574
          test_list_file: tests/ci_test_list_2.txt
575
576
      - gpu_tests_pytorch_nightly:
          test_list_file: tests/ci_test_list_2.txt
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
577
      - gpu_tests_1_8_1:
578
          test_list_file: tests/ci_test_list_3.txt
Anupam Bhatnagar's avatar
Anupam Bhatnagar committed
579
      - gpu_tests_1_10_0:
580
          test_list_file: tests/ci_test_list_3.txt
581
582
      - gpu_tests_pytorch_nightly:
          test_list_file: tests/ci_test_list_3.txt
583
584
      - benchmarks_1
      - benchmarks_2