nv-torch-latest-cpu.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: nv-torch-latest-cpu
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'docs/**'
  6. - 'blogs/**'
  7. merge_group:
  8. branches: [ master ]
  9. schedule:
  10. - cron: "0 0 * * *"
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. unit-tests:
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v3
  19. - id: setup-venv
  20. uses: ./.github/workflows/setup-venv
  21. - name: Install pytorch
  22. run: |
  23. 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
  24. python -c "import torch; print('torch:', torch.__version__, torch)"
  25. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  26. - name: Install deepspeed
  27. run: |
  28. pip install .[dev,autotuning]
  29. ds_report
  30. - name: Python environment
  31. run: |
  32. pip list
  33. - name: Unit tests
  34. run: |
  35. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  36. cd tests
  37. TRANSFORMERS_CACHE=/tmp/transformers_cache/ pytest $PYTEST_OPTS -n 4 unit/ --torch_ver="1.12"
  38. TRANSFORMERS_CACHE=/tmp/transformers_cache/ pytest $PYTEST_OPTS -m 'sequential' unit/ --torch_ver="1.12"