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

Support buffer reuse between ForOp and IfOp #23

Open
wants to merge 1 commit into
base: ws
Choose a base branch
from

Conversation

manman-ren
Copy link
Contributor

This handles the case of reuse between parallel IfOp and ForOp. Prior to this, we only allow buffer reuse across parallel ForOps.

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 16, 2025
@manman-ren manman-ren requested a review from htyu January 16, 2025 03:02
SmallVector<scf::ForOp> orderedForOps;
SmallVector<Operation *> innerForOps;
// ForOp_A
// --> --> opsWithBufferReuse: ForOp_A
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reuse in case 3?

maxDepth > 0) {
// Persistent with a single inner loop. There is no sharing group, but
// we can use the logic to generate accumLoopCount for persistent case.
opsWithBufferReuse = opsAtMaxDepth;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this fixing a bug with variant inner loop trip count?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants