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
728 changes: 0 additions & 728 deletions .basedpyright/baseline.json

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions doc/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,6 @@ This list is always growing, but here are a few pointers:
:func:`loopy.split_iname` or :func:`loopy.fix_parameters` along with
:func:`loopy.split_array_axis`.)

* Reuse of Temporary Storage

Use :func:`loopy.alias_temporaries` to reduce the size of intermediate
storage.

* SoA $\leftrightarrow$ AoS

Use :func:`loopy.tag_array_axes` with the ``"sep"`` array axis tag
Expand Down
7 changes: 0 additions & 7 deletions doc/ref_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,6 @@ These are usually key-value pairs. The following attributes are recognized:
* ``tags=tag1:tag2`` Apply tags to this instruction that can then be used
for :ref:`context-matching`.

* ``groups=group1:group2`` Make this instruction part of the given
instruction groups. See :class:`InstructionBase.groups`.

* ``conflicts_grp=group1:group2`` Make this instruction conflict with the
given instruction groups. See
:class:`InstructionBase.conflicts_with_groups`.

* ``atomic`` The update embodied by the assignment is carried out
atomically. See :attr:`Assignment.atomicity` for precise semantics.

Expand Down
2 changes: 0 additions & 2 deletions doc/ref_transform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ Caching, Precomputation and Prefetching

.. autofunction:: buffer_array

.. autofunction:: alias_temporaries

Influencing data access
-----------------------

Expand Down
2 changes: 0 additions & 2 deletions loopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
from loopy.transform.concatenate import concatenate_arrays
from loopy.transform.data import (
add_prefetch,
alias_temporaries,
allocate_temporaries_for_base_storage,
change_arg_to_image,
remove_unused_arguments,
Expand Down Expand Up @@ -297,7 +296,6 @@
"add_nosync",
"add_padding",
"add_prefetch",
"alias_temporaries",
"allocate_temporaries_for_base_storage",
"assignment_to_subst",
"assume",
Expand Down
10 changes: 0 additions & 10 deletions loopy/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,6 @@ def satisfy_dep_reqs_in_order(dep_reqs_to_vars, edges, order) -> None:

for (writer_id, other_id), variables in dep_reqs_to_vars.items():
writer = kernel.id_to_insn[writer_id]
other = kernel.id_to_insn[other_id]

for var in variables:
eq_class = aliasing_equiv_classes[var]
unaliased_readers = rmap.get(var, set())
Expand All @@ -1248,14 +1246,6 @@ def satisfy_dep_reqs_in_order(dep_reqs_to_vars, edges, order) -> None:
writer_id, "w", other_id, "any", var)):
continue

# Do not enforce ordering for aliasing-based relationships
# in different groups.
if (is_relationship_by_aliasing and (
bool(writer.groups & other.conflicts_with_groups)
or
bool(other.groups & writer.conflicts_with_groups))):
continue

