Skip to content

Do Not Merge: Make CopyToMap in Codegen a Hard Error. #5

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

Conversation

philip-paul-mueller
Copy link

There are several things here at play.
In normal GT4Py, we have to adjust the order of the Map iteration space, this is an artifact of the data layout that we are using, otherwise the strides are not correctly used (memory coalescence), this is why in GT4Py we are doing this by manually.
There is however also a different problem, that leads to launch errors.
Thus, we turn this silent "promotion" of Memlets into Maps into an hard error.

Note:
This fix (which in one way should enter DaCe main anyway) will render the GPU mode of DaCe unusable, at least outside GT4Py.

This is a GT4Py hack, because the Map have the wrong order and in GT4Py we do this explicitly before.
This lead to bad code that will also refuse to launch for certain sizes.
@edopao
Copy link

edopao commented Jun 6, 2025

We could make this error configurable, as a config parameter of compiler.cuda (default ignore the error, for backward compatibility).

@philip-paul-mueller
Copy link
Author

As I said, this silent promotion is an error and spotting it is difficult, thus allowing it to pass is bad.

However, I agree that the proper way of merging that thing back to DaCe is most likely introducing this configuration parameter, but I do not have time to do that.

@philip-paul-mueller
Copy link
Author

This PR has been superseded by the PR#2033 in DaCe proper.

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 this pull request may close these issues.

2 participants