This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Apply D110029 to amdgpu
ClosedPublic

Authored by JonChesterfield on Sep 30 2021, 9:01 AM.

Details

Summary

Use enum for execution mode.

This is partly a port from ROCm and partly a port from D110029. Attempted to
make the same choices as ROCm as far as comments etc go to reduce the merge
conflicts.

There is some cleanup warranted here - in particular I like the cuda patch
factoring out the comparisons into named variables - but I'd like to leave
that for a follow up patch, keeping this one minimal.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Sep 30 2021, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2021, 9:01 AM
JonChesterfield edited the summary of this revision. (Show Details)Sep 30 2021, 9:01 AM
JonChesterfield added inline comments.
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
1696–1697

the uint8_t mode here is essentially legacy cruft where rocm used to encode the same information twice, working on getting rid of the rest of that in parallel to this

1775–1813

Same block of code as above with int8_t replaced with the enum, shame diff doesn't render it as such. Moving it below that block means executing it unconditionally.

Fixes the test case in D110556

This revision is now accepted and ready to land.Sep 30 2021, 1:27 PM
This revision was automatically updated to reflect the committed changes.