Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -135121,14 +135121,6 @@
"lineCount": 1
}
},
{
"code": "reportMissingTypeStubs",
"range": {
"startColumn": 9,
"endColumn": 22,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -135188,16 +135180,16 @@
{
"code": "reportAny",
"range": {
"startColumn": 31,
"endColumn": 42,
"startColumn": 37,
"endColumn": 41,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 31,
"endColumn": 42,
"startColumn": 37,
"endColumn": 41,
"lineCount": 1
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v4
- name: "Main Script"
run: |
EXTRA_INSTALL="pytest types-colorama types-Pygments"
EXTRA_INSTALL="pytest types-colorama types-Pygments scipy-stubs"
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0

Expand Down
4 changes: 2 additions & 2 deletions loopy/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import islpy as isl
from islpy import dim_type
from pymbolic.primitives import AlgebraicLeaf, Variable, is_arithmetic_expression
from pytools import memoize_method
from pytools import memoize_method, set_union

from loopy.diagnostic import (
LoopyError,
Expand Down Expand Up @@ -72,7 +72,7 @@
check_each_kernel,
)
from loopy.type_inference import TypeReader
from loopy.typing import auto, not_none, set_union
from loopy.typing import auto, not_none


if TYPE_CHECKING:
Expand Down
3 changes: 2 additions & 1 deletion loopy/kernel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
from islpy import dim_type
from pytools import (
UniqueNameGenerator,
fset_union,
generate_unique_names,
memoize_method,
natsorted,
Expand All @@ -72,7 +73,7 @@
)
from loopy.tools import update_persistent_hash
from loopy.types import LoopyType, NumpyType
from loopy.typing import InsnId, PreambleGenerator, SymbolMangler, fset_union, not_none
from loopy.typing import InsnId, PreambleGenerator, SymbolMangler, not_none


if TYPE_CHECKING:
Expand Down
3 changes: 1 addition & 2 deletions loopy/kernel/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import pymbolic.primitives as p
from islpy import dim_type
from pymbolic import Expression
from pytools import memoize_on_first_arg, natsorted
from pytools import fset_union, memoize_on_first_arg, natsorted, set_union

from loopy.diagnostic import LoopyError, warn_with_kernel
from loopy.kernel import LoopKernel
Expand All @@ -66,7 +66,6 @@
TUnitOrKernelT,
for_each_kernel,
)
from loopy.typing import fset_union, set_union


if TYPE_CHECKING:
Expand Down
4 changes: 2 additions & 2 deletions loopy/schedule/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
from constantdict import constantdict

import islpy as isl
from pytools import memoize_method, memoize_on_first_arg
from pytools import fset_union, memoize_method, memoize_on_first_arg

from loopy.diagnostic import LoopyError
from loopy.kernel.data import AddressSpace, ArrayArg, TemporaryVariable
from loopy.schedule.tree import Tree
from loopy.typing import InameStr, InameStrSet, fset_union, not_none
from loopy.typing import InameStr, InameStrSet, not_none


if TYPE_CHECKING:
Expand Down
5 changes: 2 additions & 3 deletions loopy/transform/loop_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from constantdict import constantdict
from typing_extensions import override

from pytools import memoize_on_first_arg
from pytools import fset_union, memoize_on_first_arg

from loopy.diagnostic import LoopyError
from loopy.kernel import LoopKernel
Expand All @@ -42,7 +42,6 @@
RuleAwareIdentityMapper,
SubstitutionRuleMappingContext,
)
from loopy.typing import InsnId, fset_union


if TYPE_CHECKING:
Expand All @@ -51,7 +50,7 @@
from loopy.kernel.instruction import InstructionBase
from loopy.match import RuleStack
from loopy.schedule.tools import LoopNestTree
from loopy.typing import InameStr, InameStrSet
from loopy.typing import InameStr, InameStrSet, InsnId


__doc__ = """
Expand Down
12 changes: 2 additions & 10 deletions loopy/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"""


from typing import TYPE_CHECKING, TypeAlias, TypeVar, cast
from typing import TYPE_CHECKING, TypeAlias, TypeVar

import numpy as np
from typing_extensions import TypeIs
Expand All @@ -60,7 +60,7 @@


if TYPE_CHECKING:
from collections.abc import Callable, Iterable, Iterator
from collections.abc import Callable, Iterator

from loopy.codegen import PreambleInfo
from loopy.kernel import LoopKernel
Expand Down Expand Up @@ -124,11 +124,3 @@ def integer_expr_or_err(expr: Expression) -> Integer | ExpressionNode:
def assert_tuple(obj: tuple[ElT, ...] | object) -> tuple[ElT, ...]:
assert isinstance(obj, tuple)
return obj


def set_union(iterable: Iterable[Iterable[T]]):
return cast("set[T]", set()).union(*iterable)


def fset_union(iterable: Iterable[Iterable[T]]):
return cast("frozenset[T]", frozenset()).union(*iterable)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
"Topic :: Utilities",
]
dependencies = [
"pytools>=2025.1.6",
"pytools>=2025.2.2",
"pymbolic>=2024.2.2",
"genpy>=2016.1.2",

Expand Down
Loading