msg = ("No dependency relationship found between "
"'{writer_id}' which writes {var} and "
"'{other_id}' which also accesses {var}. "
Expand Down
11 changes: 0 additions & 11 deletions loopy/kernel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,6 @@ def make_unique_instruction_id(self, insns=None, based_on="insn",

raise RuntimeError("Unreachable.")

def all_group_names(self):
result = set()
for insn in self.instructions:
result.update(insn.groups)
result.update(insn.conflicts_with_groups)

return frozenset(result)

def get_group_name_generator(self):
return UniqueNameGenerator(set(self.all_group_names()))

def get_var_descriptor(
self, name: str) -> TemporaryVariable | KernelArgument:
try:
Expand Down
21 changes: 0 additions & 21 deletions loopy/kernel/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ def get_default_insn_options_dict() -> dict[str, Any]:
"depends_on": frozenset(),
"depends_on_is_final": False,
"no_sync_with": frozenset(),
"groups": frozenset(),
"conflicts_with_groups": frozenset(),
"insn_id": None,
"inames_to_dup": [],
"priority": 0,
Expand Down Expand Up @@ -319,16 +317,6 @@ def parse_nosync_option(opt_value: str) -> _NosyncParseResult:
result["no_sync_with"] = result["no_sync_with"].union(
frozenset([(match, scope)]))

elif opt_key == "groups" and opt_value is not None:
result["groups"] = frozenset(
intern(grp.strip()) for grp in opt_value.split(":")
if grp.strip())

elif opt_key == "conflicts" and opt_value is not None:
result["conflicts_with_groups"] = frozenset(
intern(grp.strip()) for grp in opt_value.split(":")
if grp.strip())

elif opt_key == "inames" and opt_value is not None:
if opt_value.startswith("+"):
result["within_inames_is_final"] = False
Expand Down Expand Up @@ -733,9 +721,6 @@ def intern_if_str(s: T) -> T:
"id": intern_if_str(insn.id),
"depends_on": frozenset(intern_if_str(dep)
for dep in insn.depends_on),
"groups": frozenset(checked_intern(grp) for grp in insn.groups),
"conflicts_with_groups": frozenset(
checked_intern(grp) for grp in insn.conflicts_with_groups),
"within_inames": frozenset(
checked_intern(iname) for iname in insn.within_inames),
}
Expand Down Expand Up @@ -850,12 +835,6 @@ def intern_if_str(s: T) -> T:
predicates=(
insn.predicates
| insn_options_stack[-1]["predicates"]),
groups=(
insn.groups
| insn_options_stack[-1]["groups"]),
conflicts_with_groups=(
insn.conflicts_with_groups
| insn_options_stack[-1]["conflicts_with_groups"]),
**kwargs)

norm_tags = _normalize_tags(insn.tags)
Expand Down
55 changes: 2 additions & 53 deletions loopy/kernel/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,6 @@ class InstructionBase(ImmutableRecord, Taggable):

Defaults to *False*.

.. attribute:: groups

A :class:`frozenset` of strings indicating the names of 'instruction
groups' of which this instruction is a part. An instruction group is
considered 'active' as long as one (but not all) instructions of the
group have been executed.

.. attribute:: conflicts_with_groups

A :class:`frozenset` of strings indicating which instruction groups
(see :attr:`groups`) may not be active when this
instruction is scheduled.

.. attribute:: priority

Scheduling priority, an integer. Higher means 'execute sooner'.
Expand Down Expand Up @@ -283,8 +270,6 @@ class InstructionBase(ImmutableRecord, Taggable):

happens_after: Mapping[str, HappensAfter]
depends_on_is_final: bool
groups: frozenset[str]
conflicts_with_groups: frozenset[str]
no_sync_with: frozenset[tuple[InsnId, NoSyncScope]]
predicates: frozenset[Expression]
within_inames: frozenset[InameStr]
Expand All @@ -293,17 +278,15 @@ class InstructionBase(ImmutableRecord, Taggable):

# within_inames_is_final is deprecated and will be removed in version 2017.x.

