Skip to content

Commit 268bc05

Browse files
authored
py314 (#173)
1 parent 068f97c commit 268bc05

File tree

21 files changed

+365
-108
lines changed

21 files changed

+365
-108
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ on:
1111
description: 'bundle mlir python bindings'
1212
type: string
1313
default: 1
14-
release:
15-
types:
16-
- published
17-
push:
18-
branches:
19-
- main
20-
pull_request:
21-
paths:
22-
- .github/workflows/release.yml
14+
# release:
15+
# types:
16+
# - published
17+
# push:
18+
# branches:
19+
# - main
20+
# pull_request:
21+
# paths:
22+
# - .github/workflows/release.yml
2323

2424
concurrency:
2525
group: ci-build-release-${{ github.event.number || github.sha }}
2626
cancel-in-progress: true
2727

2828
env:
2929
SYSTEM_VERSION_COMPAT: 0
30-
PIP_FIND_LINKS: "https://github.com/llvm/eudsl/releases/expanded_assets/latest https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest"
30+
PIP_FIND_LINKS: "https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest"
3131

3232
jobs:
3333

.github/workflows/test.yml

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121

2222
env:
2323
SYSTEM_VERSION_COMPAT: 0
24-
PIP_FIND_LINKS: "https://github.com/llvm/eudsl/releases/expanded_assets/latest https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest"
24+
PIP_FIND_LINKS: "https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest"
2525

2626
jobs:
2727

@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
36-
py_version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
36+
py_version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t" ]
3737

3838
exclude:
3939
- os: macos-13
@@ -42,32 +42,40 @@ jobs:
4242
- os: macos-14
4343
py_version: "3.9"
4444

45+
# <frozen importlib._bootstrap>:491: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production.
46+
- os: windows-2022
47+
py_version: "3.14"
48+
49+
- os: windows-2022
50+
py_version: "3.14t"
51+
4552
name: "${{ matrix.os }}-${{ matrix.py_version }}"
4653

4754
steps:
4855
- name: Checkout
4956
uses: actions/checkout@v2
5057

5158
- name: Setup Python
52-
uses: actions/setup-python@v4
59+
uses: actions/setup-python@v5.6
5360
with:
5461
python-version: ${{ matrix.py_version }}
5562
allow-prereleases: true
5663

5764
- name: Install and configure
5865
shell: bash
5966
run: |
60-
if [ ${{ matrix.py_version }} == '3.9' ]; then
67+
6168
pip install .[test,mlir] -v
62-
else
63-
pip install .[test,mlir,eudsl] -v
64-
fi
65-
69+
6670
- name: Test
6771
shell: bash
6872
run: |
6973
70-
pytest -v tests
74+
# so that loaded modules isn't reused between modules
75+
for f in tests/test*.py; do
76+
echo "Testing $f"
77+
pytest -v $f
78+
done
7179
7280
- name: Test mwe
7381
shell: bash
@@ -86,7 +94,7 @@ jobs:
8694
uses: actions/checkout@v2
8795

8896
- name: Setup Python
89-
uses: actions/setup-python@v4
97+
uses: actions/setup-python@v5.6
9098
with:
9199
python-version: 3.12
92100

@@ -121,7 +129,7 @@ jobs:
121129
uses: actions/checkout@v2
122130

123131
- name: Setup Python
124-
uses: actions/setup-python@v4
132+
uses: actions/setup-python@v5.6
125133
with:
126134
python-version: ${{ matrix.py_version }}
127135
allow-prereleases: true
@@ -149,14 +157,22 @@ jobs:
149157
fail-fast: false
150158
matrix:
151159
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
152-
py_version: [ "3.12", "3.13" ]
160+
py_version: [ "3.12", "3.13", "3.14", "3.14t" ]
161+
162+
# <frozen importlib._bootstrap>:491: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production.
163+
exclude:
164+
- os: windows-2022
165+
py_version: "3.14"
166+
167+
- os: windows-2022
168+
py_version: "3.14t"
153169

154170
steps:
155171
- name: Checkout
156172
uses: actions/checkout@v2
157173

158174
- name: Setup Python
159-
uses: actions/setup-python@v4
175+
uses: actions/setup-python@v5.6
160176
with:
161177
python-version: ${{ matrix.py_version }}
162178
allow-prereleases: true
@@ -165,7 +181,7 @@ jobs:
165181
shell: bash
166182
run: |
167183
168-
pip install .[test,mlir,eudsl] -v
184+
pip install .[test,mlir] -v
169185
170186
- name: Test gpu examples
171187
shell: bash
@@ -182,15 +198,23 @@ jobs:
182198
fail-fast: false
183199
matrix:
184200
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
185-
py_version: [ "3.12", "3.13" ]
201+
py_version: [ "3.12", "3.13", "3.14", "3.14t" ]
202+
203+
# <frozen importlib._bootstrap>:491: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production.
204+
exclude:
205+
- os: windows-2022
206+
py_version: "3.14"
207+
208+
- os: windows-2022
209+
py_version: "3.14t"
186210

187211
steps:
188212

189213
- name: Checkout
190214
uses: actions/checkout@v2
191215

192216
- name: Setup Python
193-
uses: actions/setup-python@v4
217+
uses: actions/setup-python@v5.6
194218
with:
195219
python-version: ${{ matrix.py_version }}
196220
allow-prereleases: true

mlir/extras/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages
2+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
3+
4+
from .. import ir
5+
from .ast.py_type import PyTypeObject
6+
7+
nb_meta_cls = type(ir.Value)
8+
9+
_Py_TPFLAGS_BASETYPE = 1 << 10
10+
PyTypeObject.from_object(nb_meta_cls).tp_flags |= _Py_TPFLAGS_BASETYPE

0 commit comments

Comments
 (0)