Skip to content

Cartoon dependency graph from new deps for linearization #338

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f69cae9
create convert_set_back_to_map()
jdsteve2 Apr 24, 2021
94c374e
create dependency.py; create function filter_deps_by_intersection_wit…
jdsteve2 Apr 24, 2021
2ed669d
fix flake8 issue
jdsteve2 Apr 24, 2021
196e17e
(WIP) start working on cartoon dag creation
jdsteve2 Apr 24, 2021
fd754fa
fix minor bugs
jdsteve2 Apr 24, 2021
239b673
add test_filtering_deps_by_same()
jdsteve2 Apr 24, 2021
d3c1adc
reverse order of cartoon graph dict so it maps depender->dependee
jdsteve2 Apr 24, 2021
57dc139
create new kernel option use_dependencies_v2
jdsteve2 Apr 24, 2021
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
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
f8f5fa6
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Apr 26, 2021
ff32877
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Apr 27, 2021
7a72833
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 9, 2021
02a5a3e
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
723c2c1
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 17, 2021
564def9
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
41bc22b
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 23, 2021
c4976d1
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 23, 2021
9a53a45
Merge branch 'cartoon-dependency-graph-from-new-deps-for-linearizatio…
jdsteve2 May 24, 2021
5bd805f
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 May 27, 2021
8ca3f8f
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 1, 2021
f2e93a6
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 2, 2021
6c093aa
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 2, 2021
3f7f7a9
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 2, 2021
fd464cd
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 6, 2021
92f4fb8
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 10, 2021
bde5faf
(temporary fix) if using v2-deps for linearization, don't error in ap…
jdsteve2 Jun 10, 2021
4ee91b6
Merge branch 'update-dependencies-during-transformation' into cartoon…
jdsteve2 Jun 10, 2021
de7225d
(temporary fix) if using v2-deps for linearization, don't error in ap…
jdsteve2 Jun 10, 2021
45e1e24
Merge branch 'update-dependencies-during-transformation' into cartoon…
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
708f578
fix merge conflicts
jdsteve2 Jul 26, 2021
47ab67a
pass kernel['loopy_kernel'] to filter_deps_by_intersection_with_SAME()
jdsteve2 Jul 26, 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
23 changes: 21 additions & 2 deletions loopy/kernel/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ class InstructionBase(ImmutableRecord, Taggable):

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 @@ -253,6 +254,9 @@ def __init__(self, id, depends_on, depends_on_is_final,

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 @@ -311,6 +315,7 @@ def __init__(self, id, depends_on, depends_on_is_final,
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 @@ -408,6 +413,9 @@ def get_str_options(self):
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 @@ -478,6 +486,7 @@ def __setstate__(self, val):
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 @@ -905,6 +914,7 @@ def __init__(self,
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 @@ -922,6 +932,7 @@ def __init__(self,
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 @@ -1058,6 +1069,7 @@ def __init__(self,
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 @@ -1072,6 +1084,7 @@ def __init__(self,
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 @@ -1356,6 +1369,7 @@ def __init__(self,
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 @@ -1379,6 +1393,7 @@ def __init__(self,
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,
Expand Down Expand Up @@ -1530,7 +1545,8 @@ def __init__(
id=None,
depends_on=None,
depends_on_is_final=None,
dependencies=None,
dependencies=None, # TODO
non_linearizing_deps=None,
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
Expand All @@ -1544,6 +1560,7 @@ def __init__(
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 @@ -1598,7 +1615,8 @@ def __init__(
id,
depends_on=None,
depends_on_is_final=None,
dependencies=None,
dependencies=None, # TODO
non_linearizing_deps=None,
groups=None,
conflicts_with_groups=None,
no_sync_with=None,
Expand All @@ -1618,6 +1636,7 @@ def __init__(
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