Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop nest constraints #347

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
915471e
add constrain_loop_nesting to imported functions
jdsteve2 Apr 26, 2021
1e68d02
add use_loop_nest_constraints option
jdsteve2 Apr 26, 2021
7d7fc02
add loop_nest_constraint attribute to kernel
jdsteve2 Apr 26, 2021
7acf1aa
copy in AND UPDATE functions for creating and checking new loop nest …
jdsteve2 Apr 26, 2021
0f27f07
fix flake8 issues
jdsteve2 Apr 26, 2021
fcbe500
fix a few more invalid loop nest constraints cases
jdsteve2 Apr 26, 2021
75b3d80
create test for loop nest semantics parsing (copied in from old branc…
jdsteve2 Apr 26, 2021
b2ec4bf
un-comment-out (and slightly improve) more old functions copied in fr…
jdsteve2 Apr 26, 2021
42578f6
copy in test for loop nest constraint satisfaction from old branch (h…
jdsteve2 Apr 26, 2021
ddfc0e5
test for adding (multiple) loop nest constraints to a kernel; copied …
jdsteve2 Apr 26, 2021
8c51083
use term 'nest constraints' instead of 'loop priority' in cycle error…
jdsteve2 Apr 26, 2021
c3dec79
test for catching incompatible loop nest constraints; copied in from …
jdsteve2 Apr 26, 2021
308fba4
comment out currently unused function
jdsteve2 Apr 26, 2021
7d5652a
rename last_entered_loop->deepest_active_iname to be more accurate an…
jdsteve2 Apr 26, 2021
62ffb73
rename uninformative 'want' variable in various places, mostly want->…
jdsteve2 Apr 26, 2021
c701800
rename have->nonconc_active_inames
jdsteve2 Apr 26, 2021
25bae77
remove use_loop_nest_constraints option (just use them if they exist)
jdsteve2 Apr 26, 2021
7f9fcdc
add some informative comments
jdsteve2 Apr 26, 2021
86cdce7
when linearizing, don't leave a loop if doing so would violate must_n…
jdsteve2 Apr 26, 2021
6d8c8c7
rename needed_inames->unscheduled_nonconc_insn_inames_needed
jdsteve2 Apr 26, 2021
c21efdd
more helpful comments
jdsteve2 Apr 26, 2021
c9c7952
add some noqa
jdsteve2 Apr 26, 2021
624f03c
fix flake8 issues
jdsteve2 Apr 26, 2021
61e1ede
enable check_all_must_not_nests()
jdsteve2 Apr 26, 2021
d6cb584
during linearization, use must-nest and must-not-nest constraints to …
jdsteve2 Apr 26, 2021
94b6f27
enable get_iname_nestings()
jdsteve2 Apr 26, 2021
c246bc9
make sure ALL must_nest_constraints are satisfied before yielding a l…
jdsteve2 Apr 26, 2021
0bdc80e
add get_graph_sources() to iname.py for now
jdsteve2 Apr 26, 2021
ee59a67
add test to ensure that vec inames are linearized innermost
jdsteve2 Apr 26, 2021
83885f4
allow debug_args to be passed through from get_one_linearized_kernel()
jdsteve2 Apr 26, 2021
03cd9f1
add test for handling of loop nest constraints during linearization (…
jdsteve2 Apr 26, 2021
a75247a
fix flake8 issues
jdsteve2 Apr 26, 2021
ce25f28
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Apr 26, 2021
fd0c96a
rename test file test_loop_nest_semantics.py->test_nest_constraints.py
jdsteve2 Apr 27, 2021
764d903
copy in and update old functions for replacing inames in nest constra…
jdsteve2 Apr 27, 2021
c568e3b
add test for nest constraint updating during split_iname
jdsteve2 Apr 27, 2021
d78ac5b
allow replaced inames to be kept around when replacing inames in cons…
jdsteve2 Apr 27, 2021
1218f18
test constraint handling with 'within' in splilt_iname
jdsteve2 Apr 27, 2021
eeaa6fd
clean up test_constraint_updating_split_iname with better helper func…
jdsteve2 Apr 27, 2021
1de8178
shorten variable names to clean up test
jdsteve2 Apr 27, 2021
18f45fb
rename variable coalesce_duplicate_replacement_inames->coalesce_new_i…
jdsteve2 Apr 27, 2021
a677b59
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Apr 27, 2021
f213da8
fix flake8 issue
jdsteve2 Apr 27, 2021
5f3c575
eliminate unnecessary keep_old_inames option when replacing inames in…
jdsteve2 Apr 27, 2021
4cc5175
update loop nest constraints in duplicate_inames (and handle within c…
jdsteve2 Apr 27, 2021
7253463
add test for nest constraint updating in duplciate_inames
jdsteve2 Apr 27, 2021
b086ecf
raise NotImplementedError in rename_iname() when new_iname does exist
jdsteve2 Apr 27, 2021
2f4297a
add test for constraitn updating in rename_iname
jdsteve2 Apr 27, 2021
191abbc
Don't allow tagging of iname found in must_nest constraint as concurrent
jdsteve2 Apr 27, 2021
96d07d5
test error when tagging iname found in must_nest constraint as concur…
jdsteve2 Apr 27, 2021
cdacde0
handle constraint updating in join_inames (when within=None)
jdsteve2 Apr 27, 2021
7ec404f
test constraint handling in join_inames()
jdsteve2 Apr 27, 2021
65cdfb3
when inames are tagged as vec, see if there is a must-nest constraint…
jdsteve2 Apr 27, 2021
cd77929
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 9, 2021
0cf937d
clean up nest constraint code and add more comments/documentation
jdsteve2 May 9, 2021
c7432a3
fix some typos
jdsteve2 May 9, 2021
e07d0ec
fix typo in comment
jdsteve2 May 9, 2021
a026a5e
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
f84ce62
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
68c93a4
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
8478062
Merge branch 'loop-nest-constraints-v2' of github.com:inducer/loopy i…
jdsteve2 May 17, 2021
69cc3f9
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
57ca4ca
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 23, 2021
050fac5
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 23, 2021
092c8ae
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 27, 2021
60ee0c6
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 1, 2021
24da42c
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 2, 2021
3cf39be
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 2, 2021
758b747
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 2, 2021
c421d38
add within_inames arg to add_barrier
jdsteve2 Jun 3, 2021
b15d130
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 6, 2021
4b32150
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
f47c836
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
7dbd9d0
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
445c5a8
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
c3047fe
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 11, 2021
04dad68
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 15, 2021
6377454
count globals pretending to be temporary variables
jdsteve2 Jun 30, 2021
d01558e
fix merge conflicts
jdsteve2 Jul 26, 2021
2f7c583
add @for_each_kernel to constrain_loop_nesting
jdsteve2 Jul 27, 2021
5fe7e52
fixes after kernel callables update
jdsteve2 Jul 27, 2021
2f5e5c0
add TODO
jdsteve2 Jul 27, 2021
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
6 changes: 4 additions & 2 deletions loopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
from loopy.version import VERSION, MOST_RECENT_LANGUAGE_VERSION

from loopy.transform.iname import (
set_loop_priority, prioritize_loops, untag_inames,
set_loop_priority, prioritize_loops, constrain_loop_nesting,
untag_inames,
split_iname, chunk_iname, join_inames, tag_inames, duplicate_inames,
rename_iname, remove_unused_inames,
split_reduction_inward, split_reduction_outward,
Expand Down Expand Up @@ -197,7 +198,8 @@

# {{{ transforms

"set_loop_priority", "prioritize_loops", "untag_inames",
"set_loop_priority", "prioritize_loops", "constrain_loop_nesting",
"untag_inames",
"split_iname", "chunk_iname", "join_inames", "tag_inames",
"duplicate_inames",
"rename_iname", "remove_unused_inames",
Expand Down
4 changes: 4 additions & 0 deletions loopy/kernel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class LoopKernel(ImmutableRecordWithoutPickling, Taggable):
.. automethod:: tagged
.. automethod:: without_tags
"""
# TODO document loop_nest_constraints attribute

# {{{ constructor

Expand All @@ -268,6 +269,7 @@ def __init__(self, domains, instructions, args=None,

iname_slab_increments=None,
loop_priority=frozenset(),
loop_nest_constraints=None,
silenced_warnings=None,

applied_iname_rewrites=None,
Expand Down Expand Up @@ -380,6 +382,7 @@ def __init__(self, domains, instructions, args=None,
assumptions=assumptions,
iname_slab_increments=iname_slab_increments,
loop_priority=loop_priority,
loop_nest_constraints=loop_nest_constraints,
silenced_warnings=silenced_warnings,
temporary_variables=temporary_variables,
local_sizes=local_sizes,
Expand Down Expand Up @@ -1543,6 +1546,7 @@ def __setstate__(self, state):
"substitutions",
"iname_slab_increments",
"loop_priority",
"loop_nest_constraints",
"silenced_warnings",
"options",
"state",
Expand Down
Loading