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

feat[dace][next]: Fixing strides in optimization #1782

Merged
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d9218b6
This are the changes Edoardo implemented to fix some issues in the op…
edopao Dec 17, 2024
9d7e722
First rework.
philip-paul-mueller Dec 18, 2024
1ddd6fe
Updated some commenst.
philip-paul-mueller Dec 18, 2024
95e0007
I want to ignore register, not only consider them.
philip-paul-mueller Dec 18, 2024
f1b7a3f
There was a missing `not` in the check.
philip-paul-mueller Dec 18, 2024
50ad620
Had to update the propagation, to also handle aliasing.
philip-paul-mueller Dec 18, 2024
983022c
In the function for looking for top level accesses the `only_transien…
philip-paul-mueller Dec 18, 2024
e7b1afb
Small reminder of the future.
philip-paul-mueller Dec 18, 2024
df7bd0c
Forgot to export the new SDFG stuff.
philip-paul-mueller Dec 18, 2024
363ab59
Had to update function for actuall renaming of the strides.
philip-paul-mueller Dec 18, 2024
9c19d32
Added a todo to the replacement function.
philip-paul-mueller Dec 18, 2024
9cad1f7
Added a first test to the propagation function.
philip-paul-mueller Dec 18, 2024
2700f53
Modified the function that performs the actuall modification of the s…
philip-paul-mueller Dec 19, 2024
a20d3c0
Updated some tes, but more are missing.
philip-paul-mueller Dec 19, 2024
b5ff462
Subset caching strikes again.
philip-paul-mueller Dec 19, 2024
d326d3b
It seems that the explicit handling of one dimensions is not working.
philip-paul-mueller Dec 19, 2024
252f348
The test must be moved bellow.
philip-paul-mueller Dec 19, 2024
49f8172
The symbol is also needed to be present in the nested SDFG.
philip-paul-mueller Dec 19, 2024
2d6dfc0
Fixed a bug in determining the free symbols that we need.
philip-paul-mueller Dec 19, 2024
6124c6d
Updated the propagation code for the symbols.
philip-paul-mueller Dec 19, 2024
45bcf97
Addressed Edoardo's changes.
philip-paul-mueller Dec 19, 2024
23b0baa
Updated how we get the type of symbols.
philip-paul-mueller Dec 19, 2024
ff05880
New restriction on the update of the symbol mapping.
philip-paul-mueller Dec 19, 2024
43ec33c
Updated the tests, now also made one that has tests for the symbol ma…
philip-paul-mueller Dec 19, 2024
d43153a
Fixed two bug in the stride propagation function.
philip-paul-mueller Dec 19, 2024
2e82bd5
Added a test that ensures that the dependent adding works.
philip-paul-mueller Dec 19, 2024
07e6a5c
Changed the default of `ignore_symbol_mapping` to `True`.
philip-paul-mueller Dec 19, 2024
4bf145b
Added Edoardo's comments.
philip-paul-mueller Dec 19, 2024
2b03bb4
Removed the creation of aliasing if symbol tables are ignored.
philip-paul-mueller Dec 20, 2024
40c225d
Added a test that shows that `ignore_symbol_mapping=False` does produ…
philip-paul-mueller Dec 20, 2024
419a386
Updated the description.
philip-paul-mueller Dec 20, 2024
cc9801b
Applied Edoardo's comment.
philip-paul-mueller Dec 20, 2024
360baae
Added a todo from Edoardo's suggestions.
philip-paul-mueller Dec 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
gt_simplify,
gt_substitute_compiletime_symbols,
)
from .strides import gt_change_transient_strides
from .strides import (
gt_change_transient_strides,
gt_map_strides_to_dst_nested_sdfg,
gt_map_strides_to_src_nested_sdfg,
gt_propagate_strides_from_access_node,
gt_propagate_strides_of,
)
from .util import gt_find_constant_arguments, gt_make_transients_persistent


Expand All @@ -59,6 +65,10 @@
"gt_gpu_transformation",
"gt_inline_nested_sdfg",
"gt_make_transients_persistent",
"gt_map_strides_to_dst_nested_sdfg",
"gt_map_strides_to_src_nested_sdfg",
"gt_propagate_strides_from_access_node",
"gt_propagate_strides_of",
"gt_reduce_distributed_buffering",
"gt_set_gpu_blocksize",
"gt_set_iteration_order",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def gt_gpu_transformation(

if try_removing_trivial_maps:
# In DaCe a Tasklet, outside of a Map, can not write into an _array_ that is on
# GPU. `sdfg.appyl_gpu_transformations()` will wrap such Tasklets in a Map. So
# GPU. `sdfg.apply_gpu_transformations()` will wrap such Tasklets in a Map. So
# we might end up with lots of these trivial Maps, each requiring a separate
# kernel launch. To prevent this we will combine these trivial maps, if
# possible, with their downstream maps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ def _perform_pointwise_test(

def apply(
self,
graph: dace.SDFGState | dace.SDFG,
graph: dace.SDFGState,
sdfg: dace.SDFG,
) -> None:
# Removal
Expand All @@ -971,6 +971,9 @@ def apply(
tmp_out_subset = dace_subsets.Range.from_array(tmp_desc)
assert glob_in_subset is not None

# Recursively visit the nested SDFGs for mapping of strides from inner to outer array
gtx_transformations.gt_map_strides_to_src_nested_sdfg(sdfg, graph, map_to_tmp_edge, glob_ac)

# We now remove the `tmp` node, and create a new connection between
# the global node and the map exit.
new_map_to_glob_edge = graph.add_edge(
Expand Down
Loading
Loading