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

gpu_persistent_fusion creates incorrect src edges in ArrayView AccessNodes #1549

Open
kylosus opened this issue Mar 18, 2024 · 1 comment
Open

Comments

@kylosus
Copy link
Contributor

kylosus commented Mar 18, 2024

Describe the bug
Applying gpu_persistent_fusion to some dace programs breaks during codegen if there are ArrayViews

To Reproduce
Steps to reproduce the behavior:

  1. Modify dace/transformation/subgraph/gpu_persistent_fusion.py to fix an issue with code -> code scalars (gpu_persistent_fusion.py.patch.txt)
  2. Run attached dace program (modified from tests/npbench/polybench/correlation.py, correlation_test.py.patch.txt)

Relevant stack trace

...
  File "../dace-master/dace/codegen/targets/cpu.py", line 209, in allocate_view
    self._dispatcher.dispatch_allocate(sdfg, dfg, state_id, viewed_dnode, viewed_dnode.desc(sdfg), global_stream,
AttributeError: 'NestedSDFG' object has no attribute 'desc'

(What I believe to be the) Relevant part of code

Expected behavior
ArrayView AccessNodes should be connected to AccessNodes, not the top-level nsdfg that persistent fusion creates.

Additional context
Several other tests under tests/npbench/polybench for the same reason, but need more changes to the rest of the library for gpu_persistent_fusion to apply.

Tested with latest dace master branch

Uploaded patches and sdfg as txt because GitHub won't let me upload anything else.

failing.sdfgz.txt

@tbennun
Copy link
Collaborator

tbennun commented Mar 20, 2024

@kylosus Thank you for reporting. View issue should be fixed in #1552 now.
It still won't apply persistent fusion correctly because of different dimensionalities of internal maps (correlation contains both 2D and 1D maps), but this is a separate issue.

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

No branches or pull requests

2 participants