-
Notifications
You must be signed in to change notification settings - Fork 1
195 lines (178 loc) · 7.9 KB
/
Copy pathci.yml
File metadata and controls
195 lines (178 loc) · 7.9 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
name: µhLS ci
on:
push:
paths-ignore:
- "doc/**"
- "README*"
branches:
- master
tags:
- "v*"
pull_request:
paths-ignore:
- "doc/**"
- "README*"
branches:
- master
workflow_dispatch: {}
jobs:
unit-tests:
name: run µhLS unit tests
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
strategy:
matrix:
os:
- { name: "ubuntu", version: "latest" }
container:
- { name: "tumeda/eda-osic-tools", version: "latest-default" }
container: ${{ matrix.container.name }}:${{ matrix.container.version }}-${{ matrix.os.name }}-${{ matrix.os.version }}
steps:
# provided through eda-osic-tools
#- name: install git on container
# run: |
# apt update && apt install -y git
- name: Clone repo
uses: actions/checkout@v4
with:
path: uhls_src
submodules: recursive
- name: load container env
shell: bash
run: |
source /eda-osic-tools/env.sh /eda-osic-tools/.env
{
echo "VENV_ROOT=${VENV_ROOT}"
echo "YOSYS_EXE=${YOSYS_EXE}"
echo "ORFS_ROOT=${ORFS_ROOT}"
echo "OPENROAD_EXE=${OPENROAD_EXE}"
echo "KEPLERFORMAL_EXE=${KEPLERFORMAL_EXE}"
echo "NAJA_EDIT_EXE=${NAJA_EDIT_EXE}"
echo "PDK_ROOT=${PDK_ROOT}"
echo "IHP130_PDK_ROOT=${IHP130_PDK_ROOT}"
} >> "${GITHUB_ENV}"
- name: run µhLS unit tests
working-directory: uhls_src
shell: bash
run: |
source ${VENV_ROOT}/bin/activate
python3 -m pip install -r requirements.txt
PYTHONPATH=src python3 -m unittest discover -s test -v
examples-all:
needs: unit-tests
name: make all [${{ matrix.example.name }}, ${{ matrix.example.legalize.name }}, ${{ matrix.opt.name }}, ${{ matrix.opt2.name }}, ${{ matrix.gopt.name }}]
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
strategy:
matrix:
os:
- { name: "ubuntu", version: "latest" }
container:
- { name: "tumeda/eda-osic-tools", version: "latest-default" }
example:
- { name: "dot4_relu", legalize: { name: "Ldef", pass_pipe: "canonicalize", pass_args: "" } }
- { name: "dot4_i8_i32_relu_packed", legalize: { name: "Ldef", pass_pipe: "canonicalize", pass_args: "" } }
opt:
- { name: "O0", pass_pipe: "", pass_args: "" }
- { name: "O1", pass_pipe: "dce,cse,copy_prop,dce", pass_args: "" }
- { name: "O2", pass_pipe: "inline,prune,const_prop,dce,cse,copy_prop,dce", pass_args: "" }
opt2:
- { name: "O2-0", pass_pipe: "", pass_args: "" }
- { name: "O2-1", pass_pipe: "unroll_loops,canonicalize_loops", pass_args: "--pass-arg 1 --pass-arg 2" }
- { name: "O2-2", pass_pipe: "unroll_loops,canonicalize_loops", pass_args: "--pass-arg 1 --pass-arg 4" }
gopt:
- { name: "gopt-static", pass_pipe: "infer_loops,translate_loop_dialect,infer_static,simplify_static_control,predicate,fold_predicates", pass_args: "" }
#- { name: "gopt-dynamic", pass_pipe: "infer_loops,translate_loop_dialect,predicate,fold_predicates", pass_args: "" }
container: ${{ matrix.container.name }}:${{ matrix.container.version }}-${{ matrix.os.name }}-${{ matrix.os.version }}
steps:
# provided through eda-osic-tools
#- name: install git on container
# run: |
# apt update && apt install -y git
- name: Clone repo
uses: actions/checkout@v4
with:
path: uhls_src
submodules: recursive
- name: load container env
shell: bash
run: |
source /eda-osic-tools/env.sh /eda-osic-tools/.env
{
echo "VENV_ROOT=${VENV_ROOT}"
echo "YOSYS_EXE=${YOSYS_EXE}"
echo "ORFS_ROOT=${ORFS_ROOT}"
echo "OPENROAD_EXE=${OPENROAD_EXE}"
echo "KEPLERFORMAL_EXE=${KEPLERFORMAL_EXE}"
echo "NAJA_EDIT_EXE=${NAJA_EDIT_EXE}"
echo "PDK_ROOT=${PDK_ROOT}"
echo "IHP130_PDK_ROOT=${IHP130_PDK_ROOT}"
} >> "${GITHUB_ENV}"
- name: build µhLS examples default
working-directory: uhls_src
shell: bash
run: |
source ${VENV_ROOT}/bin/activate
python3 -m pip install -r requirements.txt
make -C examples STEM="${{ matrix.example.name }}" \
LEGALIZE_PASSES="${{ matrix.example.legalize.pass_pipe }}" LEGALIZE_PASSES_ARGS="${{ matrix.example.legalize.pass_args }}" \
OPT_PASSES="${{ matrix.opt.pass_pipe }}" OPT_PASSES_ARGS="${{ matrix.opt.pass_args }}" \
OPT2_PASSES="${{ matrix.opt2.pass_pipe }}" OPT2_PASSES_ARGS="${{ matrix.opt2.pass_args }}" \
GOPT_PASSES="${{ matrix.gopt.pass_pipe }}" GOPT_PASSES_ARGS="${{ matrix.gopt.pass_args }}"
examples-asic:
needs: examples-all
name: make asic [${{ matrix.example.name }}, ${{ matrix.example.legalize.name }}, ${{ matrix.opt.name }}, ${{ matrix.opt2.name }}, ${{ matrix.gopt.name }}]
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
strategy:
matrix:
os:
- { name: "ubuntu", version: "latest" }
container:
- { name: "tumeda/eda-osic-tools", version: "latest-default" }
example:
- { name: "dot4_relu", legalize: { name: "Ldef", pass_pipe: "canonicalize", pass_args: "" } }
opt:
#- { name: "O0", pass_pipe: "", pass_args: "" }
#- { name: "O1", pass_pipe: "dce,cse,copy_prop,dce", pass_args: "" }
- { name: "O2", pass_pipe: "inline,prune,const_prop,dce,cse,copy_prop,dce", pass_args: "" }
opt2:
- { name: "O2-0", pass_pipe: "", pass_args: "" }
#- { name: "O2-1", pass_pipe: "unroll_loops,canonicalize_loops", pass_args: "--pass-arg 1 --pass-arg 2" }
#- { name: "O2-2", pass_pipe: "unroll_loops,canonicalize_loops", pass_args: "--pass-arg 1 --pass-arg 4" }
gopt:
- { name: "gopt-static", pass_pipe: "infer_loops,translate_loop_dialect,infer_static,simplify_static_control,predicate,fold_predicates", pass_args: "" }
#- { name: "gopt-dynamic", pass_pipe: "infer_loops,translate_loop_dialect,predicate,fold_predicates", pass_args: "" }
container: ${{ matrix.container.name }}:${{ matrix.container.version }}-${{ matrix.os.name }}-${{ matrix.os.version }}
steps:
# provided through eda-osic-tools
#- name: install git on container
# run: |
# apt update && apt install -y git
- name: Clone repo
uses: actions/checkout@v4
with:
path: uhls_src
submodules: recursive
- name: load container env
shell: bash
run: |
source /eda-osic-tools/env.sh /eda-osic-tools/.env
{
echo "VENV_ROOT=${VENV_ROOT}"
echo "YOSYS_EXE=${YOSYS_EXE}"
echo "ORFS_ROOT=${ORFS_ROOT}"
echo "OPENROAD_EXE=${OPENROAD_EXE}"
echo "KEPLERFORMAL_EXE=${KEPLERFORMAL_EXE}"
echo "NAJA_EDIT_EXE=${NAJA_EDIT_EXE}"
echo "PDK_ROOT=${PDK_ROOT}"
echo "IHP130_PDK_ROOT=${IHP130_PDK_ROOT}"
} >> "${GITHUB_ENV}"
- name: build µhLS examples asic
working-directory: uhls_src
shell: bash
run: |
source ${VENV_ROOT}/bin/activate
python3 -m pip install -r requirements.txt
make -C examples STEM="${{ matrix.example.name }}" asic \
LEGALIZE_PASSES="${{ matrix.example.legalize.pass_pipe }}" LEGALIZE_PASSES_ARGS="${{ matrix.example.legalize.pass_args }}" \
OPT_PASSES="${{ matrix.opt.pass_pipe }}" OPT_PASSES_ARGS="${{ matrix.opt.pass_args }}" \
OPT2_PASSES="${{ matrix.opt2.pass_pipe }}" OPT2_PASSES_ARGS="${{ matrix.opt2.pass_args }}" \
GOPT_PASSES="${{ matrix.gopt.pass_pipe }}" GOPT_PASSES_ARGS="${{ matrix.gopt.pass_args }}"