Skip to content

[Flang][MLIR][OpenMP] Host-evaluation of omp.loop bounds #133908

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

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

skatrak
Copy link
Member

@skatrak skatrak commented Apr 1, 2025

This patch updates Flang lowering and kernel flags identification in MLIR so that loop bounds on target teams loop constructs are evaluated on the host, making the trip count available to the corresponding __tgt_target_kernel call emitted for the target region.

This is necessary in order to properly execute these constructs as target teams distribute parallel do.

This patch updates Flang lowering and kernel flags identification in MLIR so
that loop bounds on `target teams loop` constructs are evaluated on the host,
making the trip count available to the corresponding `__tgt_target_kernel` call
emitted for the target region.

This is necessary in order to properly execute these constructs as `target
teams distribute parallel do`.

Co-authored-by: Kareem Ergawy <kareem.ergawy@amd.com>
Copy link
Member

@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! Thanks.

@skatrak skatrak merged commit 18dd299 into llvm:main Apr 3, 2025
12 checks passed
@skatrak skatrak deleted the host-eval-loop branch April 3, 2025 14:06
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