Page MenuHomePhabricator

New implementation of OpenMP 5.0 detached tasks.
ClosedPublic

Authored by AndreyChurbanov on May 27 2019, 6:37 AM.

Details

Summary

Patch by Alex Duran.

It adds new task flag - detachable (bit 6, or 0x40) which can be set by compiler for a detached task;
new external entry omp_fulfill_event(), and new internal entry __kmpc_task_allow_completion_event().

Tests with samples of expected compiler codegen also provided, they use various timings of event notification versus task completion (before/after task completion, or before task start).

Diff Detail

Repository
rL LLVM

Event Timeline

This revision is now accepted and ready to land.Jun 18 2019, 1:19 PM

Are there any plans to add the code for the appropriate OMPT callbacks?

protze.joachim added inline comments.Jun 19 2019, 1:16 AM
runtime/test/tasking/kmp_detach_tasks_t1.c
73 ↗(On Diff #201520)

there is omp_my_sleep.h in runtime/tests/
please consider to use that instead

runtime/test/tasking/kmp_detach_tasks_t3.c
21 ↗(On Diff #201520)

Is there any reason not to include kmp.h for the definition of the structs?

I know, other tests also define them locally.

AndreyChurbanov marked 2 inline comments as done.

Addressed Joachim's comments.

runtime/test/tasking/kmp_detach_tasks_t3.c
21 ↗(On Diff #201520)

This is general position - make tests independent of the library sources. Presence of the built <binaries + public headers> should be enough to run tests.

Are there any plans to add the code for the appropriate OMPT callbacks?

Haven't thought of this yet. I'd actually appreciate somebody's help here. Who is more familiar with OMPT and with tasking events in particular, and with OMPT tests.

Closed by commit rL363799: New implementation of OpenMP 5.0 detached tasks. (authored by achurbanov, committed by ). · Explain WhyJun 19 2019, 6:20 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2019, 6:20 AM
hbae added a comment.Jun 19 2019, 6:54 AM

Joachim, do you have any specific OMPT callbacks in mind?
I don't think we have any callbacks to insert in the new code.