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] PFT-based detection of target SPMD #144

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

skatrak
Copy link

@skatrak skatrak commented Aug 16, 2024

This patch improves the fix in #125 to detect target SPMD kernels during Flang lowering to MLIR. It transitions from a MLIR-based check to a PFT-based check, which is a more resilient alternative since the MLIR representation is in process of being built where it's being checked.

Copy link

@DominikAdamski DominikAdamski left a comment

Choose a reason for hiding this comment

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

LGTM.

One nit: could you add test:
!$omp target teams
!$omp distribute parallel do
do i = 1, 100
A(i) = i
end do
!$omp end distribute parallel do

!$omp distribute parallel do
do i = 1, 100
B(i) = i
end do
!$omp end distribute parallel do

!$omp end target teams

This patch improves the fix in llvm#125 to detect target SPMD kernels during Flang
lowering to MLIR. It transitions from a MLIR-based check to a PFT-based check,
which is a more resilient alternative since the MLIR representation is in
process of being built where it's being checked.
@skatrak skatrak merged commit 6f99163 into ROCm:amd-trunk-dev Aug 19, 2024
2 of 4 checks passed
@skatrak skatrak deleted the lower-spmd-check branch August 19, 2024 10:16
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