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

[Python Frontend] Regression on attribute replacement when used in LHS assigns #1842

Closed
FlorianDeconinck opened this issue Jan 3, 2025 · 0 comments · Fixed by #1843
Closed
Labels
bug Something isn't working frontend

Comments

@FlorianDeconinck
Copy link
Contributor

import numpy as np
import dace


@dace.program
def runtime(arr) -> None:
    arr.flat[:] += 1  # <--- Regression: left hand side assign fails
    return arr.flat[:]  # Right hand side still works


if __name__ == "__main__":
    arr = np.ones((3, 3))
    runtime(arr)
    assert (arr[:] == 2).all()

LHS of assign are failing at parsing times, probably in connetion with the struct work

  File "/home/fgdeconi/work/git/ndsl/external/dace/dace/sdfg/sdfg.py", line 56, in __getitem__
    result = result.members[token]
             ^^^^^^^^^^^^^^
AttributeError: 'Array' object has no attribute 'members'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants