Skip to content

Commit

Permalink
Fixed a bug.
Browse files Browse the repository at this point in the history
The problem was that with the new hirarchical structure, the previous version does not work.
It generates an error that some state, the one inside the loop region is not known.
I have no idea why it does not work, but I accept it.

This caused that some fusions did not happen.
What was interessting that then the composite fusion generated a wrong SDFG.
I am not sure what the problem is exactly.

But again `match_exception` was my friend.
It should be the default anyway.
  • Loading branch information
philip-paul-mueller committed Jan 27, 2025
1 parent eddac68 commit fc702af
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dace/transformation/dataflow/map_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def can_be_applied(
_, exclusive_outputs, shared_outputs = output_partition
if not (exclusive_outputs or shared_outputs):
return False

return True


Expand Down Expand Up @@ -1451,11 +1452,11 @@ def _scan_sdfg_if_data_is_shared(
# as `data`. Thus `data` is shared.
return True

# Test if the data is referenced in the interstate edges, that leave this state.
for edge in sdfg.out_edges(state):
if data_name in edge.data.free_symbols:
# The data is used in the inter state edges. So it is shared.
return True
# Test if the data is referenced in the interstate edges.
for edge in sdfg.edges():
if data_name in edge.data.free_symbols:
# The data is used in the inter state edges. So it is shared.
return True

# The `data` is not used anywhere else, thus `data` is not shared.
return False
Expand Down

0 comments on commit fc702af

Please sign in to comment.