nv-a6000.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: nv-a6000
  2. on:
  3. pull_request:
  4. paths:
  5. - 'accelerator/cuda_accelerator.py'
  6. - 'deepspeed/inference/v2/**'
  7. - 'tests/unit/inference/v2/**'
  8. - '.github/workflows/nv-a6000.yml'
  9. workflow_dispatch:
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.ref }}
  12. cancel-in-progress: true
  13. permissions:
  14. contents: read
  15. issues: write
  16. jobs:
  17. unit-tests:
  18. runs-on: [self-hosted, nvidia, a6000]
  19. container:
  20. image: nvcr.io/nvidia/pytorch:23.03-py3
  21. ports:
  22. - 80
  23. options: --gpus all --shm-size "8G"
  24. steps:
  25. - uses: actions/checkout@v3
  26. - name: Check container state
  27. run: |
  28. ldd --version
  29. nvcc --version
  30. nvidia-smi
  31. python -c "import torch; print('torch:', torch.__version__, torch)"
  32. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  33. - name: Install transformers
  34. run: |
  35. git clone --depth=1 https://github.com/huggingface/transformers
  36. cd transformers
  37. git rev-parse --short HEAD
  38. python -m pip install .
  39. - name: Install deepspeed
  40. run: |
  41. python -m pip install docutils==0.18.1 jinja2==3.0 urllib3==1.26.11 ninja
  42. python -m pip install .[dev,1bit,autotuning]
  43. ds_report
  44. - name: Python environment
  45. run: |
  46. python -m pip list
  47. - name: Unit tests
  48. run: |
  49. unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
  50. cd tests
  51. python -m pytest --color=yes --durations=0 --verbose -rF -m 'inference_v2' unit/ --torch_ver="2.0" --cuda_ver="12"
  52. python -m pytest --color=yes --durations=0 --verbose -rF -m 'inference_v2_ops' unit/ --torch_ver="2.0" --cuda_ver="12"
  53. - name: MII unit tests
  54. run: |
  55. git clone --depth=1 https://github.com/microsoft/DeepSpeed-MII.git
  56. cd DeepSpeed-MII
  57. pip install .[dev]
  58. cd tests
  59. python -m pytest --color=yes --durations=0 --verbose -rF ./