-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[OMPT] Work callback does not report schedule type for loops #63904
Labels
Comments
@llvm/issue-subscribers-openmp |
A trunk
The second line is not true, as the issue is still present in trunk. |
jprotze
added a commit
to jprotze/llvm-project
that referenced
this issue
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 static. Fixes issue llvm#63904
jprotze
added a commit
that referenced
this issue
Jul 3, 2024
…7429) 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
lravenclaw
pushed a commit
to lravenclaw/llvm-project
that referenced
this issue
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 issue
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
Description
The OpenMP tools interface offers a callback called
ompt_callback_work
. Here, the parameterwork_type
can be used to determine the type of work a thread is doing. There are several different values for loops, which can be used to get the schedule for the OpenMP loops.Right now, LLVM does not report any schedule type. Instead, the value
ompt_work_loop
is used for every schedule type.From what I was able to gather in the LLVM source code, only
ompt_work_loop
is set and no checks for the schedule type are done:llvm-project/openmp/runtime/src/kmp_dispatch.cpp
Line 1006 in 68f1391
llvm-project/openmp/runtime/src/kmp_sched.cpp
Line 116 in fd2de54
llvm-project/openmp/runtime/src/kmp_csupport.cpp
Line 1922 in fd2de54
The test heaader also includes a TODO to handle the schedule types:
llvm-project/openmp/runtime/test/ompt/callback.h
Line 835 in fd2de54
Reproducer
You can compile and run the code down below to reproduce the issue. The program will exit with an assertion error because no schedule type was reported.
Source code:
The text was updated successfully, but these errors were encountered: