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

add_edge hangs when trying to form a loop #1558

Closed
tim0s opened this issue Apr 25, 2024 · 1 comment · Fixed by #1559
Closed

add_edge hangs when trying to form a loop #1558

tim0s opened this issue Apr 25, 2024 · 1 comment · Fixed by #1559

Comments

@tim0s
Copy link
Contributor

tim0s commented Apr 25, 2024

Describe the bug

In certain situations if the user attempts to construct an (incorrect) SDFG, state.add_edge(...) never returns.

To Reproduce

The following snippet demonstrates this

import dace

sdfg = dace.SDFG("foo")
state = sdfg.add_state()
sdfg.add_array("bla", shape=(10, ), dtype=dace.float32)
mentry_3, mexit_3 = state.add_map("map_3", dict(i="0:9"))
mentry_3.add_in_connector("IN_0")
mentry_3.add_out_connector("OUT_0")
state.add_edge(mentry_3, "OUT_0", mentry_3, "IN_0", dace.Memlet(data="bla", subset='0:9'))

Expected behavior

The function returns a value that indicates it was used erroneously or throws an exception in finite time.

Additional context

This was found while auto-generating edge-cases for dace usage in order to determine how DaCe handles them.

@tbennun
Copy link
Collaborator

tbennun commented Apr 25, 2024

Thanks, fixed in #1559.

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.

2 participants