|
| 1 | +name: amd-mi200 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'staging**' |
| 7 | + paths-ignore: |
| 8 | + - 'docs/**' |
| 9 | + pull_request: |
| 10 | + paths-ignore: |
| 11 | + - 'docs/**' |
| 12 | + schedule: |
| 13 | + - cron: "0 0 * * *" |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + amd-tests: |
| 21 | + # The type of runner that the job will run on |
| 22 | + runs-on: [self-hosted, amd, mi200] |
| 23 | + |
| 24 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 25 | + steps: |
| 26 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 27 | + - uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - id: setup-venv |
| 30 | + uses: ./.github/workflows/setup-venv |
| 31 | + |
| 32 | + - name: Install pytorch |
| 33 | + run: | |
| 34 | + pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.4.2 |
| 35 | + python -c "import torch; print('torch:', torch.__version__, torch)" |
| 36 | + python -c "import torch; print('CUDA available:', torch.cuda.is_available())" |
| 37 | +
|
| 38 | + - name: Install transformers |
| 39 | + run: | |
| 40 | + git clone https://github.com/huggingface/transformers |
| 41 | + cd transformers |
| 42 | + # if needed switch to the last known good SHA until transformers@master is fixed |
| 43 | + # git checkout 1cc453d33 |
| 44 | + git rev-parse --short HEAD |
| 45 | + pip install . |
| 46 | +
|
| 47 | + - name: Install apex |
| 48 | + run: | |
| 49 | + pip install ninja |
| 50 | + pip install -v --install-option="--cpp_ext" --install-option="--cuda_ext" 'git+https://github.com/ROCmSoftwarePlatform/apex.git' |
| 51 | +
|
| 52 | + # Runs a set of commands using the runners shell |
| 53 | + - name: Install deepspeed |
| 54 | + run: | |
| 55 | + pip install .[dev,1bit,autotuning] |
| 56 | + #python -c "from deepspeed.env_report import cli_main; cli_main()" |
| 57 | + ds_report |
| 58 | +
|
| 59 | + - name: Python environment |
| 60 | + run: | |
| 61 | + pip list |
| 62 | +
|
| 63 | + # Runs a set of commands using the runners shell |
| 64 | + - name: Unit tests |
| 65 | + run: | |
| 66 | + if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi |
| 67 | + cd tests |
| 68 | + TORCH_EXTENSIONS_DIR=./torch-extensions pytest -n 4 --verbose unit/ |
| 69 | + TORCH_EXTENSIONS_DIR=./torch-extensions pytest -m 'sequential' unit/ |
0 commit comments