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

New and Improved MapFusion #1629

Merged
merged 230 commits into from
Feb 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
aa433fe
Started with a first version of the map fusion stuff.
philip-paul-mueller Aug 22, 2024
71a88a1
Made some stylistic modification to teh code.
philip-paul-mueller Aug 23, 2024
bc87ddb
Added a function for estimating if something is pointwhise.
philip-paul-mueller Aug 23, 2024
497a2d6
Now there is an error in the actuall rewiering stuff.
philip-paul-mueller Aug 23, 2024
9e36447
Fixed a bug in the map fusion.
philip-paul-mueller Aug 23, 2024
7a48e0d
Made some formating changes.
philip-paul-mueller Aug 23, 2024
d609045
Updated the tests of the map fusion.
philip-paul-mueller Aug 23, 2024
52c4542
WIP: Started with a renamer function.
philip-paul-mueller Aug 23, 2024
3b758bf
Continued with the parallel fusion stuff.
philip-paul-mueller Aug 28, 2024
377b428
The fusion transformation now also checks if there is a write conflic…
philip-paul-mueller Aug 28, 2024
db4864b
Updated some tests.
philip-paul-mueller Aug 28, 2024
f395acd
Fixed an error. I shouild refactor that damn loop.
philip-paul-mueller Aug 28, 2024
b1ab95e
Some improvements to the tests.
philip-paul-mueller Aug 28, 2024
945ca8f
Removed some debugging stuff.
philip-paul-mueller Aug 29, 2024
940b9b6
Fixed some typing stuff.
philip-paul-mueller Aug 29, 2024
ecae361
Started with a better implementation for the data dependency test.
philip-paul-mueller Aug 29, 2024
64d07fd
First version of the pointwise checker in the map fusion.
philip-paul-mueller Aug 29, 2024
33a0edf
Updated some test cases.
philip-paul-mueller Aug 29, 2024
dbb989e
Changed how the `_find_subsets()` works in the dependency tests.
philip-paul-mueller Aug 29, 2024
e142881
Updated the map fusion's partitioning function.
philip-paul-mueller Aug 30, 2024
ff018f4
The shared data cache can not be dumped.
philip-paul-mueller Aug 30, 2024
ec6339a
Reworked how the serial fusion adjuists Memlets.
philip-paul-mueller Aug 30, 2024
9267ea9
Buffer tiling now finally works.
philip-paul-mueller Aug 30, 2024
fc2db8a
The Mapreduce now also works.
philip-paul-mueller Aug 30, 2024
4d9f11d
Added a test to the map fusion stuff that ensures that the shared blo…
philip-paul-mueller Aug 30, 2024
2b91465
Added a test for the indirect accesses case.
philip-paul-mueller Aug 30, 2024
73f4415
Updated the heat 3d test. It now ensures that the fusion is now done.
philip-paul-mueller Aug 30, 2024
94ecd19
Fixed an error in the parallel map fusion.
philip-paul-mueller Aug 30, 2024
3f3f8a3
Added a test for the parallel map fusion transformations.
philip-paul-mueller Aug 30, 2024
c23ed39
Fixed non proper cycle detection.
philip-paul-mueller Aug 30, 2024
dad61cb
Modified how the pre exit Memlet (the Memlet that writes in the new i…
philip-paul-mueller Sep 2, 2024
a57ebb3
Modified how the partition function works.
philip-paul-mueller Sep 2, 2024
439d6f3
Modified the map fusion tests.
philip-paul-mueller Sep 2, 2024
13c80ec
More towards bug compatibility.
philip-paul-mueller Sep 2, 2024
12a5cf7
The `ssa_sdfg` parameter was noit named properly.
philip-paul-mueller Sep 2, 2024
995ef4d
Auto optimize now uses map fusion with a strict dataflow.
philip-paul-mueller Sep 2, 2024
dc4ed31
Fixed the classification function for shared transient.
philip-paul-mueller Sep 2, 2024
eb48391
Ensure that we have one state in the fusion test.
philip-paul-mueller Sep 2, 2024
d53302d
Fixed a problem in the classification of the shared transients.
philip-paul-mueller Sep 2, 2024
3f54e1f
Updated the rw conflict code a little bit.
philip-paul-mueller Sep 2, 2024
0f46c1c
Updated the `SDFGState._read_and_write_set()` function.
philip-paul-mueller Sep 4, 2024
0585112
Extend the range of `strict_dataflow`.
philip-paul-mueller Sep 4, 2024
61160e4
Fixed a bug in the shared mode handling.
philip-paul-mueller Sep 4, 2024
584635a
Misc changes to the serial fusion.
philip-paul-mueller Sep 4, 2024
b2dea1d
Fixed a wrong test.
philip-paul-mueller Sep 4, 2024
fba6682
Removed the strange nested SDFG check.
philip-paul-mueller Sep 4, 2024
62b0288
Made some modifications to the map fusion stuff.
philip-paul-mueller Sep 4, 2024
8858021
Refined my fix in the `_read_and_write_set()` function.
philip-paul-mueller Sep 5, 2024
09deb95
Made some fixes to the _read_and_write_sets function.
philip-paul-mueller Sep 5, 2024
1e14f26
Updated the _read_and_write_sets() function.
philip-paul-mueller Sep 5, 2024
92c7097
Added a new test for the SDFG fusion.
philip-paul-mueller Sep 5, 2024
041b3da
Fixed how the interstate stuff works.
philip-paul-mueller Sep 5, 2024
5556bd3
Fixed an error.
philip-paul-mueller Sep 5, 2024
e3461c3
How did that thing even run.
philip-paul-mueller Sep 5, 2024
6f5edc5
Changed the default value of the `strict_dataflow` flag (the compabil…
philip-paul-mueller Sep 5, 2024
35a5426
Fixed the _read_and_write_sets().
philip-paul-mueller Sep 5, 2024
20b728e
Updated `_read_and_write_sets()`.
philip-paul-mueller Sep 5, 2024
5dd9c6b
Refined the test in the memlet extension of _read_and_write_sets.
philip-paul-mueller Sep 5, 2024
617fb8f
Now the `transformations/move_loop_into_map_test.py::MoveLoopIntoMapT…
philip-paul-mueller Sep 5, 2024
04cadbe
If there are no in edges, then we should not add it.
philip-paul-mueller Sep 5, 2024
d8b3547
Removed some stray view calls.
philip-paul-mueller Sep 5, 2024
8fed4fe
Updated some checks in the _read_and_write_sets function.
philip-paul-mueller Sep 6, 2024
567f459
Fixed the bug in `_read_and_write_sets()` that made `tests/numpy/ufun…
philip-paul-mueller Sep 6, 2024
9cad08d
Added a test to back my claims I did in `567f459e`.
philip-paul-mueller Sep 6, 2024
866d815
Added a new test for map fusion that tests indirect accesses.
philip-paul-mueller Sep 6, 2024
a5846b5
Reworked the serial map fusion and related files.
philip-paul-mueller Sep 6, 2024
7ccdd9c
Made a rename.
philip-paul-mueller Sep 6, 2024
d4041b7
Applied the formating.
philip-paul-mueller Sep 6, 2024
a444992
Merge branch 'master' into new-map-fusion
philip-paul-mueller Sep 9, 2024
a023f7c
Updated the comment about the wrong filter check in `SDFGState._read_…
philip-paul-mueller Sep 9, 2024
5c49eee
Removed the wrong check in `SDFGState._read_and_write_sets()`, see al…
philip-paul-mueller Sep 9, 2024
63e78c9
Had to reenable the check in `SDFGState._read_and_write_sets()` is di…
philip-paul-mueller Sep 9, 2024
896ac68
Modified the `shared_data` attribute of teh `MapFusionHelper`.
philip-paul-mueller Sep 11, 2024
33f9fdd
Merge remote-tracking branch 'spcl/master' into new-map-fusion
philip-paul-mueller Sep 11, 2024
fcffb22
This compute offset function seems to solve all my problems.
philip-paul-mueller Sep 12, 2024
0ddb3c2
Added a test for the special case.
philip-paul-mueller Sep 12, 2024
05ffee4
Did some cleanup.
philip-paul-mueller Sep 12, 2024
6de85c7
Merge remote-tracking branch 'spcl/master' into new-map-fusion
philip-paul-mueller Sep 12, 2024
8c86662
Specified how the corrector function of the offsets works.
philip-paul-mueller Sep 13, 2024
dfc92e7
Merge branch 'master' into new-map-fusion
philip-paul-mueller Sep 23, 2024
11a3167
UPdated some comments.
philip-paul-mueller Sep 26, 2024
44cf6ad
Added more comments.
philip-paul-mueller Sep 26, 2024
914d67b
Merge branch 'main' into new-map-fusion
philip-paul-mueller Oct 31, 2024
5e25816
Removed the parallel map fusion transformation.
philip-paul-mueller Nov 1, 2024
259d17c
Added a new test.
philip-paul-mueller Nov 1, 2024
db26320
Fixed a missing include.
philip-paul-mueller Nov 1, 2024
fa67492
Revert "Added a new test."
philip-paul-mueller Nov 1, 2024
3453c6c
It seems that I have removed a test.
philip-paul-mueller Nov 1, 2024
90731af
Realized that I can not use `SDFG.shared_transient()` for detection i…
philip-paul-mueller Nov 1, 2024
f659cd8
Removed teh specification of the intermediate.
philip-paul-mueller Nov 15, 2024
244e3ea
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Dec 3, 2024
11a509e
Updated the strict dataflow mode.
philip-paul-mueller Dec 3, 2024
724d1f5
No longer explicitly specify strict dataflow mode.
philip-paul-mueller Dec 3, 2024
10ae1e2
Fixed a typo that was introduced in commit e1daf32fc8.
philip-paul-mueller Dec 4, 2024
d909379
Forgot to make strict dataflow the default.
philip-paul-mueller Dec 4, 2024
cc7324b
Added a new check to the map fusion in case of shared intermediates.
philip-paul-mueller Dec 4, 2024
6429d91
Chacnged the test.
philip-paul-mueller Dec 4, 2024
3d1cd9e
Realiced that there is no problem with a data race.
philip-paul-mueller Dec 4, 2024
a412394
Added more tests to the map fusion.
philip-paul-mueller Dec 4, 2024
fa21bd3
Added a new test for the map fusion.
philip-paul-mueller Dec 5, 2024
6e13941
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Dec 5, 2024
d8da3c6
WIP: Started with implementing Phil's suggestions.
philip-paul-mueller Dec 13, 2024
e2285f0
Made some modification, time to save.
philip-paul-mueller Dec 16, 2024
4832c3c
Updated the map fusion test a little bit.
philip-paul-mueller Dec 16, 2024
fd3b48a
Added a test for the next generation of MapFusion.
philip-paul-mueller Dec 16, 2024
8fa7cb2
Added a new test.
philip-paul-mueller Dec 16, 2024
9139149
The test `test_fusion_with_nested_sdfg_0` is now explicitly construct…
philip-paul-mueller Dec 16, 2024
0a5aeaf
Allowed that consumer edge in MapFusion are dynamic.
philip-paul-mueller Dec 16, 2024
e2bc10d
Changed the doc string to the Sphinx one.
philip-paul-mueller Dec 16, 2024
aa3619f
Fixed some missing test.
philip-paul-mueller Dec 16, 2024
a740d16
Updated the description of the transformation.
philip-paul-mueller Dec 16, 2024
d07e2c5
Added a new test.
philip-paul-mueller Dec 16, 2024
fbc8469
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Dec 17, 2024
5c354c6
Fixed an iteration bug.
philip-paul-mueller Dec 17, 2024
abf739c
Fixed the problem in the heat test.
philip-paul-mueller Dec 17, 2024
2b17111
Added a new test.
philip-paul-mueller Dec 17, 2024
1e8f66f
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Dec 17, 2024
3ab46d8
Added a flag to MapFusion that allows to consider everything as shared.
philip-paul-mueller Dec 17, 2024
b1fc9d1
Updated how the memlet adjustment works, this should be a bit more li…
philip-paul-mueller Dec 17, 2024
fdc6424
Added a new test to check the memlet update.
philip-paul-mueller Dec 17, 2024
e2c41b5
Merge branch 'main' into new-map-fusion
phschaad Jan 13, 2025
bcaed23
Centralized the map fusion call in the testing.
philip-paul-mueller Jan 17, 2025
243611d
Added a test that ensures that no cycles would be created.
philip-paul-mueller Jan 17, 2025
c53f939
Found a case that was not handled.
philip-paul-mueller Jan 17, 2025
a3842f9
Added more tests to the map fusion and refined some others.
philip-paul-mueller Jan 17, 2025
85cc87d
Added an analysis pass that computes the exclusively used data.
philip-paul-mueller Jan 27, 2025
6c6a012
Fixed some wrong typing.
philip-paul-mueller Jan 27, 2025
041d535
Updated and clarified the working of the exclusive pass.
philip-paul-mueller Jan 27, 2025
2ad4b98
Added tests for the `FindExclusiveData` pass.
philip-paul-mueller Jan 27, 2025
d2d9f50
Fixed a bug.
philip-paul-mueller Jan 27, 2025
eddac68
Made the `MapFusion` transformation stateless.
philip-paul-mueller Jan 27, 2025
fc702af
Fixed a bug.
philip-paul-mueller Jan 27, 2025
cd14c67
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Jan 27, 2025
e2abfa7
Merge branch 'new-scan-path' into new-map-fusion
philip-paul-mueller Jan 27, 2025
59b35b4
Fir some reason `assume_always_shared` was not honored.
philip-paul-mueller Jan 28, 2025
1c6b661
Squashed commit of the following:
philip-paul-mueller Jan 28, 2025
e5bb165
Integrated a pass that performs map fusion as much as possible.
philip-paul-mueller Jan 28, 2025
1e9ee3f
Added a warning to `FullMapFusion` pass.
philip-paul-mueller Jan 28, 2025
0f5228b
`auto_optimizer()` now uses the new `FullMapFusion` transformation.
philip-paul-mueller Jan 28, 2025
1ece746
Found a way to work around the limitations of the `_pipeline_results`.
philip-paul-mueller Jan 29, 2025
ef4b64d
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Jan 29, 2025
a04963e
I got an error in the CI, but I do not get it localy. Let's try it ag…
philip-paul-mueller Jan 29, 2025
29c5e10
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Feb 3, 2025
b2dabf4
Let's hope tha this will get us the SDFG, such that we can locally de…
philip-paul-mueller Feb 3, 2025
b4f55e4
Netxt try, I have to find that out.
philip-paul-mueller Feb 3, 2025
20d64c2
Next try.
philip-paul-mueller Feb 3, 2025
48be4b3
Let's hope that this makes things a bit faster.
philip-paul-mueller Feb 3, 2025
1fac7ec
Maybe we have to do it this way, but now the other stuff passed.
philip-paul-mueller Feb 3, 2025
fbedda1
Let's hope that this works.
philip-paul-mueller Feb 3, 2025
674628d
Let's further restrict it.
philip-paul-mueller Feb 3, 2025
6fa3881
This is interesting it now does not fail, let's go back to the origin…
philip-paul-mueller Feb 3, 2025
374005c
Now it passes, let's restore the `common.py` file and run again.
philip-paul-mueller Feb 3, 2025
1f3a447
After they pass I have now restored the original workflow setting. Ho…
philip-paul-mueller Feb 4, 2025
62f2bbd
It now passes on the whole file, what happens if we go to the whole f…
philip-paul-mueller Feb 4, 2025
3548f1f
Let's see what happens if we run it again.
philip-paul-mueller Feb 4, 2025
61c5680
My findings it is time to go to main.
philip-paul-mueller Feb 4, 2025
54d11d1
Restoring everything to main.
philip-paul-mueller Feb 4, 2025
41e8612
Added a missing test in the scan function.
philip-paul-mueller Feb 4, 2025
4ea838f
What happens if we give it another name.
philip-paul-mueller Feb 4, 2025
bd31a9e
Let's go back to square one and restrict what we test.
philip-paul-mueller Feb 4, 2025
76cddac
Let's see what happens.
philip-paul-mueller Feb 4, 2025
7342628
Because we call the SDFG differently we do not have a closure, so we …
philip-paul-mueller Feb 4, 2025
6a47835
Let's remove these tests, just that I do not have to kill them all th…
philip-paul-mueller Feb 4, 2025
c849781
Now I switched back to the original calling stuff.
philip-paul-mueller Feb 4, 2025
4b40f26
Forgot to really reenable a test.
philip-paul-mueller Feb 4, 2025
bb8fa89
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Feb 4, 2025
cc34dfa
Reenable the other tests.
philip-paul-mueller Feb 4, 2025
edf571e
Revert "Reenable the other tests."
philip-paul-mueller Feb 4, 2025
e61968b
Reapply "Reenable the other tests."
philip-paul-mueller Feb 4, 2025
8fe0103
Now let's see what happens if we reenable all tests.
philip-paul-mueller Feb 4, 2025
9bb0e2d
Before we will enable every test manually, we will first revert the c…
philip-paul-mueller Feb 7, 2025
a8450af
Revert "Now let's see what happens if we reenable all tests."
philip-paul-mueller Feb 7, 2025
7db9040
Let's see if the base case still works.
philip-paul-mueller Feb 7, 2025
b585f69
This should now work as base case.
philip-paul-mueller Feb 7, 2025
02c654b
Try this.
philip-paul-mueller Feb 7, 2025
65dffe8
More disabeling, but the general tests pass now, so now lets start to…
philip-paul-mueller Feb 7, 2025
1359615
Let's try
philip-paul-mueller Feb 7, 2025
9f08bab
Disabled even more. in hetrogenious.
philip-paul-mueller Feb 11, 2025
1d04a1d
Let's enable more tests.
philip-paul-mueller Feb 11, 2025
9d94460
Revert "Before we will enable every test manually, we will first reve…
philip-paul-mueller Feb 11, 2025
cf882bf
Without it the CI will complain about some package `tests` it does no…
philip-paul-mueller Feb 11, 2025
f95e5a0
Why goat why?
philip-paul-mueller Feb 11, 2025
6316ed0
Still no error, let's go to the next level.
philip-paul-mueller Feb 11, 2025
6c389c6
For some reason I do not understand, I it fails, it has problems with…
philip-paul-mueller Feb 11, 2025
39c4621
Now let's restore the original configuration, what might happen next.
philip-paul-mueller Feb 11, 2025
eceb8fa
For some reason there is this strange problem, even after restoring t…
philip-paul-mueller Feb 11, 2025
f5321c2
Added some more tests.
philip-paul-mueller Feb 11, 2025
0f8ef8c
Revert "Now let's restore the original configuration, what might happ…
philip-paul-mueller Feb 11, 2025
e754a2a
It passes so we now have to add more tests.
philip-paul-mueller Feb 12, 2025
00823fd
Enable more tests, let's see what is happing.
philip-paul-mueller Feb 12, 2025
c94163e
More fun with indexing.
philip-paul-mueller Feb 12, 2025
3f6fd49
Next try.
philip-paul-mueller Feb 12, 2025
f929dab
These tetss fails for other reasons that I do not understand somethin…
philip-paul-mueller Feb 12, 2025
2f03f5d
This is strange.
philip-paul-mueller Feb 13, 2025
b38ba0b
Made the processing order of the map renaming more deterministic.
philip-paul-mueller Feb 13, 2025
6441c2a
Let's hope that the CI fails soon.
philip-paul-mueller Feb 13, 2025
f6973b2
Now the bug has reappeard.
philip-paul-mueller Feb 13, 2025
57a8a13
Why does the CI not start?
philip-paul-mueller Feb 13, 2025
3cdc750
Added everything back, just for mege.
philip-paul-mueller Feb 13, 2025
4bf37d1
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Feb 13, 2025
b45cf5b
Disabled again some tests.
philip-paul-mueller Feb 13, 2025
abe7051
Let's put everything back.
philip-paul-mueller Feb 13, 2025
662817e
Now the bug is back, but only for 3.13, 3.9 passes consistently.
philip-paul-mueller Feb 14, 2025
ed58523
I am closing in.
philip-paul-mueller Feb 14, 2025
47babf6
Even closer.
philip-paul-mueller Feb 14, 2025
fa1331a
Now we add the fortran tests.
philip-paul-mueller Feb 14, 2025
2ba2bff
Okay by adding the fortan tests it fails, see https://github.com/spcl…
philip-paul-mueller Feb 14, 2025
2ffeaaf
Nest step.
philip-paul-mueller Feb 14, 2025
37265ba
No luck.
philip-paul-mueller Feb 14, 2025
2563f72
Still no error.
philip-paul-mueller Feb 14, 2025
c95a966
What else let's try this.
philip-paul-mueller Feb 14, 2025
0a01a22
Adding these files makes it works.
philip-paul-mueller Feb 17, 2025
f1b920b
It has failed but in some random test `tests/library/fft_test.py::tes…
philip-paul-mueller Feb 17, 2025
bb77515
After running it again, it passes.
philip-paul-mueller Feb 17, 2025
0aadd02
After adding all stray `*.py` files it fails, see https://github.com/…
philip-paul-mueller Feb 17, 2025
2699fdb
With some random tests it still passes.
philip-paul-mueller Feb 17, 2025
7ca2328
The last pipeline passed, https://github.com/spcl/dace/pull/1629/comm…
philip-paul-mueller Feb 18, 2025
2da67b1
It is very interessting.
philip-paul-mueller Feb 19, 2025
87872be
Merge remote-tracking branch 'spcl/main' into new-map-fusion
philip-paul-mueller Feb 19, 2025
978fb67
Okay it still fails, https://github.com/spcl/dace/actions/runs/134067…
philip-paul-mueller Feb 19, 2025
c1d1a8c
Lets start again.
philip-paul-mueller Feb 19, 2025
b302089
What happens if I slightly change the thing.
philip-paul-mueller Feb 19, 2025
efc8e5c
I do not belive it, now it passes https://github.com/spcl/dace/pull/1…
philip-paul-mueller Feb 19, 2025
13fada7
This should restore all the state from main.
philip-paul-mueller Feb 19, 2025
4393975
Now made the name align.
philip-paul-mueller Feb 19, 2025
654615b
Let's do some experiment.
philip-paul-mueller Feb 19, 2025
4dc0ccf
As expected `test_sum()` has again failed https://github.com/spcl/dac…
philip-paul-mueller Feb 19, 2025
3467964
Let's try out the idea of forked.
philip-paul-mueller Feb 21, 2025
d6c0eac
The whole thing passed with `--forked`, https://github.com/spcl/dace/…
philip-paul-mueller Feb 21, 2025
10949e2
Merge branch 'main' into new-map-fusion
philip-paul-mueller Feb 24, 2025
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
Prev Previous commit
Next Next commit
Fixed the bug in _read_and_write_sets() that made `tests/numpy/ufun…
…c_support_test.py::test_ufunc_add_accumulate_simple` fail.

However, I am pretty sure that this is a compability bug.
The function essentially removes accesses from the read set if there is a matching access in the read set.
There is nothing wrong with that, however the original code only filtered that out when the data of the in- and output memlets refered to the same data.
However, this is wrong, because there is no guarantee that this holds as the memlet's data member must not coincide with the node under consideration, but can be another (that is connected).

But if thsi check is removed then `tests/numpy/ufunc_support_test.py::test_ufunc_add_accumulate_simple` will fail.
So I put it back.
philip-paul-mueller committed Sep 6, 2024
commit 567f459eea5adf3ee0d3c803880b2e1e4874b097
9 changes: 9 additions & 0 deletions dace/sdfg/state.py
Original file line number Diff line number Diff line change
@@ -791,6 +791,15 @@ def _read_and_write_sets(self) -> Tuple[Dict[AnyStr, List[Subset]], Dict[AnyStr,
# Filter out memlets which go out but the same data is written to the AccessNode by another memlet
for out_edge in list(out_edges):
for in_edge in in_edges:
if out_edge.data.data != in_edge.data.data:
# NOTE: This check does not make any sense, and is in my view wrong.
# If we consider a memlet between two access nodes, to which access
# node the `data` attribute of the memlet refers to is arbitrary and
# does not matter. However, the test will filter _some_ out but not
# all.
# This check is is retained for compatibility with `RefineNestedAccess`,
# see `tests/numpy/ufunc_support_test.py::test_ufunc_add_accumulate_simple`.
continue
if in_subsets[in_edge].covers(out_subsets[out_edge]):
out_edges.remove(out_edge)
break
19 changes: 1 addition & 18 deletions tests/transformations/move_loop_into_map_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import copy
from dace.transformation.interstate import MoveLoopIntoMap
import unittest
import numpy as np
@@ -171,24 +170,8 @@ def test_more_than_a_map(self):
body.add_nedge(aread, oread, dace.Memlet.from_array('A', aarr))
body.add_nedge(twrite, owrite, dace.Memlet.from_array('out', oarr))
sdfg.add_loop(None, body, None, '_', '0', '_ < 10', '_ + 1')

org_data = {
"A": np.random.rand(3, 3),
"B": np.random.rand(3, 3),
"out": np.random.rand(3, 3),
}

unopt_data = copy.deepcopy(org_data)
sdfg(**unopt_data)

count = sdfg.apply_transformations(MoveLoopIntoMap)
opt_data = copy.deepcopy(org_data)
sdfg(**opt_data)

for name in org_data.keys():
self.assertTrue(np.allclose(opt_data[name], unopt_data[name]))
self.assertTrue(count > 0)

self.assertFalse(count > 0)

def test_more_than_a_map_1(self):
"""