nv-torch-latest-cpu.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: nv-torch-latest-cpu
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'docs/**'
  6. - 'blogs/**'
  7. - 'deepspeed/inference/v2/**'
  8. - 'tests/unit/inference/v2/**'
  9. merge_group:
  10. branches: [ master ]
  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: ubuntu-20.04
  19. steps:
  20. - uses: actions/checkout@v3
  21. - id: setup-venv
  22. uses: ./.github/workflows/setup-venv
  23. - name: Install pytorch
  24. run: |
  25. pip install torch==1.12.0+cpu torchvision==0.13.0+cpu torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cpu
  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,autotuning]
  31. ds_report
  32. - name: Python environment
  33. run: |
  34. pip list
  35. - name: Unit tests
  36. run: |
  37. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  38. cd tests
  39. TRANSFORMERS_CACHE=/tmp/transformers_cache/ pytest $PYTEST_OPTS -n 4 unit/ --torch_ver="1.12"
  40. TRANSFORMERS_CACHE=/tmp/transformers_cache/ pytest $PYTEST_OPTS -m 'sequential' unit/ --torch_ver="1.12"