forked from spcl/dace
-
Notifications
You must be signed in to change notification settings - Fork 0
210 lines (190 loc) · 6.63 KB
/
Copy pathpython-package.yml
File metadata and controls
210 lines (190 loc) · 6.63 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and Test
on:
push:
branches: [ master, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8,3.9]
strict-xforms: [0,1,autoopt]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libyaml-dev cmake
sudo apt-get install -y libblas-dev libopenblas-dev liblapacke-dev
sudo apt-get install -y libpapi-dev papi-tools # Instrumentation dependencies
sudo apt-get install -y mpich # MPI dependencies
sudo apt-get install -y verilator # RTL simulation dependencies
python -m pip install --upgrade pip
pip install flake8 pytest-xdist coverage codecov mpi4py pytest-mpi
pip install -e ".[testing]"
- name: Test dependencies
run: |
papi_avail
- name: Test MPI with pytest
run: |
export NOSTATUSBAR=1
export DACE_testing_serialization=1
export DACE_cache=unique
export DACE_optimizer_interface=" "
if [ "${{ matrix.strict-xforms }}" = "autoopt" ]; then
export DACE_optimizer_automatic_strict_transformations=1
export DACE_optimizer_autooptimize=1
echo "Auto-optimization heuristics"
else
export DACE_optimizer_automatic_strict_transformations=${{ matrix.strict-xforms }}
fi
mpirun -n 2 coverage run --source=dace --parallel-mode -m pytest --with-mpi --tb=short -m "mpi"
coverage combine .; coverage report; coverage xml
codecov
- name: Test with pytest
run: |
export NOSTATUSBAR=1
export DACE_testing_serialization=1
export DACE_cache=unique
export DACE_optimizer_interface=" "
if [ "${{ matrix.strict-xforms }}" = "autoopt" ]; then
export DACE_optimizer_automatic_strict_transformations=1
export DACE_optimizer_autooptimize=1
echo "Auto-optimization heuristics"
else
export DACE_optimizer_automatic_strict_transformations=${{ matrix.strict-xforms }}
fi
pytest -n auto --cov-report=xml --cov=dace --tb=short -m "not gpu and not verilator and not tensorflow and not mkl and not sve and not papi and not mlir"
codecov
- name: Run other tests
run: |
export NOSTATUSBAR=1
export DACE_testing_serialization=1
export DACE_cache=single
export DACE_optimizer_automatic_strict_transformations=${{ matrix.strict-xforms }}
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
./tests/polybench_test.sh
./tests/xform_test.sh
coverage combine .; coverage report; coverage xml
codecov
test-heterogeneous:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
rm ~/.dace.conf
rm -rf .dacecache tests/.dacecache
. /opt/setupenv
python -m pip install --upgrade pip
pip install flake8 pytest-xdist coverage codecov
pip install mpi4py pytest-mpi
pip uninstall -y dace
pip install -e ".[testing]"
- name: Test dependencies
run: |
papi_avail
- name: Run parallel pytest
run: |
export DACE_cache=unique
export DACE_optimizer_interface=" "
. /opt/setupenv
pytest -n auto --cov-report=xml --cov=dace --tb=short -m "verilator or mkl or papi"
codecov
- name: Run MPI tests
run: |
export NOSTATUSBAR=1
export DACE_cache=single
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
. /opt/setupenv
./tests/mpi_test.sh
- name: Report overall coverage
run: |
export COVERAGE_RCFILE=`pwd`/.coveragerc
. /opt/setupenv
coverage combine . */; coverage report; coverage xml
codecov
test-gpu:
runs-on: [self-hosted, linux, gpu]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
rm ~/.dace.conf
rm -rf .dacecache tests/.dacecache
. /opt/setupenv
python -m pip install --upgrade pip
pip install flake8 pytest-xdist coverage codecov
pip install mpi4py
pip uninstall -y dace
pip install -e ".[testing]"
- name: Test dependencies
run: |
nvidia-smi
- name: Run pytest GPU
run: |
export DACE_cache=single
export DACE_optimizer_interface=" "
. /opt/setupenv
pytest --cov-report=xml --cov=dace --tb=short -m "gpu"
codecov
- name: Run extra GPU tests
run: |
export NOSTATUSBAR=1
export DACE_cache=single
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
. /opt/setupenv
./tests/cuda_test.sh
- name: Report overall coverage
run: |
export COVERAGE_RCFILE=`pwd`/.coveragerc
. /opt/setupenv
coverage combine . */; coverage report; coverage xml
codecov
test-fpga:
runs-on: [self-hosted, linux, intel-fpga, xilinx-fpga]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
rm ~/.dace.conf
rm -rf .dacecache tests/.dacecache
. /opt/setupenv
python -m pip install --upgrade pip
pip install flake8 coverage codecov
pip uninstall -y dace
pip install -e ".[testing]"
- name: Run Intel FPGA tests
run: |
export NOSTATUSBAR=1
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
. /opt/setupenv
python tests/fpga/intel_fpga_test.py
codecov
- name: Run Xilinx tests
run: |
export NOSTATUSBAR=1
export COVERAGE_RCFILE=`pwd`/.coveragerc
export PYTHON_BINARY="coverage run --source=dace --parallel-mode"
. /opt/setupenv
python tests/fpga/xilinx_test.py
codecov