Error in Simplification Pipeline
Uploading failing_sdfg.json…
I have an SDFG that fails with the following error ValueError: Dimension mismatch in composition: Subset composed must be either completely stripped of all non-data dimensions or be not stripped of latter at all. and gives me the following stack:
compose, subsets.py:685
compose_and_push_back, redundant_array.py:147
apply, redundant_array.py:958
remove_redundant_copies, array_elimination.py:207
apply_pass, array_elimination.py:75
apply_subpass, simplify.py:85
apply_pass, pass_pipeline.py:502
apply_pass, pass_pipeline.py:547
apply_pass, simplify.py:113
simplify, sdfg.py:2345
I did not use a frontend but build it through the API using my Jax to SDFG translator. If I disable all optimizations (simplify and auto_ops) then the SDFG passes all tests.
Some context, the original code had a lot of numpy.squeeze() and numpy.expand_dims() class, which are translated into Memlets, for example w[:, 0, :] -> u[:, :].
I then switched to mapped Tasklets of the form __out = __in, which is quite stupid.
However, this switch was able to fix, or rather avoid, the issue.
Since I had no problems using these operations I think that the problem is that there are several such Memlets after each other.
Thanks for the bug report. I currently cannot prioritize this. I will try to get to it at a later stage.