Skip to content

Commit 86c8f7b

Browse files
committed
skip windows test_gpu
1 parent eeae1ef commit 86c8f7b

File tree

7 files changed

+70
-38
lines changed

7 files changed

+70
-38
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: 30 additions & 3 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

@@ -42,6 +42,13 @@ 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:
@@ -64,7 +71,11 @@ jobs:
6471
shell: bash
6572
run: |
6673
67-
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
6879
6980
- name: Test mwe
7081
shell: bash
@@ -148,6 +159,14 @@ jobs:
148159
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
149160
py_version: [ "3.12", "3.13", "3.14", "3.14t" ]
150161

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"
169+
151170
steps:
152171
- name: Checkout
153172
uses: actions/checkout@v2
@@ -179,7 +198,15 @@ jobs:
179198
fail-fast: false
180199
matrix:
181200
os: [ ubuntu-22.04, macos-13, macos-14, windows-2022, ubuntu-22.04-arm ]
182-
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"
183210

184211
steps:
185212

mlir/extras/ast/py_type.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def __new__(cls, *args, **kwargs):
3434
return pointer(*args, **kwargs)
3535

3636
def __class_getitem__(cls, item):
37-
"""Return a `ctypes.POINTER` of the given type."""
3837
# For ptr[Self], return a special object
3938
if item is Self:
4039
return _SelfPtr
@@ -128,11 +127,9 @@ class PyObject(Structure):
128127
_fields_ = _py_object_fields
129128

130129
def as_ref(self) -> _Ptr[Self]:
131-
"""Return a pointer to the Structure."""
132130
return pointer(self) # type: ignore
133131

134132
def into_object(self):
135-
"""Cast the PyObject into a Python object."""
136133
py_obj = cast(self.as_ref(), py_object)
137134
return py_obj.value
138135

@@ -200,7 +197,6 @@ class PyTypeObject(Structure):
200197

201198
@classmethod
202199
def from_object(cls, obj) -> Self:
203-
"""Create a PyObject from an object."""
204200
return cls.from_address(address(obj))
205201

206202

@@ -214,7 +210,6 @@ class PyTypeVarObject(Structure):
214210

215211
@classmethod
216212
def from_object(cls, obj) -> Self:
217-
"""Create a PyObject from an object."""
218213
return cls.from_address(address(obj))
219214

220215

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
black
22
inflection
33
pytest
4-
astpretty
4+
astpretty

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# to prevent eg test_transformers.py from erroring because no tests are run
2+
def pytest_sessionfinish(session, exitstatus):
3+
if exitstatus == 5:
4+
session.exitstatus = 0 # Any arbitrary custom status you want to return```

tests/test_runtime.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -855,25 +855,25 @@ def tenfoo(
855855
# # assert np.array_equal(A + B, C)
856856

857857

858-
# def test_raii_context():
859-
# def foo():
860-
# ctx = RAIIMLIRContext()
861-
# mod = Module.create()
862-
# with InsertionPoint(mod.body):
863-
#
864-
# @func(emit=True)
865-
# def foo(x: T.i32()):
866-
# return x
867-
#
868-
# # CHECK: func.func @foo(%[[VAL_0:.*]]: i32) -> i32 {
869-
# # CHECK: return %[[VAL_0]] : i32
870-
# # CHECK: }
871-
#
872-
# filecheck_with_comments(mod)
873-
#
874-
# foo()
875-
#
876-
# assert Context.current is None
858+
def test_raii_context():
859+
def foo():
860+
ctx = RAIIMLIRContext()
861+
mod = Module.create()
862+
with InsertionPoint(mod.body):
863+
864+
@func(emit=True)
865+
def foo(x: T.i32()):
866+
return x
867+
868+
# CHECK: func.func @foo(%[[VAL_0:.*]]: i32) -> i32 {
869+
# CHECK: return %[[VAL_0]] : i32
870+
# CHECK: }
871+
872+
filecheck_with_comments(mod)
873+
874+
foo()
875+
876+
assert Context.current is None
877877

878878

879879
def test_explicit_module():

tests/test_transform.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
from textwrap import dedent
22

33
import pytest
4+
5+
# noinspection PyUnresolvedReferences
6+
# has to be first to set nanobind.nb_type_0
7+
import mlir.extras
8+
9+
410
from mlir.dialects import linalg as linalg_dialect, arith as arith_dialect
511
from mlir.dialects import pdl
612
from mlir.dialects.builtin import module

0 commit comments

Comments
 (0)