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

Fixed a bug in the map fusion transformation. #1535

Closed

Conversation

philip-paul-mueller
Copy link
Collaborator

Essentially the bug happens because the transformation considers any array with one elements as scalar, including arrays such as (1, 1). This commit allows the scalar branch of the transformation to handle this kind of situation. Another solution would be to "promote" it to an array.

In addition this commit adds some test cases for these kind of events.

Essentially the bug happens because the transformation considers any array with one elements as scalar, including arrays such as `(1, 1)`.
This commit allows the scalar branch of the transformation to handle this kind of situation.
Another solution would be to "promote" it to an array.

In addition this commit adds some test cases for these kind of events.
@BenWeber42 BenWeber42 self-requested a review February 28, 2024 17:32
@BenWeber42
Copy link
Contributor

The test seems to pass on master. I think we should have a test that triggers the bug on master...

I looked a bit deeper into the transformation. I also think that it's better for the scalar branch to handle this case, because inside the map it's better to use a scalar transient instead of a transient array where all dimensions have size 1.

@BenWeber42
Copy link
Contributor

We briefly discussed this:

  • The scalar branch ist the better place to fix this (instead of array branch)
  • AlexNik confirmed that "0" is the correct subset for memlets from scalars

We are now looking into the assert (seems to highlight another bug) and whether the test triggers the bug (it triggers new code paths in the transformation, and, thus, increases code coverage, so is strictly an improvement).

@philip-paul-mueller
Copy link
Collaborator Author

As far as I can tell there is still a bug in the array branch.

@philip-paul-mueller
Copy link
Collaborator Author

Has been superseded by PR#1629

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