torch16.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Unit test config for manual use on torch1.6 runners
  2. name: Torch16
  3. # Controls when the action will run.
  4. on:
  5. # Allows you to run this workflow manually from the Actions tab
  6. workflow_dispatch:
  7. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  8. jobs:
  9. # This workflow contains a single job called "build"
  10. build:
  11. # The type of runner that the job will run on
  12. runs-on: [self-hosted, torch1.6]
  13. # Steps represent a sequence of tasks that will be executed as part of the job
  14. steps:
  15. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  16. - uses: actions/checkout@v2
  17. # Runs a single command using the runners shell
  18. - name: environment
  19. run: |
  20. nvidia-smi
  21. which python
  22. python --version
  23. which nvcc
  24. nvcc --version
  25. python -c "import torch; print('torch:', torch.__version__, torch)"
  26. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  27. # Runs a set of commands using the runners shell
  28. - name: Install deepspeed
  29. run: |
  30. pip install .[dev]
  31. ds_report
  32. - name: Formatting checks
  33. run: |
  34. pre-commit run --all-files
  35. # Runs a set of commands using the runners shell
  36. - name: Unit tests
  37. run: |
  38. if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
  39. TORCH_EXTENSIONS_DIR=./torch-extensions pytest --durations=0 --forked --verbose -x tests/unit/