amd-mi200.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: amd-mi200
  2. on:
  3. schedule:
  4. - cron: "0 0 * * *"
  5. workflow_dispatch:
  6. concurrency:
  7. group: ${{ github.workflow }}-${{ github.ref }}
  8. cancel-in-progress: true
  9. permissions:
  10. contents: read
  11. issues: write
  12. jobs:
  13. amd-tests:
  14. # The type of runner that the job will run on
  15. runs-on: [self-hosted, amd, mi200]
  16. # Steps represent a sequence of tasks that will be executed as part of the job
  17. steps:
  18. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  19. - uses: actions/checkout@v3
  20. - id: setup-venv
  21. uses: ./.github/workflows/setup-venv
  22. - name: Install pytorch
  23. run: |
  24. pip install -U --cache-dir $TORCH_CACHE torch torchvision --index-url https://download.pytorch.org/whl/rocm5.6
  25. python -c "import torch; print('torch:', torch.__version__, torch)"
  26. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  27. - name: Install transformers
  28. run: |
  29. git clone https://github.com/huggingface/transformers
  30. cd transformers
  31. # if needed switch to the last known good SHA until transformers@master is fixed
  32. # git checkout 1cc453d33
  33. git rev-parse --short HEAD
  34. pip install .
  35. - name: Install (ROCm) apex
  36. run: |
  37. git clone https://github.com/ROCmSoftwarePlatform/apex.git
  38. cd apex
  39. git checkout torch_2.1_higher
  40. CURRENT_VER=$(git rev-parse HEAD)
  41. INSTALLED_VER=$(cat /blob/amd-apex/.venv_installed_version)
  42. if [[ "$CURRENT_VER" != "$INSTALLED_VER" ]]; then
  43. 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 .
  44. git rev-parse HEAD > /blob/amd-apex/.venv_installed_version
  45. fi
  46. echo PYTHONPATH=$PYTHONPATH:/blob/amd-apex/ >> $GITHUB_ENV
  47. # Runs a set of commands using the runners shell
  48. - name: Install deepspeed
  49. run: |
  50. pip install .[dev,1bit,autotuning]
  51. #python -c "from deepspeed.env_report import cli_main; cli_main()"
  52. ds_report
  53. - name: Python environment
  54. run: |
  55. pip list
  56. # Runs a set of commands using the runners shell
  57. - name: Unit tests
  58. run: |
  59. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  60. cd tests
  61. pytest $PYTEST_OPTS -n 4 --verbose unit/
  62. pytest $PYTEST_OPTS -m 'sequential' unit/
  63. - name: Open GitHub issue if nightly CI fails
  64. if: ${{ failure() && (github.event_name == 'schedule') }}
  65. uses: JasonEtco/create-an-issue@v2
  66. env:
  67. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  68. with:
  69. filename: .github/ISSUE_TEMPLATE/ci_failure_report.md
  70. update_existing: true