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

(draft PR for comparison only) Compare old loop nest constraint branch to new branch #471

Draft
wants to merge 661 commits into
base: handle-new-loop-nest-constraints-during-transformation
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
661 commits
Select commit Hold shift + click to select a range
111419a
use new dependencies to create cartoon dep graph for linearization
jdsteve2 Apr 24, 2021
926ae65
test use of cartoon dep graph inside find_loop_insn_dep_map() with ne…
jdsteve2 Apr 24, 2021
c689a9d
enable usage of cartoon dependency graph for statement ordering decis…
jdsteve2 Apr 25, 2021
ac5dc08
rename cartoon_depends_on_dict->simplified_depends_on_graph
jdsteve2 Apr 25, 2021
3d808f1
test usage of cartoon dependency graph for statement ordering decisio…
jdsteve2 Apr 25, 2021
39fe705
reduce duplicated code in tests by adding _process_and_linearize(knl)…
jdsteve2 Apr 25, 2021
28a01b4
fix merge conflicts
jdsteve2 Apr 25, 2021
1615991
reduce duplicated code in tests by using _process_and_linearize(knl) …
jdsteve2 Apr 25, 2021
fd762db
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Apr 25, 2021
e666195
fixing merge conflicts
jdsteve2 Apr 25, 2021
96663b0
fix merge conflicts
jdsteve2 Apr 25, 2021
1d12fc0
reduce duplicated code in tests by using _process_and_linearize(knl) …
jdsteve2 Apr 25, 2021
ffd0610
in every remaining point during linearization where dependencies are …
jdsteve2 Apr 25, 2021
bc23d84
update comment
jdsteve2 Apr 25, 2021
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
2ac6415
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 Apr 26, 2021
a786baf
Merge branch 'main' into statement-instance-order-and-lex-order-map
jdsteve2 Apr 26, 2021
9a5592c
Merge branch 'new-dependency-and-nest-constraint-semantics-developmen…
jdsteve2 Apr 26, 2021
1109b1a
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Apr 26, 2021
796f01e
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Apr 26, 2021
a631be0
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Apr 26, 2021
f8f5fa6
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
6ffc457
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 Apr 27, 2021
e487d89
Merge branch 'new-dependency-and-nest-constraint-semantics-developmen…
jdsteve2 Apr 27, 2021
520d1ac
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Apr 27, 2021
b71e675
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Apr 27, 2021
f0ef771
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Apr 27, 2021
ff32877
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
ff48253
fix bug in map_domain where we attempt to return the same kernel if n…
jdsteve2 May 6, 2021
5e16382
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 May 9, 2021
7a72833
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 9, 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
502e155
add find_and_rename_dim()
jdsteve2 May 17, 2021
003eed1
in map_domain, deal with situation where transform map doesn't includ…
jdsteve2 May 17, 2021
5138b16
test map_domain with situation where transform map doesn't include al…
jdsteve2 May 17, 2021
7c54699
Merge branch 'add-map-domain-transformation' of http://github.com/ind…
jdsteve2 May 17, 2021
5775ee5
fixing merge conflicts
jdsteve2 May 17, 2021
02a5a3e
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 17, 2021
a026a5e
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
87ca4fd
when checking the overlap condition in map_domain, use the actual set…
jdsteve2 May 17, 2021
fc9d92f
remove duplicate function def
jdsteve2 May 17, 2021
8afd447
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 17, 2021
46580b5
in map_domain, ignore statement var name in maps when performing inam…
jdsteve2 May 17, 2021
25cea94
in map_domain, ignore statement var name in maps when performing inam…
jdsteve2 May 17, 2021
723c2c1
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 17, 2021
f84ce62
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
2d0d346
add move_dim_to_index()
jdsteve2 May 17, 2021
0a3e32e
in map_domain() handle dependencies correctly when the transform map …
jdsteve2 May 17, 2021
71881c8
test to make sure map_domain handles dependencies correctly when the …
jdsteve2 May 17, 2021
fbc8952
be consistent with dt vs dim_type naming: set dt = isl.dim_type, and …
jdsteve2 May 17, 2021
d83a87d
fix flake8 issue
jdsteve2 May 17, 2021
564def9
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 17, 2021
68c93a4
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
53abcd9
Merge branch 'update-dependencies-during-transformation' of github.co…
jdsteve2 May 17, 2021
d4ea3af
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 17, 2021
ae31880
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
74d54c4
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 May 23, 2021
b9bc817
Merge branch 'new-dependency-and-nest-constraint-semantics-developmen…
jdsteve2 May 23, 2021
9c8901b
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 May 23, 2021
48b4dfb
make helper function for dep creation that adds marks and inserts sta…
jdsteve2 May 23, 2021
36793bd
use make_dep_map() instead of _isl_map_with_marked_dims (still need t…
jdsteve2 May 23, 2021
572a8c6
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 May 23, 2021
a3809e1
Merge branch 'main' into update-dependencies-during-transformation
jdsteve2 May 23, 2021
41bc22b
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 23, 2021
57ca4ca
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 23, 2021
92ec240
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 May 23, 2021
c4976d1
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 23, 2021
050fac5
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 23, 2021
34d373e
Merge branch 'update-dependencies-during-transformation' of https://g…
jdsteve2 May 24, 2021
9a53a45
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 24, 2021
ec3185d
allow dep checking to work if lin_items is not provided
jdsteve2 May 27, 2021
f17f282
make sure dep checking works even when linearization items are not pr…
jdsteve2 May 27, 2021
00f604d
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 May 27, 2021
4d3ead5
fix merge conflicts (remove statements calling find_unsatisfied_deps …
jdsteve2 May 27, 2021
2217335
make sure dep checking works even when find_unsatisfied_deps doesn't …
jdsteve2 May 27, 2021
5bd805f
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 27, 2021
092c8ae
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 27, 2021
1b52640
remove debugging assertion
jdsteve2 Jun 1, 2021
8ca3f8f
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 1, 2021
60ee0c6
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 1, 2021
dbc8858
handle case where subst definition is removed, was both a depender an…
jdsteve2 Jun 2, 2021
7075f7e
test dep handling during assignment_to_subst in case where subst defi…
jdsteve2 Jun 2, 2021
1700007
remove old code
jdsteve2 Jun 2, 2021
f2e93a6
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 2, 2021
24da42c
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 2, 2021
7b58c4f
add option to find_and_rename_dim to assert that old_name exists
jdsteve2 Jun 2, 2021
0e1b09c
update dependencies in rename_iname()
jdsteve2 Jun 2, 2021
b38681c
test updating of dependencies during rename_iname()
jdsteve2 Jun 2, 2021
6c093aa
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 2, 2021
3cf39be
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 2, 2021
77bed8f
add TODO
jdsteve2 Jun 2, 2021
493c8e8
make make_dep_map smart enough to get relevant iname domains from ker…
jdsteve2 Jun 2, 2021
d7e9342
some initial tests for make_dep_map
jdsteve2 Jun 2, 2021
e59fe5f
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jun 2, 2021
89e597b
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Jun 2, 2021
482341f
deal with case where someone gives us a StackMatch when mapping depen…
jdsteve2 Jun 2, 2021
f4d5a1a
fix typo
jdsteve2 Jun 2, 2021
3e498fa
make test_rename_inames_with_dependencies() actually test the case wh…
jdsteve2 Jun 2, 2021
3f7f7a9
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
637b931
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 Jun 6, 2021
9edf007
Merge branch 'new-dependency-and-nest-constraint-semantics-developmen…
jdsteve2 Jun 6, 2021
83e35d3
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Jun 6, 2021
fb4c43d
fix make_dep_map so it handles automatic domain creation correctly wh…
jdsteve2 Jun 6, 2021
473116c
add dedicated test for make_dep_map
jdsteve2 Jun 6, 2021
fc38556
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jun 6, 2021
6e37fda
fix merge conflicts
jdsteve2 Jun 6, 2021
fd464cd
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 6, 2021
b15d130
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 6, 2021
871ccae
don't check deps on/by barriers at the moment
jdsteve2 Jun 10, 2021
4631f51
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jun 10, 2021
1fca3ad
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Jun 10, 2021
9854411
add v2 deps to barriers (still need to add deps on barriers)
jdsteve2 Jun 10, 2021
92f4fb8
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 10, 2021
4b32150
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
bde5faf
(temporary fix) if using v2-deps for linearization, don't error in ap…
jdsteve2 Jun 10, 2021
f47c836
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
a8ec66d
set obj_bigger_ok=True when aligning inames domain with dep in make_d…
jdsteve2 Jun 10, 2021
fc626a1
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jun 10, 2021
03623f4
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Jun 10, 2021
4ee91b6
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 10, 2021
7dbd9d0
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
de7225d
(temporary fix) if using v2-deps for linearization, don't error in ap…
jdsteve2 Jun 10, 2021
445c5a8
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 10, 2021
0f09b36
first attempt at handling dependencies during prefetch
jdsteve2 Jun 11, 2021
2f7c6bf
fix a couple bugs in precompute dep handling
jdsteve2 Jun 11, 2021
e307445
test dep handling in add_prefetch
jdsteve2 Jun 11, 2021
45e1e24
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 11, 2021
c3047fe
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 Jun 11, 2021
236d24a
(temporariliy) add non_linearizing_deps attribute to instruction (set…
jdsteve2 Jun 15, 2021
2fe181f
when intersecting with SAME, ignore dependees in stmt.non_linearizing…
jdsteve2 Jun 15, 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
0378482
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 Jul 14, 2021
20525df
(callables update) call get_one_linearized_kernel on program[knl]
jdsteve2 Jul 14, 2021
bec6dca
change default arg from set to frozenset
jdsteve2 Jul 14, 2021
b98a8de
(callables update) call get_one_linearized_kernel on program[knl] in …
jdsteve2 Jul 14, 2021
4c34565
fix merge conflicts after callables update
jdsteve2 Jul 14, 2021
0680d4d
change empty list default args to empty tuples
jdsteve2 Jul 14, 2021
5855676
rename IndexTag->InameTag
jdsteve2 Jul 14, 2021
71c93b1
fix merge conflicts
jdsteve2 Jul 15, 2021
31718ae
after callables update, use knl[loopy_kernel] where needed
jdsteve2 Jul 15, 2021
150576a
use @for_each_kernel with add_dependency_v2
jdsteve2 Jul 15, 2021
e55048c
handle dependencies on barrier stmts by assigning them a lex point
jdsteve2 Jul 15, 2021
f91338d
test pairwise SIOs where one of the statements is a barrier
jdsteve2 Jul 15, 2021
814607a
fix doc indentation
jdsteve2 Jul 17, 2021
f099b8f
Update loopy/schedule/checker/schedule.py
jdsteve2 Jul 17, 2021
b559208
Merge branch 'statement-instance-order-and-lex-order-map' of https://…
jdsteve2 Jul 17, 2021
7d34906
Update loopy/schedule/checker/__init__.py
jdsteve2 Jul 17, 2021
f86caff
Merge branch 'statement-instance-order-and-lex-order-map' of https://…
jdsteve2 Jul 17, 2021
4092ae6
revise docstring for StatementOrdering
jdsteve2 Jul 17, 2021
4196adb
promote StatementOrdering to top-level dataclass
jdsteve2 Jul 18, 2021
4e847a5
add dataclass to install_requires in setup.py
jdsteve2 Jul 18, 2021
9ecd66d
fix docstring indentation
jdsteve2 Jul 18, 2021
7c4785a
reorg and improve docstrings about SIOs a bit
jdsteve2 Jul 18, 2021
7614ab8
consistent naming of funcs
jdsteve2 Jul 18, 2021
9963c9b
docstring grammar typo
jdsteve2 Jul 18, 2021
9668335
fix typo in setup.py
jdsteve2 Jul 19, 2021
74b3f4b
rename islvars->var_name_to_pwaff
jdsteve2 Jul 19, 2021
2ef1816
add foldmethod=maker line for vim
jdsteve2 Jul 19, 2021
0e8be5b
clarify comment
jdsteve2 Jul 19, 2021
39a8429
fixing merge conflict
jdsteve2 Jul 19, 2021
d4623c6
promote _gather_blex_ordering_info() to top level (step 1, temporaril…
jdsteve2 Jul 19, 2021
d46cf80
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Jul 19, 2021
6fab4bc
remove sanity check and old version of _gather_blex_ordering_info() a…
jdsteve2 Jul 19, 2021
109d34f
eliminate _create_excluded_map_for_iname() since it is only called on…
jdsteve2 Jul 20, 2021
139fa2c
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Jul 20, 2021
aa2c475
eliminate _create_excluded_map_for_iname() since it is only called on…
jdsteve2 Jul 20, 2021
1d61ecf
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Jul 20, 2021
1ed5ee9
fix merge conflict
jdsteve2 Jul 21, 2021
7faa802
add for_each_kernel decorator to map_domain
jdsteve2 Jul 21, 2021
a5bdc98
after callables update, use knl[loopy_kernel] where needed
jdsteve2 Jul 21, 2021
dd7cbea
remove rename_after arg in map_domain, which is no longer necessary d…
jdsteve2 Jul 21, 2021
4052fb9
remove rename_after arg in map_domain, which is no longer necessary d…
jdsteve2 Jul 21, 2021
86bdb05
fix merge conflicts and issues resulting from kernel callables update
jdsteve2 Jul 21, 2021
dc634d3
disable new dep updating during precompute
jdsteve2 Jul 21, 2021
248f622
disable test for new dep updating during precompute
jdsteve2 Jul 21, 2021
3c5274a
remove unnessary kernel names
jdsteve2 Jul 21, 2021
1919499
eliminate no-longer-necessary rename_after arg in map_domain
jdsteve2 Jul 21, 2021
b2bcff7
Merge branch 'main' into new-dependency-and-nest-constraint-semantics…
jdsteve2 Jul 23, 2021
f353094
Merge branch 'new-dependency-and-nest-constraint-semantics-developmen…
jdsteve2 Jul 23, 2021
f0e90d1
Merge branch 'statement-instance-order-and-lex-order-map' into check-…
jdsteve2 Jul 23, 2021
c5172b9
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jul 26, 2021
d94cfa4
for some reason, I need to commit 'changes' to the submodule (but did…
jdsteve2 Jul 26, 2021
bd3e6aa
Merge branch 'check-new-dependencies-against-sio' into add-map-domain…
jdsteve2 Jul 26, 2021
2b78b9d
Merge branch 'add-map-domain-transformation' into update-dependencies…
jdsteve2 Jul 26, 2021
708f578
fix merge conflicts
jdsteve2 Jul 26, 2021
47ab67a
pass kernel['loopy_kernel'] to filter_deps_by_intersection_with_SAME()
jdsteve2 Jul 26, 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
2 changes: 2 additions & 0 deletions doc/ref_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ Tag Meaning
Identifiers
-----------

.. _reserved-identifiers:

Reserved Identifiers
^^^^^^^^^^^^^^^^^^^^

Expand Down
20 changes: 13 additions & 7 deletions loopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,20 @@
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,
affine_map_inames, find_unused_axis_tag,
make_reduction_inames_unique,
has_schedulable_iname_nesting, get_iname_duplication_options,
add_inames_to_insn, add_inames_for_unused_hw_axes)
add_inames_to_insn, add_inames_for_unused_hw_axes, map_domain)

from loopy.transform.instruction import (
find_instructions, map_instructions,
set_instruction_priority, add_dependency,
set_instruction_priority,
add_dependency, add_dependency_v2,
remove_instructions,
replace_instruction_ids,
tag_instructions,
Expand Down Expand Up @@ -129,6 +131,8 @@
from loopy.schedule import (
generate_loop_schedules, get_one_scheduled_kernel,
get_one_linearized_kernel, linearize)
from loopy.schedule.checker import (
find_unsatisfied_dependencies)
from loopy.statistics import (ToCountMap, ToCountPolynomialMap, CountGranularity,
stringify_stats_mapping, Op, MemAccess, get_op_map, get_mem_access_map,
get_synchronization_map, gather_access_footprints,
Expand Down Expand Up @@ -194,15 +198,16 @@

# {{{ 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",
"split_reduction_inward", "split_reduction_outward",
"affine_map_inames", "find_unused_axis_tag",
"make_reduction_inames_unique",
"has_schedulable_iname_nesting", "get_iname_duplication_options",
"add_inames_to_insn", "add_inames_for_unused_hw_axes",
"add_inames_to_insn", "add_inames_for_unused_hw_axes", "map_domain",

"add_prefetch", "change_arg_to_image",
"tag_array_axes", "tag_data_axes",
Expand All @@ -212,7 +217,8 @@
"rename_argument", "set_temporary_scope",

"find_instructions", "map_instructions",
"set_instruction_priority", "add_dependency",
"set_instruction_priority",
"add_dependency", "add_dependency_v2",
"remove_instructions",
"replace_instruction_ids",
"tag_instructions",
Expand Down Expand Up @@ -268,7 +274,7 @@
"generate_loop_schedules",
"get_one_scheduled_kernel", "get_one_linearized_kernel",
"linearize",

"find_unsatisfied_dependencies",
"GeneratedProgram", "CodeGenerationResult",
"PreambleInfo",
"generate_code", "generate_code_v2", "generate_body",
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
100 changes: 84 additions & 16 deletions loopy/kernel/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class UseStreamingStoreTag(Tag):
# {{{ instructions: base class

class InstructionBase(ImmutableRecord, Taggable):
"""A base class for all types of instruction that can occur in
r"""A base class for all types of instruction that can occur in
a kernel.

.. attribute:: id
Expand All @@ -87,7 +87,7 @@ class InstructionBase(ImmutableRecord, Taggable):

.. attribute:: depends_on

a :class:`frozenset` of :attr:`id` values of :class:`InstructionBase`
A :class:`frozenset` of :attr:`id` values of :class:`InstructionBase`
instances that *must* be executed before this one. Note that
:func:`loopy.preprocess_kernel` (usually invoked automatically)
augments this by adding dependencies on any writes to temporaries read
Expand All @@ -106,6 +106,15 @@ class InstructionBase(ImmutableRecord, Taggable):
:func:`loopy.make_kernel`. Note, that this is not meant as a user-facing
interface.

.. attribute:: dependencies

A :class:`dict` mapping :attr:`id` values of :class:`InstructionBase`
instances (each referring to a statement with statement instances that
must be executed before instances of this statement) to lists (one list
per key) of class:`islpy.Map`\ s mapping each instance of the dependee
statement to all instances of this statement that must occur later. Note
that this dict will eventually replace the `depends_on` attribute.

.. attribute:: depends_on_is_final

A :class:`bool` determining whether :attr:`depends_on` constitutes
Expand Down Expand Up @@ -212,6 +221,8 @@ class InstructionBase(ImmutableRecord, Taggable):
pymbolic_set_fields = {"predicates"}

def __init__(self, id, depends_on, depends_on_is_final,
dependencies,
non_linearizing_deps,
groups, conflicts_with_groups,
no_sync_with,
within_inames_is_final, within_inames,
Expand Down Expand Up @@ -241,6 +252,12 @@ def __init__(self, id, depends_on, depends_on_is_final,
if depends_on is None:
depends_on = frozenset()

if dependencies is None:
dependencies = {}
# TODO dependee ids for deps that don't affect cartoon dag
if non_linearizing_deps is None:
non_linearizing_deps = set()

if groups is None:
groups = frozenset()

Expand Down Expand Up @@ -297,6 +314,8 @@ def __init__(self, id, depends_on, depends_on_is_final,
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
no_sync_with=no_sync_with,
groups=groups, conflicts_with_groups=conflicts_with_groups,
within_inames_is_final=within_inames_is_final,
Expand Down Expand Up @@ -392,6 +411,11 @@ def get_str_options(self):

if self.depends_on:
result.append("dep="+":".join(self.depends_on))
if self.dependencies:
result.append("dependencies="+":".join(self.dependencies.keys()))
if self.non_linearizing_deps:
result.append(
"non_linearizing_deps="+":".join(self.non_linearizing_deps))
if self.no_sync_with:
result.append("nosync="+":".join(
"%s@%s" % entry for entry in self.no_sync_with))
Expand Down Expand Up @@ -461,6 +485,8 @@ def __setstate__(self, val):
if self.id is not None: # pylint:disable=access-member-before-definition
self.id = intern(self.id)
self.depends_on = intern_frozenset_of_ids(self.depends_on)
# TODO something with dependencies?
# TODO something with non_linearizing_deps?
self.groups = intern_frozenset_of_ids(self.groups)
self.conflicts_with_groups = (
intern_frozenset_of_ids(self.conflicts_with_groups))
Expand Down Expand Up @@ -887,6 +913,8 @@ def __init__(self,
id=None,
depends_on=None,
depends_on_is_final=None,
dependencies=None,
non_linearizing_deps=None, # TODO
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
Expand All @@ -903,6 +931,8 @@ def __init__(self,
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
Expand Down Expand Up @@ -1038,6 +1068,8 @@ def __init__(self,
id=None,
depends_on=None,
depends_on_is_final=None,
dependencies=None,
non_linearizing_deps=None, # TODO
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
Expand All @@ -1051,6 +1083,8 @@ def __init__(self,
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
Expand Down Expand Up @@ -1329,13 +1363,21 @@ class CInstruction(InstructionBase):

def __init__(self,
iname_exprs, code,
read_variables=frozenset(), assignees=tuple(),
id=None, depends_on=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
read_variables=frozenset(),
assignees=tuple(),
id=None,
depends_on=None,
depends_on_is_final=None,
dependencies=None,
non_linearizing_deps=None, # TODO
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
within_inames_is_final=None,
within_inames=None,
priority=0,
predicates=frozenset(), tags=None):
predicates=frozenset(),
tags=None):
"""
:arg iname_exprs: Like :attr:`iname_exprs`, but instead of tuples,
simple strings pepresenting inames are also allowed. A single
Expand All @@ -1350,11 +1392,14 @@ def __init__(self,
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
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,
priority=priority, predicates=predicates, tags=tags)
priority=priority, predicates=predicates,
tags=tags)

# {{{ normalize iname_exprs

Expand Down Expand Up @@ -1495,16 +1540,27 @@ class NoOpInstruction(_DataObliviousInstruction):
... nop
"""

def __init__(self, id=None, depends_on=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
def __init__(
self,
id=None,
depends_on=None,
depends_on_is_final=None,
dependencies=None, # TODO
non_linearizing_deps=None,
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
within_inames_is_final=None,
within_inames=None,
priority=None,
predicates=None, tags=None):
predicates=None,
tags=None):
super().__init__(
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
Expand Down Expand Up @@ -1554,12 +1610,22 @@ class BarrierInstruction(_DataObliviousInstruction):
fields = _DataObliviousInstruction.fields | {"synchronization_kind",
"mem_kind"}

def __init__(self, id, depends_on=None, depends_on_is_final=None,
groups=None, conflicts_with_groups=None,
def __init__(
self,
id,
depends_on=None,
depends_on_is_final=None,
dependencies=None, # TODO
non_linearizing_deps=None,
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
within_inames_is_final=None, within_inames=None,
within_inames_is_final=None,
within_inames=None,
priority=None,
predicates=None, tags=None, synchronization_kind="global",
predicates=None,
tags=None,
synchronization_kind="global",
mem_kind="local"):

if predicates:
Expand All @@ -1569,6 +1635,8 @@ def __init__(self, id, depends_on=None, depends_on_is_final=None,
id=id,
depends_on=depends_on,
depends_on_is_final=depends_on_is_final,
dependencies=dependencies,
non_linearizing_deps=non_linearizing_deps, # TODO
groups=groups,
conflicts_with_groups=conflicts_with_groups,
no_sync_with=no_sync_with,
Expand Down
1 change: 1 addition & 0 deletions loopy/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def __init__(
disable_global_barriers=kwargs.get("disable_global_barriers",
False),
check_dep_resolution=kwargs.get("check_dep_resolution", True),
use_dependencies_v2=kwargs.get("use_dependencies_v2", False),

enforce_variable_access_ordered=kwargs.get(
"enforce_variable_access_ordered", True),
Expand Down
Loading