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

[Flang][OpenMP] Add host_eval clause lowering support #180

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

skatrak
Copy link

@skatrak skatrak commented Oct 10, 2024

This patch updates Flang lowering and the do concurrent conversion pass to use the host_eval clause in omp.target operations to pass host information into the applicable clauses inside of the target region, instead of the previous approach where these clauses were attached to the omp.target operation itself.

The map info finalization pass is updated, because it previously didn't support the case where there are entry block arguments defined by other clauses placed before the map-like clauses being introduced by the pass.

The detection of when to evaluate outside of the target region is also improved for the target SPMD case in Flang lowering.

@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from e2ee789 to a9a83c9 Compare October 11, 2024 13:11
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from 03cc419 to 144635d Compare October 11, 2024 13:11
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from a9a83c9 to 332c9c5 Compare October 22, 2024 15:47
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from 144635d to f1120d0 Compare October 22, 2024 15:47
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from 332c9c5 to 0443d95 Compare October 23, 2024 14:32
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch 2 times, most recently from a18fdc4 to b739c9c Compare October 25, 2024 14:49
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from 36f00b9 to 0e07eda Compare October 29, 2024 15:34
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from b739c9c to b669de6 Compare October 29, 2024 15:44
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from 0e07eda to a3727a0 Compare October 30, 2024 12:07
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from b669de6 to bc7a8e2 Compare October 30, 2024 12:32
@skatrak
Copy link
Author

skatrak commented Nov 4, 2024

Ping! Can someone take a look at this and let me know if we're ok with making the transition to the community-approved approach? This PR stack is currently in the way of upstreaming target SPMD support.

@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from a3727a0 to dec7a5e Compare November 5, 2024 13:34
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from bc7a8e2 to fab6db4 Compare November 5, 2024 13:34
Copy link

@ergawy ergawy left a comment

Choose a reason for hiding this comment

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

LGTM. Just a minor comment.

flang/lib/Lower/OpenMP/OpenMP.cpp Outdated Show resolved Hide resolved
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from fab6db4 to e29a641 Compare November 6, 2024 16:10
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-03-mlir-llvm branch from dec7a5e to 6e921c3 Compare November 7, 2024 10:52
Base automatically changed from users/skatrak/target-passthrough-03-mlir-llvm to amd-trunk-dev November 7, 2024 10:53
This patch updates Flang lowering to use the `host_eval` clause in `omp.target`
operations to pass host information into the applicable clauses inside of the
target region, instead of the previous approach where these clauses were
attached to the `omp.target` operation itself.
@skatrak skatrak force-pushed the users/skatrak/target-passthrough-04-flang branch from e29a641 to 5f080c6 Compare November 7, 2024 10:54
@skatrak skatrak merged commit 2fae4cc into amd-trunk-dev Nov 7, 2024
2 of 4 checks passed
@skatrak skatrak deleted the users/skatrak/target-passthrough-04-flang branch November 7, 2024 10:54
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