-
Notifications
You must be signed in to change notification settings - Fork 8
153 lines (151 loc) · 8.09 KB
/
ci.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: DLIO Profiler Build and Test
on:
pull_request:
branches: [ main, dev ]
push:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04]
dir: ["clone", "github"]
perm: ["root", "user"]
name: ${{ matrix.os }}-${{ matrix.dir }}-${{ matrix.perm }}
runs-on: ${{ matrix.os }}
env:
CC: gcc
CXX: g++
DIR: ${{ matrix.dir }}
PERM: ${{ matrix.perm }}
steps:
- name: Push checkout
if: github.event_name == 'push'
uses: actions/checkout@v3
- name: PR checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install additional packages
run: |
sudo apt-get update
sudo apt-get install gcc g++ libtool-bin openmpi-bin libopenmpi-dev
sudo apt-get install python3.10 python3-pip
sudo apt-get install gcovr
- name: Install dlio benchmark
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
LOC=git+https://github.com/argonne-lcf/dlio_benchmark.git@main
if [[ $PERM == 'user' ]]; then
export DLIO_LOGGER_USER=1
echo pip install ${LOC}
pip install ${LOC}
else
echo pip install ${LOC}
sudo pip install ${LOC}
fi
- name: Build from ${{ matrix.dir }} on ${{ matrix.perm }}
run: |
export CMAKE_BUILD_TYPE=Profile
export DLIO_PROFILER_ENABLE_TESTS=ON
LOC=.
if [[ $DIR == 'github' ]]; then
LOC=git+https://github.com/hariharan-devarajan/dlio-profiler.git@dev
fi
if [[ $PERM == 'user' ]]; then
export DLIO_LOGGER_USER=1
echo pip install -v ${LOC}
pip install -v ${LOC}
else
echo pip install -v ${LOC}
sudo pip install -v ${LOC}
fi
- name: Test ctest
if: matrix.os == 'ubuntu-22.04' && matrix.dir == 'clone' && matrix.perm == 'user'
run: |
pip install -r test/py/requirements.txt
cd build/temp*/dlio_profiler_py
ctest -VV
- name: Create Coverage
if: matrix.os == 'ubuntu-22.04' && matrix.dir == 'clone' && matrix.perm == 'user'
run: |
mkdir coverage
FILE=$PWD/coverage/coverage.json
cd build
COVERALLS_REPO_TOKEN=${{ secrets.GITHUB_TOKEN }} gcovr -r ../ . --coveralls $FILE -e ../test/ -e ../src/example
if [ -e '$FILE' ]; then
sed -i'' -e 's/"service_name": "github-actions-ci"/"service_name": "github"/' '$FILE'
fi
cat $FILE
curl -v -F json_file=@$FILE https://coveralls.io/api/v1/jobs
- name: Test dlio benchmark npz
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
export DLIO_PROFILER_ENABLE=1
dlio_benchmark workload=unet3d ++workload.output.folder=$PWD/output ++workload.train.computation_time=0.05 ++workload.evaluation.eval_time=0.01 ++workload.train.epochs=2 ++workload.workflow.train=True ++workload.workflow.generate_data=True ++workload.dataset.num_files_train=16 ++workload.dataset.num_files_eval=16 ++workload.reader.read_threads=2 ++workload.dataset.record_length=4096 ++workload.dataset.record_length_stdev=0 \
++workload.framework=tensorflow ++workload.reader.data_loader=tensorflow ++workload.dataset.format=npz
ls -a $PWD/output
num_posix_lines=`cat $PWD/output/.trace*.pfw | grep POSIX | wc -l`
total_lines=`cat $PWD/output/.trace*.pfw | wc -l`
echo $num_posix_lines of $total_lines
rm -rf $PWD/output
if [[ "$num_posix_lines" -ne "1728" ]]; then
exit 1
fi
- name: Test dlio benchmark tfrecord
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
export DLIO_PROFILER_ENABLE=1
dlio_benchmark workload=unet3d ++workload.output.folder=$PWD/output ++workload.train.computation_time=0.05 ++workload.evaluation.eval_time=0.01 ++workload.train.epochs=2 ++workload.workflow.train=True ++workload.workflow.generate_data=True ++workload.dataset.num_files_train=16 ++workload.dataset.num_files_eval=16 ++workload.reader.read_threads=2 ++workload.dataset.record_length=4096 ++workload.dataset.record_length_stdev=0 \
++workload.framework=tensorflow ++workload.reader.data_loader=tensorflow ++workload.dataset.format=tfrecord
ls -a $PWD/output
num_posix_lines=`cat $PWD/output/.trace*.pfw | grep POSIX | wc -l`
total_lines=`cat $PWD/output/.trace*.pfw | wc -l`
echo $num_posix_lines of $total_lines
rm -rf $PWD/output
if [[ "$num_posix_lines" -ne "192" ]]; then
exit 1
fi
- name: Test dlio benchmark jpeg
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
export DLIO_PROFILER_ENABLE=1
dlio_benchmark workload=unet3d ++workload.output.folder=$PWD/output ++workload.train.computation_time=0.05 ++workload.evaluation.eval_time=0.01 ++workload.train.epochs=2 ++workload.workflow.train=True ++workload.workflow.generate_data=True ++workload.dataset.num_files_train=16 ++workload.dataset.num_files_eval=16 ++workload.reader.read_threads=2 ++workload.dataset.record_length=4096 ++workload.dataset.record_length_stdev=0 \
++workload.framework=tensorflow ++workload.reader.data_loader=tensorflow ++workload.dataset.format=jpeg
ls -a $PWD/output
num_posix_lines=`cat $PWD/output/.trace*.pfw | grep POSIX | wc -l`
total_lines=`cat $PWD/output/.trace*.pfw | wc -l`
echo $num_posix_lines of $total_lines
rm -rf $PWD/output
if [[ "$num_posix_lines" -ne "416" ]]; then
exit 1
fi
- name: Test dlio benchmark png
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
export DLIO_PROFILER_ENABLE=1
dlio_benchmark workload=unet3d ++workload.output.folder=$PWD/output ++workload.train.computation_time=0.05 ++workload.evaluation.eval_time=0.01 ++workload.train.epochs=2 ++workload.workflow.train=True ++workload.workflow.generate_data=True ++workload.dataset.num_files_train=16 ++workload.dataset.num_files_eval=16 ++workload.reader.read_threads=2 ++workload.dataset.record_length=4096 ++workload.dataset.record_length_stdev=0 \
++workload.framework=tensorflow ++workload.reader.data_loader=tensorflow ++workload.dataset.format=png
ls -a $PWD/output
num_posix_lines=`cat $PWD/output/.trace*.pfw | grep POSIX | wc -l`
total_lines=`cat $PWD/output/.trace*.pfw | wc -l`
echo $num_posix_lines of $total_lines
rm -rf $PWD/output
if [[ "$num_posix_lines" -ne "544" ]]; then
exit 1
fi
- name: Test dlio benchmark hdf5
if: matrix.os == 'ubuntu-22.04' && matrix.perm == 'root' && matrix.dir == 'github'
run: |
export DLIO_PROFILER_ENABLE=1
dlio_benchmark workload=unet3d ++workload.output.folder=$PWD/output ++workload.train.computation_time=0.05 ++workload.evaluation.eval_time=0.01 ++workload.train.epochs=2 ++workload.workflow.train=True ++workload.workflow.generate_data=True ++workload.dataset.num_files_train=16 ++workload.dataset.num_files_eval=16 ++workload.reader.read_threads=2 ++workload.dataset.record_length=4096 ++workload.dataset.record_length_stdev=0 \
++workload.framework=tensorflow ++workload.reader.data_loader=tensorflow ++workload.dataset.format=hdf5
ls -a $PWD/output
num_posix_lines=`cat $PWD/output/.trace*.pfw | grep POSIX | wc -l`
total_lines=`cat $PWD/output/.trace*.pfw | wc -l`
echo $num_posix_lines of $total_lines
rm -rf $PWD/output
if [[ "$num_posix_lines" -ne "640" ]]; then
exit 1
fi