This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OMPT] Fix ompt_get_task_memory implementation
ClosedPublic

Authored by protze.joachim on Aug 16 2023, 6:56 AM.

Details

Reviewers
hbae
jdoerfert
Summary

Since td_allow_completion_event is a member of the taskdata struct, not all firstprivate/shared variables are stored at the end of the task memory allocation. Simply report the whole allocation instead.
Furthermore, the function should always return 0 since in no case there is another block to report.

Diff Detail

Event Timeline

protze.joachim created this revision.Aug 16 2023, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 6:56 AM
protze.joachim requested review of this revision.Aug 16 2023, 6:56 AM
hbae added inline comments.Aug 16 2023, 8:26 AM
openmp/runtime/src/ompt-specific.cpp
478–479

We can remove this check since it is always greater than 0 for an explicit task.

Remove unnecessary check

protze.joachim marked an inline comment as done.Aug 17 2023, 3:56 AM
hbae accepted this revision.Aug 17 2023, 6:37 AM

LGTM

This revision is now accepted and ready to land.Aug 17 2023, 6:37 AM