Page MenuHomePhabricator

[OpenMP] Add additional fields to device environment
ClosedPublic

Authored by jhuber6 on Sep 17 2021, 2:21 PM.

Details

Summary

This patch adds fields for the device number and number of devices into
the device environment struct and debugging values.

Diff Detail

Event Timeline

jhuber6 created this revision.Sep 17 2021, 2:21 PM
jhuber6 requested review of this revision.Sep 17 2021, 2:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2021, 2:21 PM
jdoerfert accepted this revision.Sep 17 2021, 3:00 PM

Can you also double check that this works actually. print the device id and number of devices? Assuming it does, LG

openmp/libomptarget/plugins/cuda/src/rtl.cpp
906

The slight problem is that DeviceId here is not the OpenMP device ID, IIRC.
The plugins have a local view and we'd need the "global" view.
But for now this is good enough as we don't really deal with mutli-plugin
situations yet. Add a TODO though.

This revision is now accepted and ready to land.Sep 17 2021, 3:00 PM
jhuber6 updated this revision to Diff 373370.Sep 17 2021, 4:44 PM

Adding TODO, printing the values seems to work. I only have a single device so
the number and ID is 1 and 0 respectively. Both the debugging numbers work.

This revision was landed with ongoing or failed builds.Sep 17 2021, 6:26 PM
This revision was automatically updated to reflect the committed changes.