amd-mi200.yml 2.4 KB
Newer Older
L
Logan Adams 已提交
1
name: amd-mi200
2 3

on:
M
Michael Wyatt 已提交
4 5
  schedule:
    - cron: "0 0 * * *"
6

7 8 9 10
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

11
jobs:
12
  amd-tests:
13
    # The type of runner that the job will run on
L
Logan Adams 已提交
14
    runs-on: [self-hosted, amd, mi200]
15 16 17 18

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19
      - uses: actions/checkout@v3
20

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

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

      - 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 .

39
      - name: Install (ROCm) apex
L
Logan Adams 已提交
40
        run: |
41 42
          git clone https://github.com/ROCmSoftwarePlatform/apex.git
          cd apex
43 44 45 46 47 48 49
          CURRENT_VER=$(git rev-parse HEAD)
          INSTALLED_VER=$(cat /blob/amd-apex/.venv_installed_version)
          if [[ "$CURRENT_VER" != "$INSTALLED_VER" ]]; then
            pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings="--global-option=--cpp_ext" --config-settings="--global-option=--cuda_ext" --target=/blob/amd-apex/ --upgrade .
            git rev-parse HEAD > /blob/amd-apex/.venv_installed_version
          fi
          echo PYTHONPATH=$PYTHONPATH:/blob/amd-apex/ >> $GITHUB_ENV
50 51 52
      # Runs a set of commands using the runners shell
      - name: Install deepspeed
        run: |
M
Michael Wyatt 已提交
53
          pip install .[dev,1bit,autotuning]
54 55
          #python -c "from deepspeed.env_report import cli_main; cli_main()"
          ds_report
56

57 58 59 60
      - name: Python environment
        run: |
          pip list

61 62 63
      # Runs a set of commands using the runners shell
      - name: Unit tests
        run: |
64
          unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
65
          cd tests
66 67
          pytest $PYTEST_OPTS -n 4 --verbose unit/
          pytest $PYTEST_OPTS -m 'sequential' unit/