12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- name: nv-megatron
- on:
- pull_request:
- paths-ignore:
- - 'docs/**'
- - 'blogs/**'
- merge_group:
- branches: [ master ]
- schedule:
- - cron: "0 0 * * *"
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- jobs:
- unit-tests:
- runs-on: [self-hosted, nvidia, cu116, v100]
- steps:
- - uses: actions/checkout@v3
- - id: setup-venv
- uses: ./.github/workflows/setup-venv
- - name: Install pytorch
- run: |
- pip install -U --cache-dir $TORCH_CACHE torch==1.13.1 torchvision --extra-index-url https://download.pytorch.org/whl/cu116
- python -c "import torch; print('torch:', torch.__version__, torch)"
- python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- - name: Install deepspeed
- run: |
- pip install .[dev]
- ds_report
- - name: Install apex
- run: |
- git clone https://github.com/NVIDIA/apex.git
- cd apex
- CURRENT_VER=$(git rev-parse HEAD)
- INSTALLED_VER=$(cat /blob/apex/.venv_installed_version)
- if [[ "$CURRENT_VER" != "$INSTALLED_VER" ]]; then
- pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--global-option=--cpp_ext" --config-settings "--global-option=--cuda_ext" --target=/blob/apex/ --upgrade .
- git rev-parse HEAD > /blob/apex/.venv_installed_version
- fi
- echo PYTHONPATH=$PYTHONPATH:/blob/apex/ >> $GITHUB_ENV
- - name: Python environment
- run: |
- pip list
- - name: Megatron unit tests
- run: |
- git clone https://github.com/microsoft/Megatron-DeepSpeed.git
- cd Megatron-DeepSpeed
- pip install .
- unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
- cd tests
- pytest $PYTEST_OPTS ./
|