This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][nfc] Move GetWarp/LaneId functions into per arch code
ClosedPublic

Authored by JonChesterfield on Mar 3 2020, 5:02 PM.

Details

Summary

[libomptarget][nfc] Move GetWarp/LaneId functions into per arch code

No code change for nvptx. Amdgcn currently has two implementations of GetLaneId,
this patch keeps the one a colleague considered to be superior for our ISA.

GetWarpId is currently the same function for amdgcn and nvptx, but I think it's
cleaner to keep it grouped with all the others than to keep it in support.cu.

Diff Detail

Event Timeline

JonChesterfield created this revision.Mar 3 2020, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2020, 5:02 PM
JonChesterfield marked 2 inline comments as done.Mar 3 2020, 5:04 PM
JonChesterfield added inline comments.
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
17

^ this is the preferred implementation, which is unfortunately different to the generic one

openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
194

^nvptx uses exactly the same functions as before

This revision is now accepted and ready to land.Mar 5 2020, 8:42 AM
This revision was automatically updated to reflect the committed changes.