-
Notifications
You must be signed in to change notification settings - Fork 45
62 lines (60 loc) · 1.78 KB
/
unit-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Unit Tests
on:
pull_request:
branches:
- main
- release/*
jobs:
unit-tests:
name: Build and test with torch-${{ matrix.torch }}
runs-on: [self-hosted, linux, x64, gpu]
strategy:
matrix:
include:
# 1.14.0a0+410ce96
- torch: "1.14"
nvcr: 22.12-py3
dir: torch1
# 2.1.0a0+32f93b1
- torch: "2.1"
nvcr: 23.10-py3
dir: torch2
container:
image: nvcr.io/nvidia/pytorch:${{ matrix.nvcr }}
options: --privileged --ipc=host --gpus=all
steps:
- name: Checkout msamp
uses: actions/checkout@v2
with:
submodules: true
path: ${{ matrix.dir }}
- name: Install MSCCL
run: |
cd ${{ matrix.dir }}/third_party/msccl
make -j src.build NVCC_GENCODE="\
-gencode=arch=compute_70,code=sm_70 \
-gencode=arch=compute_80,code=sm_80 \
-gencode=arch=compute_90,code=sm_90"
make install
- name: Install dependencies
run: |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export DEBIAN_FRONTEND=noninteractive
python3 -m pip install --upgrade pip
apt-get update && apt-get install -y python3-mpi4py
cd ${{ matrix.dir }}/
python3 -m pip install .[test]
make postinstall
- name: Run code lint
run: |
cd ${{ matrix.dir }}/
python3 setup.py lint
- name: Run unit tests
run: |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export LD_PRELOAD="/usr/local/lib/libmsamp_dist.so:/usr/local/lib/libnccl.so:${LD_PRELOAD}"
cd ${{ matrix.dir }}/
python3 setup.py test
# - name: Report coverage results
# run: |
# bash <(curl -s https://codecov.io/bash)