36
36
contents : write
37
37
packages : read
38
38
39
+ strategy :
40
+ fail-fast : false
41
+ matrix :
42
+ python_version : [
43
+ " 3.10" , "3.12", "3.13",
44
+ ]
45
+
39
46
steps :
40
47
- name : Free disk space
41
48
uses : descriptinc/free-disk-space@main
69
76
MLIR_VERSION=$(git rev-parse --short HEAD)
70
77
echo "Building mlir-aie version $MLIR_VERSION"
71
78
72
- python -m venv ${{ github.workspace }}/aie-venv
79
+ python${{ matrix.python_version }} -m venv ${{ github.workspace }}/aie-venv
73
80
source ${{ github.workspace }}/aie-venv/bin/activate
74
81
75
82
echo "Installing vitis_aie_essentials ..."
@@ -108,14 +115,14 @@ jobs:
108
115
popd
109
116
110
117
auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/mlir_aie-*.whl --plat manylinux_2_35_x86_64 --exclude libcdo_driver.so --exclude libmlir_float16_utils.so
111
- WHL_FN=$(ls $WHEELHOUSE_DIR/repaired_wheel/mlir_aie*whl)
112
- mv "$WHL_FN" "`echo $WHL_FN | sed "s/cp310-cp310/py3-none/"`"
118
+ # WHL_FN=$(ls $WHEELHOUSE_DIR/repaired_wheel/mlir_aie*whl)
119
+ # mv "$WHL_FN" "`echo $WHL_FN | sed "s/cp310-cp310/py3-none/"`"
113
120
114
121
- name : Upload mlir_aie
115
122
uses : actions/upload-artifact@v4
116
123
with :
117
124
path : wheelhouse/repaired_wheel/mlir_aie*whl
118
- name : mlir_aie
125
+ name : mlir_aie-${{ matrix.python_version }}
119
126
120
127
- name : Release current commit
121
128
if : github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
@@ -129,119 +136,3 @@ jobs:
129
136
allowUpdates : true
130
137
replacesArtifacts : true
131
138
makeLatest : true
132
-
133
- build-wheel :
134
- name : Build wheel
135
- runs-on : ubuntu-latest
136
- needs : build-repo
137
-
138
- permissions :
139
- id-token : write
140
- contents : write
141
- packages : read
142
-
143
- strategy :
144
- fail-fast : false
145
- matrix :
146
- python_version : [
147
- " 3.10" , "3.12",
148
- ]
149
-
150
- steps :
151
- - name : Get the project repository
152
- uses : actions/checkout@v4
153
- with :
154
- fetch-depth : 2
155
- submodules : " true"
156
-
157
- - uses : actions/download-artifact@v4
158
- with :
159
- # unpacks default artifact into dist/
160
- # if `name: artifact` is omitted, the action will create extra parent dir
161
- name : mlir_aie
162
- path : .
163
-
164
-
165
- name : Build mlir-aie python bindings
166
- id : runcmd
167
- with :
168
- distro : none
169
- arch : none
170
- base_image : ghcr.io/xilinx/mlir-aie/ubuntu22-ryzenai-1.3.0ea:1.1
171
- githubToken : ${{ github.token }}
172
- dockerRunArgs : |
173
- --mac-address 02:42:ac:11:00:02
174
- env : |
175
- VITIS: ${{ env.VITIS }}
176
- XILINXD_LICENSE_FILE: ${{ env.XILINXD_LICENSE_FILE }}
177
- run : |
178
- git config --global --add safe.directory $PWD
179
- MLIR_VERSION=$(git rev-parse --short HEAD)
180
- echo "Building mlir-aie version $MLIR_VERSION ..."
181
-
182
- # faster to do this twice instead of upload the directory with ~4000 files in it...
183
- VERSION=$(utils/clone-llvm.sh --get-wheel-version)
184
- pip -q download mlir==$VERSION \
185
- -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro
186
- unzip -q mlir-*.whl
187
- # I have no clue why but the system clock on GHA containers is like 12 hours ahead.
188
- # That means wheels have file with time stamps in the future which makes ninja loop
189
- # forever when configuring. Set the time to some arbitrary stamp in the past just to be safe.
190
- find mlir -exec touch -a -m -t 201108231405.14 {} \;
191
-
192
- unzip -q mlir_aie-*.whl
193
- find mlir_aie -exec touch -a -m -t 201108231405.14 {} \;
194
-
195
- python${{ matrix.python_version }} -m venv aie-venv
196
- source aie-venv/bin/activate
197
-
198
- pip install -r python/requirements.txt
199
- HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.txt
200
- source aie-venv/bin/activate
201
-
202
- export MLIR_INSTALL_ABS_PATH=$PWD/mlir
203
- export MLIR_AIE_INSTALL_ABS_PATH=$PWD/mlir_aie
204
- export WHEELHOUSE_DIR=$PWD/wheelhouse
205
- export CMAKE_MODULE_PATH=$PWD/cmake/modulesXilinx
206
-
207
- export PATH=$VITIS/bin:$VITIS/aietools/bin:$PATH
208
- export XRT_ROOT=/opt/xilinx/xrt
209
- export AIE_PROJECT_COMMIT=$MLIR_VERSION
210
- export DATETIME=$(date +"%Y%m%d%H")
211
-
212
- cp python/requirements.txt utils/mlir_aie_wheels/python_bindings
213
-
214
- pushd utils/mlir_aie_wheels/python_bindings
215
-
216
- pip install wheel auditwheel patchelf
217
- CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation
218
- DEBUG=1 CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation
219
-
220
- popd
221
-
222
- auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/aie_python_bindings*whl --plat manylinux_2_35_x86_64
223
-
224
- - uses : geekyeggo/delete-artifact@v5
225
- if : github.event_name == 'pull_request'
226
- with :
227
- name : mlir_aie
228
-
229
- - name : Upload wheels
230
- if : github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
231
- uses : actions/upload-artifact@v4
232
- with :
233
- path : wheelhouse/repaired_wheel/aie_python_bindings*.whl
234
- name : ryzen_ai_wheel-python-${{ matrix.python_version }}
235
-
236
- - name : Release current commit
237
- if : github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
238
-
239
- with :
240
- artifacts : wheelhouse/repaired_wheel/aie_python_bindings*.whl
241
- token : " ${{ secrets.GITHUB_TOKEN }}"
242
- tag : ' latest-wheels'
243
- name : ' latest-wheels'
244
- removeArtifacts : false
245
- allowUpdates : true
246
- replacesArtifacts : true
247
- makeLatest : true
0 commit comments