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

IndexError in memlet propagation #1481

Closed
edopao opened this issue Dec 13, 2023 · 1 comment
Closed

IndexError in memlet propagation #1481

edopao opened this issue Dec 13, 2023 · 1 comment
Assignees

Comments

@edopao
Copy link
Collaborator

edopao commented Dec 13, 2023

During integration of dace in icon4py, it was found that SDFG transformations fail in memlet propagation:

>       propagate_memlets_sdfg(sdfg)

tests/memlet_propagation_test.py:169: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dace/sdfg/propagation.py:1162: in propagate_memlets_sdfg
    propagate_memlets_state(sdfg, state)
dace/sdfg/propagation.py:1205: in propagate_memlets_state
    propagate_memlets_nested_sdfg(sdfg, state, node)
dace/sdfg/propagation.py:1084: in propagate_memlets_nested_sdfg
    border_memlet.src_subset[i] = fallback_subset[i]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Range (0:dim_X), key = 1

    def __getitem__(self, key):
>       return self.ranges.__getitem__(key)
E       IndexError: list index out of range

The type of SDFG causing this issue is reproduced in a test case in PR #1480, here is a picture:

image

PR #1480 is applying a workaround in dace/sdfg/propagation.py, to make the test pass. However, this does not seem to be the proper the solution. This code change is rather a placeholder to highlight where the issue originates.

@edopao edopao linked a pull request Dec 13, 2023 that will close this issue
@edopao edopao self-assigned this Dec 13, 2023
@edopao
Copy link
Collaborator Author

edopao commented Dec 18, 2023

Not an issue in memlet propagation, the problem was in the test SDFG. As pointed by @philip-paul-mueller, the memlet that performed the actual slicing was going from _out to _inp, i.e. in the wrong direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant