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

[Codegen][GPU] Improve forall hoisting pattern for single trip loops #18418

Merged
merged 4 commits into from
Sep 7, 2024

Conversation

qedawkins
Copy link
Contributor

For single trip scf.forall loops the tensor.extract_slice on the output can be folded away, causing the forall loop hoisting pattern to fail. Single trip loops with processor ID mappings cannot be folded away because they can resolve to an scf.if. So this patch extends the loop hoisting pattern to support hoisting in the case of single trip loops where the tensor.extract_slice has been folded away.

For single trip scf.forall loops the `tensor.extract_slice` on the
output can be folded away, causing the forall loop hoisting pattern to
fail. Single trip loops with processor ID mappings cannot be folded away
because they can resolve to an `scf.if`. So this patch extends the loop
hoisting pattern to support hoisting in the case of single trip loops
where the `tensor.extract_slice` has been folded away.
@qedawkins qedawkins force-pushed the single_trip_hoisting branch from c52d852 to 7611c94 Compare September 7, 2024 17:00
@qedawkins qedawkins merged commit 6c9aad0 into iree-org:main Sep 7, 2024
37 checks passed
@qedawkins qedawkins deleted the single_trip_hoisting branch September 7, 2024 19:11
josemonsalve2 pushed a commit to josemonsalve2/iree that referenced this pull request Sep 14, 2024
…ree-org#18418)

For single trip scf.forall loops the `tensor.extract_slice` on the
output can be folded away, causing the forall loop hoisting pattern to
fail. Single trip loops with processor ID mappings cannot be folded away
because they can resolve to an `scf.if`. So this patch extends the loop
hoisting pattern to support hoisting in the case of single trip loops
where the `tensor.extract_slice` has been folded away.
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