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

vendor affine loop parallelization from upstream in affine-cfg #429

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

Conversation

ftynse
Copy link
Collaborator

@ftynse ftynse commented Mar 4, 2025

This is a partially reduced copy of the affine-parallelize pass from upstream that doesn't limit the number of nested parallel loops and always handles reductions.

This is a partially reduced copy of the affine-parallelize pass from
upstream that doesn't limit the number of nested parallel loops and
always handles reductions.
@ftynse ftynse requested a review from wsmoses March 4, 2025 01:25
// The walker proceeds in pre-order to process the outer loops first
// and control the number of outer parallel loops.
std::vector<ParallelizationCandidate> parallelizableLoops;
op->walk<WalkOrder::PreOrder>([&](AffineForOp loop) {
Copy link
Member

Choose a reason for hiding this comment

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

we may want to run this before the affinecfg stuff [or ideally as a pattern], since the parallel fusion, and index rewrite is a pattern [otherwise run before parallelize]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's not initially written is a pattern, so I suspect it may mess up the internal state of the rewriter; let me see what I can do

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