Page MenuHomePhabricator

[OpenMP] Additional Information for Libomptarget Device Mappings
ClosedPublic

Authored by jhuber6 on Sep 15 2020, 1:44 PM.

Details

Summary

This patch adds additonal support for priting infromation from Libomptarget for already existing maps and printing the final data mapped on the device at device destruction.

Diff Detail

Event Timeline

jhuber6 created this revision.Sep 15 2020, 1:44 PM
jhuber6 requested review of this revision.Sep 15 2020, 1:44 PM

Printing out tables at destruction only shows the mappings that are typically declared on the target. The others get deallocated at some point when the target data region ends. Also the messages for existing data mappings are helpful but they can get a bit verbose.

jdoerfert added inline comments.Sep 15 2020, 1:47 PM
openmp/libomptarget/src/device.cpp
55

early exit please.

65

please call dumpTargetPointerMappings, maybe pass the initial message as an argument or something but there is little gain in duplicating the logic.

jhuber6 added inline comments.Sep 15 2020, 1:52 PM
openmp/libomptarget/src/device.cpp
65

Alright, I just want to clarify that you want this to print out only the persisting data on the device. The devices are stored in a global vector so they only deallocate at the end of the program.

222–223

Do you think there's a way to get the names of these mappings? I think it would be extremely helpful but would probably require adding something similar the ident_t that would outweigh the benefits.

jhuber6 updated this revision to Diff 292029.Sep 15 2020, 2:43 PM

Merged calls to a single function. Made it not print out if the table is empty.

jdoerfert accepted this revision.Sep 15 2020, 2:50 PM

LGTM

openmp/libomptarget/src/device.cpp
222–223

We can, and should pass the name in, later.

This revision is now accepted and ready to land.Sep 15 2020, 2:50 PM
jhuber6 changed the repository for this revision from rZORG LLVM Github Zorg to rG LLVM Github Monorepo.Sep 15 2020, 2:59 PM
This revision was automatically updated to reflect the committed changes.