nv-torch-latest-v100.yml 1.7 KB
Newer Older
1 2 3 4 5 6
name: nv-torch-latest-v100

on:
  pull_request:
    paths-ignore:
      - 'docs/**'
7
      - 'blogs/**'
M
Michael Wyatt 已提交
8 9
  schedule:
    - cron: "0 0 * * *"
10 11 12 13 14 15 16

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  unit-tests:
17
    runs-on: [self-hosted, nvidia, cu116, v100]
18 19

    steps:
20
      - uses: actions/checkout@v3
21

M
Michael Wyatt 已提交
22 23 24 25
      - id: setup-venv
        uses: ./.github/workflows/setup-venv

      - name: Install pytorch
26
        run: |
27
          pip install -U --cache-dir /blob/torch_cache torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116
28 29 30 31 32 33 34 35 36 37 38 39 40 41
          python -c "import torch; print('torch:', torch.__version__, torch)"
          python -c "import torch; print('CUDA available:', torch.cuda.is_available())"

      - name: Install transformers
        run: |
          git clone https://github.com/huggingface/transformers
          cd transformers
          # if needed switch to the last known good SHA until transformers@master is fixed
          # git checkout 1cc453d33
          git rev-parse --short HEAD
          pip install .

      - name: Install deepspeed
        run: |
J
Jeff Rasley 已提交
42
          pip install .[dev,1bit,autotuning]
43 44
          ds_report

45 46 47 48
      - name: Python environment
        run: |
          pip list

49 50 51 52 53
      - name: Unit tests
        run: |
          unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
          if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
          cd tests
54 55
          TORCH_EXTENSIONS_DIR=./torch-extensions pytest --forked -n 4 unit/ --torch_ver="2.0" --cuda_ver="11.7"
          TORCH_EXTENSIONS_DIR=./torch-extensions pytest --forked -m 'sequential' unit/ --torch_ver="2.0" --cuda_ver="11.7"