@@ -137,6 +137,34 @@ jobs:
137
137
138
138
pip install .[test,mlir,eudsl] -v
139
139
140
+ - name : Test gpu examples
141
+ shell : bash
142
+ run : |
143
+
144
+ python examples/rdna_matmul_opt.py
145
+ python examples/cuda_matmul_opt.py
146
+
147
+ test-jupyter-notebooks :
148
+
149
+ runs-on : ${{ matrix.os }}
150
+
151
+ strategy :
152
+ fail-fast : false
153
+ matrix :
154
+ os : [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
155
+ py_version : [ "3.12", "3.13" ]
156
+
157
+ steps :
158
+
159
+ - name : Checkout
160
+ uses : actions/checkout@v2
161
+
162
+ - name : Setup Python
163
+ uses : actions/setup-python@v4
164
+ with :
165
+ python-version : ${{ matrix.py_version }}
166
+ allow-prereleases : true
167
+
140
168
- name : Test jupyter notebooks
141
169
# sed: can't read C:\hostedtoolcache\windows\Python\3.12.10\x64/jupyter_client/runapp.py: No such file or directory
142
170
if : matrix.os != 'windows-2022'
@@ -147,18 +175,14 @@ jobs:
147
175
148
176
pip install -q jupyter
149
177
150
- sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100 /g' \
178
+ sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 1000 /g' \
151
179
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
152
180
153
- jupyter execute examples/mlir_python_extras.ipynb
154
- jupyter execute examples/vectorization_e2e.ipynb
181
+ jupyter execute examples/mlir_python_extras.ipynb --output=mlir_python_extras_output
182
+ cat examples/mlir_python_extras_output.ipynb | jq '.cells[].outputs | select(length > 0) | .[0] | .text'
183
+ jupyter execute examples/vectorization_e2e.ipynb --output=vectorization_e2e_output
184
+ cat examples/vectorization_e2e_output.ipynb | jq '.cells[].outputs | select(length > 0) | .[0] | .text'
155
185
if [ ${{ matrix.os }} == 'ubuntu-22.04' ]; then
156
- jupyter execute examples/cuda_e2e.ipynb
186
+ jupyter execute examples/cuda_e2e.ipynb --output=cuda_e2e_output
187
+ cat examples/cuda_e2e_output.ipynb | jq '.cells[].outputs | select(length > 0) | .[0] | .text'
157
188
fi
158
-
159
- - name : Test gpu examples
160
- shell : bash
161
- run : |
162
-
163
- python examples/rdna_matmul_opt.py
164
- python examples/cuda_matmul_opt.py
0 commit comments