spcl / dace

DaCe - Data Centric Parallel Programming
http://dace.is/fast
BSD 3-Clause "New" or "Revised" License
487 stars 121 forks source link

Fixed `RedundantArray`'s handling of "reshaping" Memlets #1603

Closed philip-paul-mueller closed 2 months ago

philip-paul-mueller commented 2 months ago

This PR fixes an issue that was reported as issue 1595, that was traced back to RedundantArray.

The commit adds a deterministic test, unlike the one in the issue, that fails without the fix. The underlying problem is, that the transformation does not correctly handle a Memlet that performs a reshaping. This commit does not really solves the issue, instead it adds a special case for this particular case and then handles it correctly as I was unable to modify the code to handle it correctly. It is not a nice solution, but it works.

tbennun commented 2 months ago

@philip-paul-mueller please rename the title, this is unclear. Even "Fix for issue #1595" is a better name.

philip-paul-mueller commented 2 months ago

I like that idea.