nv-torch12-p40.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: nv-torch12-p40
  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. runs-on: [self-hosted, nvidia, cu101, p40]
  18. steps:
  19. - uses: actions/checkout@v2
  20. - name: environment
  21. run: |
  22. nvidia-smi
  23. which python
  24. python --version
  25. which nvcc
  26. nvcc --version
  27. pip install --upgrade pip
  28. pip uninstall --yes torch torchvision
  29. pip install torch==1.2.0 torchvision==0.4.0
  30. python -c "import torch; print('torch:', torch.__version__, torch)"
  31. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  32. - name: Python environment
  33. run: |
  34. pip list
  35. - name: Install transformers
  36. run: |
  37. git clone https://github.com/huggingface/transformers
  38. cd transformers
  39. # if needed switch to the last known good SHA until transformers@master is fixed
  40. # git checkout 1cc453d33
  41. git rev-parse --short HEAD
  42. pip uninstall --yes transformers
  43. pip install .
  44. - name: Install deepspeed
  45. run: |
  46. pip uninstall --yes deepspeed
  47. pip install .[dev,1bit,autotuning,sparse_attn]
  48. ds_report
  49. - name: Unit tests
  50. run: |
  51. if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
  52. cd tests
  53. TORCH_EXTENSIONS_DIR=./torch-extensions pytest --color=yes --durations=0 --forked --verbose -n 4 unit/ --torch_ver="1.2" --cuda_ver="10"