Page MenuHomePhabricator

[OpenMP][Tools] Fix handling of initial-task-end
ClosedPublic

Authored by protze.joachim on Nov 16 2021, 8:21 AM.

Details

Summary

Latest OpenMP spec says parallel_data is NULL for initial/implicit-task-end.
We nevertheless need to cleanup the ParallelData here, as there is no other
callback for the end of the implicit parallel region. We can use the reference
stored in the TaskData.

Diff Detail

Event Timeline

protze.joachim created this revision.Nov 16 2021, 8:21 AM
protze.joachim requested review of this revision.Nov 16 2021, 8:21 AM

What happens for a teams construct? The implicit tasks in that case are all initial tasks. Should this Data->Team->Delete() apply there as well, or only for the implicit parallel region for the whole program?

What happens for a teams construct? The implicit tasks in that case are all initial tasks. Should this Data->Team->Delete() apply there as well, or only for the implicit parallel region for the whole program?

I think, support for teams is a separate issue, I created D114020 for this.
Looking at the implicit flushes section, I think we need to add an ordering constraint for initial-task-end events and the teams-end event. ("after all initial-task-end events" instead of "after the thread executes its initial-task-end event")

Thanks. This LGTM.

dreachem accepted this revision.Nov 18 2021, 8:57 AM
This revision is now accepted and ready to land.Nov 18 2021, 8:57 AM

Hi, @protze.joachim.
We have a dependency on this patch, therefore we'd like to know if you'll be committing it or if it's been held back for unknown reasons.

Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2022, 3:23 AM