Skip to content

[NFC][OpenMP][Flang] Add test for OpenMP target parallel do #77776

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

Conversation

DominikAdamski
Copy link
Contributor

Added test which proves that end-to-end compilation of omp target parallel do costruct is successful for Flang compiler.

Comment on lines +16 to +21
!$omp target parallel do map(from: x)
do i = 1, 100
x(i) = i
end do
!$omp end target parallel do
Copy link
Member

Choose a reason for hiding this comment

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

Since, AFAIU, offloading can silently fallback to the host, should we, in our offloading tests, always verify that offloading did indeed succeed somehow? I did this previously by taking device IDs and comparing them to make sure they are different. However, I am not sure this is the best approach.

Or do we not need to verify that at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Instead of modifying the code I based on libomptarget runtime logs (similar test case: https://github.com/llvm/llvm-project/blob/main/openmp/libomptarget/test/offloading/ompx_bare.c )

Added test which proves that end-to-end compilation of
omp target parallel do costruct is successful for Flang compiler.
@DominikAdamski DominikAdamski force-pushed the flang_omp_target_parallel_do_test branch from 8c63cf0 to 37d42b2 Compare January 18, 2024 12:09
@DominikAdamski DominikAdamski merged commit d87a53a into llvm:main Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants