Skip to content

[OpenMP][OMPT] Indicate loop schedule for worksharing-loop events #97429

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 3 commits into from
Jul 3, 2024

Conversation

jprotze
Copy link
Collaborator

@jprotze jprotze commented Jul 2, 2024

Use more specific values from ompt_work_t to allow the tool identify the schedule of a worksharing-loop. With this patch, the runtime will report the schedule chosen by the runtime rather than necessarily the schedule literally requested by the clause.
E.g., for guided + just one iteration per thread, the runtime would choose and report static.

Fixes issue #63904

Use more specific values from `ompt_work_t` to allow the tool identify the
schedule of a worksharing-loop. With this patch, the runtime will report the
schedule chosen by the runtime rather than necessarily the schedule literally
requested by the clause.
E.g., for guided + just one iteration per thread, the runtime would choose
static.

Fixes issue llvm#63904
@jprotze jprotze requested a review from hansangbae July 2, 2024 15:43
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label Jul 2, 2024
Copy link

github-actions bot commented Jul 2, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@Thyre
Copy link

Thyre commented Jul 2, 2024

Thanks a lot for the PR. I've looked through our internal OpenMP CI. No test reports loop_other. Begin and End events seem to match for the respective callbacks. Great!

@@ -130,6 +130,28 @@ inline const char *ompt_get_runtime_version() {
return &__kmp_version_lib_ver[KMP_VERSION_MAGIC_LEN];
}

inline ompt_work_t ompt_get_work_schedule(enum sched_type schedule){
printf("Schedule val: %i\n", schedule);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the printf statement if it is not intended?

Copy link
Contributor

@hansangbae hansangbae left a comment

Choose a reason for hiding this comment

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

LGTM

@jprotze jprotze merged commit a707d08 into llvm:main Jul 3, 2024
5 checks passed
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…vm#97429)

Use more specific values from `ompt_work_t` to allow the tool identify
the schedule of a worksharing-loop. With this patch, the runtime will
report the schedule chosen by the runtime rather than necessarily the
schedule literally requested by the clause.
E.g., for guided + just one iteration per thread, the runtime would
choose and report static.

Fixes issue llvm#63904
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…vm#97429)

Use more specific values from `ompt_work_t` to allow the tool identify
the schedule of a worksharing-loop. With this patch, the runtime will
report the schedule chosen by the runtime rather than necessarily the
schedule literally requested by the clause.
E.g., for guided + just one iteration per thread, the runtime would
choose and report static.

Fixes issue llvm#63904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants