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

Fix yield conversion of scf.if/scf.for to emitc #401

Merged
merged 8 commits into from
Nov 22, 2024

Conversation

josel-amd
Copy link
Collaborator

No description provided.

@josel-amd josel-amd changed the title Fix yield conversion of scf.if/scf.for to emitc [WIP] Fix yield conversion of scf.if/scf.for to emitc Nov 20, 2024
@josel-amd josel-amd force-pushed the jose.fix_if_for_conversion branch from bdf9211 to ed7f19e Compare November 20, 2024 12:47
@josel-amd josel-amd requested a review from mgehre-amd November 20, 2024 14:51
@mgehre-amd
Copy link
Collaborator

Did you check the technique used in the FuncToEmitC conversion? Is that different/the same?

@josel-amd
Copy link
Collaborator Author

josel-amd commented Nov 21, 2024

Did you check the technique used in the FuncToEmitC conversion? Is that different/the same?

Yes. We're doing almost the same. The difference here is that the yield conversion that seems to be unique since, in this case, we need to convert an yield into an emitc.assign

More details: By doing almost the same I mean calling rewriter.convertRegionTypes(), calling the inlineRegionBefore function and not using the body given by the adaptor.

@josel-amd josel-amd changed the title [WIP] Fix yield conversion of scf.if/scf.for to emitc Fix yield conversion of scf.if/scf.for to emitc Nov 21, 2024
@josel-amd josel-amd force-pushed the jose.fix_if_for_conversion branch from a377365 to b3f9b8e Compare November 21, 2024 10:10
@josel-amd josel-amd force-pushed the jose.fix_if_for_conversion branch from b3f9b8e to bb66650 Compare November 21, 2024 10:10
Copy link
Collaborator

@mgehre-amd mgehre-amd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@josel-amd josel-amd merged commit 7326995 into feature/fused-ops Nov 22, 2024
4 checks passed
@josel-amd josel-amd deleted the jose.fix_if_for_conversion branch November 22, 2024 08:53
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.

3 participants