nv-megatron.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: nv-megatron
  2. on:
  3. push:
  4. branches:
  5. - 'staging**'
  6. paths-ignore:
  7. - 'docs/**'
  8. pull_request:
  9. paths-ignore:
  10. - 'docs/**'
  11. schedule:
  12. - cron: "0 0 * * *"
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. unit-tests:
  18. runs-on: [self-hosted, nvidia, cu116, v100]
  19. steps:
  20. - uses: actions/checkout@v2
  21. - id: setup-venv
  22. uses: ./.github/workflows/setup-venv
  23. - name: Install pytorch
  24. run: |
  25. pip install torch==1.13.1 torchvision --extra-index-url https://download.pytorch.org/whl/cu116
  26. python -c "import torch; print('torch:', torch.__version__, torch)"
  27. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  28. - name: Install deepspeed
  29. run: |
  30. pip install .[dev]
  31. ds_report
  32. - name: Install apex
  33. run: |
  34. pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git
  35. - name: Python environment
  36. run: |
  37. pip list
  38. - name: Megatron unit tests
  39. run: |
  40. git clone https://github.com/microsoft/Megatron-DeepSpeed.git
  41. cd Megatron-DeepSpeed
  42. pip install .
  43. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  44. if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
  45. cd tests
  46. MEGATRON_CKPT_DIR=/blob/megatron_ckpt/ TORCH_EXTENSIONS_DIR=./torch-extensions pytest --color=yes --durations=0 --verbose ./