Page MenuHomePhabricator

[openmp] Update OMPT declaration and implementation in the runtime
AcceptedPublic

Authored by lechenyu on Jul 28 2021, 10:18 AM.

Details

Summary
  1. Setup OMPT options and targets in libomptarget's CMakeLists.txt.
  2. Modify omp-tools.h.var according to the latest OpenMP specification (omp-tools.h.var).
  3. Add additional fields into ompt_task_info_t and ompt_thread_info_t to support target-data, target-task-data, and host-op-id (ompt-internal.h).
  4. Set corresponding flags correctly when initializing a target task (kmp_tasking.cpp).
  5. Add wrappers for target-emi callbacks (ompt-general.cpp).
  6. Add callback interfaces for libomptarget in the runtime. The details of OMPT callbacks are transparent to libomptarget and libomptarget only invokes these interfaces when encountering corresponding events (ompt-general.cpp and exports_so.txt).

Diff Detail

Event Timeline

lechenyu created this revision.Jul 28 2021, 10:18 AM
lechenyu requested review of this revision.Jul 28 2021, 10:18 AM
lechenyu updated this revision to Diff 364117.Aug 4 2021, 8:09 AM

Fix format issues

hbae added inline comments.Tue, Sep 7, 3:24 PM
openmp/runtime/src/include/omp-tools.h.var
320

Is this an extension?
I could not find it in 5.1, TR10, or in any open ticket.

325

Same here.

protze.joachim added inline comments.Fri, Sep 10, 7:18 AM
openmp/runtime/src/include/omp-tools.h.var
320

The use case for this flag is for omp_target_memcpy and similar functions, where it is possible to copy from one device to another device.
Thanks for the reminder to create an issue for the OpenMP spec. I created #3006 for this

hbae accepted this revision.Wed, Sep 15, 7:41 AM
hbae added inline comments.
openmp/runtime/src/include/omp-tools.h.var
320

OK.

This revision is now accepted and ready to land.Wed, Sep 15, 7:41 AM