nv-inference.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: nv-inference
  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: [self-hosted, nvidia, cu116, v100]
  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 -U --cache-dir $TORCH_CACHE 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 transformers
  29. run: |
  30. git clone https://github.com/huggingface/transformers
  31. cd transformers
  32. git checkout f370bebdc
  33. git rev-parse --short HEAD
  34. pip install .
  35. - name: Install deepspeed
  36. run: |
  37. pip install .[dev,1bit,autotuning,inf,triton]
  38. ds_report
  39. - name: Python environment
  40. run: |
  41. pip list
  42. - name: Unit tests
  43. run: |
  44. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  45. cd tests
  46. coverage run --concurrency=multiprocessing -m pytest $PYTEST_OPTS -m 'seq_inference' unit/ --torch_ver="1.13" --cuda_ver="11.6"
  47. coverage run --concurrency=multiprocessing -m pytest $PYTEST_OPTS -m 'inference_ops' unit/ --torch_ver="1.13" --cuda_ver="11.6"
  48. coverage run --concurrency=multiprocessing -m pytest $PYTEST_OPTS --forked -n 4 -m 'inference' unit/ --torch_ver="1.13" --cuda_ver="11.6"
  49. - name: Coverage report
  50. run: |
  51. cd tests
  52. coverage combine
  53. coverage report -m