Skip to content

Commit 94061d5

Browse files
authored
flash attention (#143)
1 parent f6bff8f commit 94061d5

19 files changed

+1425
-347
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ jobs:
6767
shell: bash
6868
run: |
6969
70-
pytest tests
70+
pytest -v tests
7171
7272
- name: Test mwe
7373
shell: bash
7474
run: |
7575
7676
python examples/mwe.py
77+
python examples/flash_attention.py
7778
7879
test-other-host-bindings:
7980

@@ -105,20 +106,20 @@ jobs:
105106
shell: bash
106107
run: |
107108
if [ ${{ matrix.os }} == 'windows-2022' ]; then
108-
pytest -s tests/test_other_hosts.py
109+
pytest -v -s tests/test_other_hosts.py
109110
else
110-
pytest --capture=tee-sys tests/test_other_hosts.py
111+
pytest -v --capture=tee-sys tests/test_other_hosts.py
111112
fi
112113
113-
test-jupyter:
114+
test-examples:
114115

115116
runs-on: ${{ matrix.os }}
116117

117118
strategy:
118119
fail-fast: false
119120
matrix:
120-
os: [ ubuntu-22.04 ]
121-
py_version: [ "3.10" ]
121+
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
122+
py_version: [ "3.12", "3.13" ]
122123

123124
steps:
124125
- name: Checkout
@@ -130,16 +131,29 @@ jobs:
130131
python-version: ${{ matrix.py_version }}
131132
allow-prereleases: true
132133

133-
- name: Run notebook
134+
- name: Install and configure
135+
shell: bash
136+
run: |
137+
138+
pip install .[test,mlir,eudsl] -v
139+
140+
- name: Test jupyter notebooks
141+
# sed: can't read C:\hostedtoolcache\windows\Python\3.12.10\x64/jupyter_client/runapp.py: No such file or directory
142+
if: matrix.os != 'windows-2022'
134143
shell: bash
135144
run: |
136145
137146
pip install jupyter
138-
pip install -q mlir-python-bindings
139-
pip install -q .
140147
141148
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100/g' \
142149
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
143150
144151
jupyter execute examples/mlir_python_extras.ipynb
145152
jupyter execute examples/vectorization_e2e.ipynb
153+
154+
- name: Test gpu examples
155+
shell: bash
156+
run: |
157+
158+
python examples/rdna_matmul_opt.py
159+
python examples/cuda_matmul_opt.py

0 commit comments

Comments
 (0)