amd.yml 2.3 KB

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