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
dialects: Update support for returning multiple results using stencil.return #659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, does it solve @mesham's issue?
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
==========================================
+ Coverage 87.64% 88.53% +0.89%
==========================================
Files 106 103 -3
Lines 15446 14657 -789
Branches 2288 2182 -106
==========================================
- Hits 13538 12977 -561
+ Misses 1482 1270 -212
+ Partials 426 410 -16
... and 46 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Can we add test cases her? To actually demonstrate that @mesham's testcase works? |
Sure, I can do this. I just want to know his earlier test case which broke this in the first place. |
He might be busy. Maybe you can derive it from his comments (if he does not reply) without too much trouble? |
I am not able to easily reproduce it (atleast from the Python land). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep on hold until we have a test for this
bae1f68
to
73984db
Compare
bc617eb
to
62fc743
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, but looks sensible! Thanks!
We might just want to add a test for |
|
If I'm not mistaken, @mesham is having time off now, so I'll answer my understanding on that: @mesham had example code where having multiple returns would make sense, and tried to generate and lower them, as the API suggested it was possible. This was not implemented yet though (especially the lowering part) and the Meanwhile, he generated his code by splitting all stencils with multiple outputs in seperate stencils and got it working, so this PR shouldn't have any regression on that side. I just tested on the latest IR sample I got from Psyclone and it lowered just fine :) |
@georgebisbas here's a link to @mesham's original issue : https://xdsl.zulipchat.com/#narrow/stream/362011-xDSL/topic/stencil.20dialect/near/346783038. Your request for changes is blocking the merge, is it on purpose? |
Thanks, ideally in these, add some description to this PR, so that someone understands what happens. |
Can you please specify what is referred to as "lowering part" here?
Sure! I was not sure about the bug details and how to reproduce it at the time of this PR's creation (am still not very sure tbh, will trust @PapyChacal ). It was sort of an ad-hoc solution to see if we could solve the problem. Nevertheless, the original patch's merge was reverted and I am now changing this PR's purpose to "adding the multiple return support again". I updated the description to mention this. Let me know if I should change anything else. |
By "the lowering part", I mean lowering a stencil.return with multiple operands, to be able to lower a stencil.apply outputting multiple stencil.temp |
But, to sum it up, this PR:
Writing this I realize the new constructor could be made to work with single values too, so the PR is completely backward compatible. |
ok, added a link to this comment in the first post |
Can we merge this? |
Yes, I'm on it 🙂 |
I'm curious, is it a necessary/advisable requirement to merge main before letting this (or any other PR for that matter) in? I was under the impression that we are fine unless we observe merge conflicts, git should automatically take care of merging things properly unless there is a merge conflict? |
This PR intends to update the support for multiple stencil results. The earlier version produced some bugs when lowered via Psyclone, this patch should not face a similar problem. Here's a link to @mesham's original issue related to this.
edit @georgebisbas : Also check: #659 (comment)