This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][amdgpu] Macro for accessing GPU variables from plugin
ClosedPublic

Authored by JonChesterfield on Aug 25 2021, 5:59 AM.

Details

Summary

Lets the amdgpu plugin write to omptarget_device_environment
to enable debugging. Intend to use in the near future to record the
wavesize that a given deviceRTL was compiled with for running on hardware
that supports 32 or 64.

Patch sets all the attributes that are useful. Notably .data means the variable
is set by writing to host memory before copying to the GPU instead of launching
a kernel to update the image. Can simplify the plugin slightly to drop the
code for patching after load if this is used consistently.

NFC on nvptx, cuda plugin seems to work fine without any annotations.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Aug 25 2021, 5:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2021, 5:59 AM
  • clang-format with a newer clang-format
This revision is now accepted and ready to land.Aug 26 2021, 8:57 AM
This revision was landed with ongoing or failed builds.Aug 26 2021, 9:28 AM
This revision was automatically updated to reflect the committed changes.