Skip to content

Commit eae088b

Browse files
authored
fix nbs again (#156)
1 parent 21ae1b0 commit eae088b

File tree

4 files changed

+213
-1335
lines changed

4 files changed

+213
-1335
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,34 @@ jobs:
137137
138138
pip install .[test,mlir,eudsl] -v
139139
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+
140168
- name: Test jupyter notebooks
141169
# sed: can't read C:\hostedtoolcache\windows\Python\3.12.10\x64/jupyter_client/runapp.py: No such file or directory
142170
if: matrix.os != 'windows-2022'
@@ -147,18 +175,14 @@ jobs:
147175
148176
pip install -q jupyter
149177
150-
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100/g' \
178+
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 1000/g' \
151179
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
152180
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'
155185
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'
157188
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

Comments
 (0)