Page MenuHomePhabricator

[libomptarget] Move device environment to shared header, remove divergence

Authored by JonChesterfield on Oct 4 2021, 9:09 AM.



Follow on to D110006, related to D110957

Where implementations have diverged this resolves to match the new DeviceRTL

  • replaces definitions of this struct in deviceRTL and plugins with include
  • changes the dynamic_shared_size field from D110006 to 32 bits
  • handles stdint being unavailable in DeviceRTL
  • adds a zero initializer for the field to amdgpu
  • moves the extern declaration for deviceRTL to target_interface (omptarget.h is more natural, but doesn't work due to include order with debug.h)
  • Renames the fields everywhere to match the LLVM format used in DeviceRTL
  • Makes debug_level uint32_t everywhere (previously sometimes int32_t)

Diff Detail

Event Timeline

JonChesterfield created this revision.Oct 4 2021, 9:09 AM
JonChesterfield requested review of this revision.Oct 4 2021, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2021, 9:09 AM
jdoerfert accepted this revision.Oct 4 2021, 9:30 AM

LG, assuming this builds fine. One nit below that can be ignored.


I'd call it DeviceEnvironment.h but I guess this is OK for now.

This revision is now accepted and ready to land.Oct 4 2021, 9:30 AM
JonChesterfield added inline comments.Oct 4 2021, 9:42 AM

i'll rename it now, better to do it all in one block

  • Rename file
  • fix for debug build