Skip to content

Commit df985fa

Browse files
mrwyattiitjruwase
andauthored
Add Megatron CI workflow (deepspeedai#2614)
* added megatron unit test * Update nv-megatron.yml Co-authored-by: Olatunji Ruwase <[email protected]>
1 parent a25c31b commit df985fa

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/nv-megatron.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: nv-megatron
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'staging**'
8+
paths-ignore:
9+
- 'docs/**'
10+
pull_request:
11+
paths-ignore:
12+
- 'docs/**'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
unit-tests:
20+
runs-on: [self-hosted, nvidia, cu116, v100]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: environment
26+
run: |
27+
echo "JobID: $AISC_NODE_INSTANCE_ID"
28+
nvidia-smi
29+
which python
30+
python --version
31+
which nvcc
32+
nvcc --version
33+
pip install --upgrade pip
34+
pip uninstall --yes torch torchvision triton
35+
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116
36+
python -c "import torch; print('torch:', torch.__version__, torch)"
37+
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
38+
39+
- name: Install
40+
run: |
41+
pip uninstall --yes deepspeed
42+
pip install .[dev]
43+
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" git+https://github.com/NVIDIA/apex.git
44+
45+
- name: Python environment
46+
run: |
47+
pip list
48+
49+
- name: Unit tests
50+
run: |
51+
git clone --branch mrwyattii/add-unit-test https://github.com/microsoft/Megatron-DeepSpeed.git
52+
cd Megatron-DeepSpeed
53+
pip install .
54+
unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
55+
if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
56+
cd tests
57+
MEGATRON_CKPT_DIR=/blob/megatron_ckpt/ TORCH_EXTENSIONS_DIR=./torch-extensions pytest --color=yes --durations=0 --verbose ./

0 commit comments

Comments
 (0)