fields: ClassVar[set[str]] = {"id", "depends_on_is_final", "groups",
"conflicts_with_groups", "no_sync_with", "predicates",
fields: ClassVar[set[str]] = {"id", "depends_on_is_final",
"no_sync_with", "predicates",
"within_inames_is_final", "within_inames", "priority"}

def __init__(self,
id: str | None,
happens_after: (
Mapping[str, HappensAfter] | frozenset[str] | str | None),
depends_on_is_final: bool | None,
groups: frozenset[str] | None,
conflicts_with_groups: frozenset[str] | None,
no_sync_with: frozenset[tuple[InsnId, NoSyncScope]] | None,
within_inames_is_final: bool | None,
within_inames: frozenset[str] | None,
Expand Down Expand Up @@ -374,12 +357,6 @@ def __init__(self,

# }}}

if groups is None:
groups = frozenset()

if conflicts_with_groups is None:
conflicts_with_groups = frozenset()

if no_sync_with is None:
no_sync_with = frozenset()

Expand Down Expand Up @@ -412,15 +389,11 @@ def __init__(self,
# from loopy.tools import is_interned
# assert is_interned(id)
# assert all(is_interned(dep) for dep in depends_on)
# assert all(is_interned(grp) for grp in groups)
# assert all(is_interned(grp) for grp in conflicts_with_groups)
# assert all(is_interned(iname) for iname in within_inames)
# assert all(is_interned(pred) for pred in predicates)

assert isinstance(within_inames, AbstractSet)
assert isinstance(happens_after, abc_Mapping) or happens_after is None
assert isinstance(groups, AbstractSet)
assert isinstance(conflicts_with_groups, AbstractSet)

from loopy.tools import is_hashable
assert is_hashable(happens_after)
Expand All @@ -430,7 +403,6 @@ def __init__(self,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
no_sync_with=no_sync_with,
groups=groups, conflicts_with_groups=conflicts_with_groups,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
priority=priority,
Expand Down Expand Up @@ -551,10 +523,6 @@ def get_str_options(self) -> Sequence[str]:
if self.no_sync_with:
result.append("nosync="+":".join(
"%s@%s" % entry for entry in self.no_sync_with))
if self.groups:
result.append("groups=%s" % ":".join(self.groups))
if self.conflicts_with_groups:
result.append("conflicts=%s" % ":".join(self.conflicts_with_groups))
if self.priority:
result.append("priority=%d" % self.priority)
if self.tags:
Expand Down Expand Up @@ -602,9 +570,6 @@ def __setstate__(self, val):
self.happens_after = constantdict({
intern(after_id): ha
for after_id, ha in self.happens_after.items()})
self.groups = intern_frozenset_of_ids(self.groups)
self.conflicts_with_groups = (
intern_frozenset_of_ids(self.conflicts_with_groups))
self.within_inames = (
intern_frozenset_of_ids(self.within_inames))

Expand Down Expand Up @@ -944,8 +909,6 @@ def __init__(self,
happens_after:
Mapping[str, HappensAfter] | frozenset[str] | str | None = None,
depends_on_is_final: bool | None = None,
groups: frozenset[str] | None = None,
conflicts_with_groups: frozenset[str] | None = None,
no_sync_with: frozenset[tuple[InsnId, NoSyncScope]] | None = None,
within_inames_is_final: bool | None = None,
within_inames: frozenset[str] | None = None,
Expand All @@ -968,8 +931,6 @@ def __init__(self,
id=id,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
Expand Down Expand Up @@ -1114,8 +1075,6 @@ def __init__(self,
id: str | None = None,
happens_after=None,
depends_on_is_final=None,
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None,
within_inames=None,
Expand All @@ -1129,8 +1088,6 @@ def __init__(self,
id=id,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
Expand Down Expand Up @@ -1439,7 +1396,6 @@ def __init__(self,
iname_exprs, code,
read_variables=frozenset(), assignees=(),
id=None, happens_after=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
priority=0,
Expand All @@ -1459,7 +1415,6 @@ def __init__(self,
id=id,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
groups=groups, conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
Expand Down Expand Up @@ -1622,7 +1577,6 @@ class NoOpInstruction(_DataObliviousInstruction):
"""

def __init__(self, id=None, happens_after=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
priority=None,
Expand All @@ -1631,8 +1585,6 @@ def __init__(self, id=None, happens_after=None, depends_on_is_final=None,
id=id,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
Expand Down Expand Up @@ -1695,7 +1647,6 @@ class BarrierInstruction(_DataObliviousInstruction):
"mem_kind"}

def __init__(self, id, happens_after=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
priority=None,
Expand All @@ -1711,8 +1662,6 @@ def __init__(self, id, happens_after=None, depends_on_is_final=None,
id=id,
happens_after=happens_after,
depends_on_is_final=depends_on_is_final,
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
within_inames_is_final=within_inames_is_final,
within_inames=within_inames,
Expand Down
5 changes: 0 additions & 5 deletions loopy/kernel/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1616,11 +1616,6 @@ def adapt_to_new_inames_list(new_inames):
if isinstance(insn, lp.Assignment) and insn.atomicity:
options.append("atomic=%s" % ":".join(
str(a) for a in insn.atomicity))
if insn.groups:
options.append("groups=%s" % ":".join(insn.groups))
if insn.conflicts_with_groups:
options.append(
"conflicts=%s" % ":".join(insn.conflicts_with_groups))
if insn.no_sync_with:
options.append("no_sync_with=%s" % ":".join(
"%s@%s" % entry for entry in sorted(insn.no_sync_with)))
Expand Down
Loading
Loading